fix(EuiMarkdownEditor): update types to allow UI plugins to not have a button#9634
Merged
tkajtoch merged 2 commits intoelastic:mainfrom May 5, 2026
Merged
Conversation
Collaborator
💚 Build Succeededcc @tkajtoch |
Collaborator
💚 Build Succeeded
cc @tkajtoch |
mgadewoll
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #9557
This PR updates the
EuiMarkdownEditorUiPlugintype to make thebuttonproperty optional per our documentation, and applies necessary adjustments to the internalEuiMarkdownEditorToolbar.API Changes
EuiMarkdownEditoruiPlugins[].buttonbuttonis now optionalbuttonproperty is now correctly marked as optional in the type definition. When unset, the button won't be rendered in the toolbar, allowing for formatting-only plugins.Screenshots
N/A
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
Breaking changes — What will break? How many usages in Kibana/Cloud UI are impacted?💅 Visual changes — May impact style overrides; could require visual testing. Explain and estimate impact.🧪 Test impact — May break functional or snapshot tests (e.g., HTML structure, class names, default values).🔧 Hard to integrate — If changes require substantial updates to Kibana, please stage the changes and link them here.Impact level: 🟢 None, because the type becomes less strict.
Release Readiness
Documentation: {link to docs page(s)}Figma: {link to Figma or issue}Migration guide: {steps or link, for breaking/visual changes or deprecations}Adoption plan (new features): {link to issue/doc or outline who will integrate this and where}QA instructions for reviewer
EuiMarkdownEditorUiPlugintype allows for skipping thebuttonproperty.TypeError: Cannot read properties of undefined (reading 'label')is not thrown (it is on main)Checklist before marking Ready for Review
QA: Tested light/dark modes, high contrast, mobile, Chrome/Safari/Edge/Firefox, keyboard-only, screen readerQA: Tested in CodeSandbox and KibanaQA: Tested docs changesTests: Added/updated Jest, Cypress, and VRTBreaking changes: Addedbreaking changelabel (if applicable)Reviewer checklist