[EuiMarkdownEditor] Allow markdown plugins to disable toolbar button#6840
Merged
cee-chen merged 3 commits intoelastic:mainfrom Jun 14, 2023
Merged
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6840/ |
cee-chen
approved these changes
Jun 14, 2023
Contributor
cee-chen
left a comment
There was a problem hiding this comment.
QA'd locally in src-doc's markdown_editor_with_plugins.js and confirmed the disabled toolbar button behavior is working. I chatted with Kevin in Slack about unit tests and we're deliberately skipping them for this PR - the toolbar doesn't have tests and we're looking to move EuiMarkdownEditor away from EUI in any case 😅
cee-chen
reviewed
Jun 14, 2023
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6840/ |
1 task
breehall
added a commit
to elastic/kibana
that referenced
this pull request
Jun 14, 2023
eui@81.3.0 ⏩ eui@82.1.0 ## [`82.1.0`](https://github.com/elastic/eui/tree/v82.1.0) - Added ability for `EuiMarkdownEditor` plugins to disable toolbar buttons ([#6840](elastic/eui#6840)) ## [`82.0.0`](https://github.com/elastic/eui/tree/v82.0.0) **Bug fixes** - Fixed `EuiPopover`'s types to omit `panelProps.hasBorder` and `panelProps.hasShadow` - these props are not customizable on popovers for visual consistency ([#6836](elastic/eui#6836)) **Breaking changes** - `EuiRange` & `EuiDualRange` no longer have a hard limit of 20 displayed ticks. The component now instead detects the width available, and throws an error if each tick has less than 5 pixels of width. We recommend testing your tick usage at smaller screens to ensure they always display legibly to users. ([#6829](elastic/eui#6829))
kqualters-elastic
added a commit
to elastic/kibana
that referenced
this pull request
Jun 16, 2023
…le ability, along with new icon (#159718) ## Summary To be merged after elastic/eui#6840 is included in an Eui release and said release is merged to kibana. Makes use of the new isDisabled prop exposed to EuiMarkdownToolbar components, and disables the button with appropriate hover text if license level is not appropriate.  ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
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
Exposes an additional prop to markdown ui plugin button configurations, isDisabled, to be passed through to the underlying button in the toolbar. Use case being an instance where a markdown plugin is disabled for some reason, in the screenshot below this is due to a license level restriction.

QA
Remove or strikethrough items that do not apply to your PR.
General checklist
@defaultif default values are missing) and playground toggles