-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiMarkdownEditor] Highlight relevant toolbar button when in a matching text node #5840
[EuiMarkdownEditor] Highlight relevant toolbar button when in a matching text node #5840
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_5840/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5840/ |
@1Copenut I requested your review specifically for the added |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5840/ |
jenkins test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great to me with very minor/optional comments! My only remaining comments are on the QA items above, particularly the quote button behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really wanted to keep the aria-pressed
attribute, but came down on the side of removing it. Reasons and documentation linked in the review notes.
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5840/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chandlerprall,
I tested the PR and found a bug. When we click on some of the toolbar plugins the following error appears:
Screen.Recording.2022-04-28.at.04.28.02.PM.mp4
This happens because the
Done! Updated the default url to
Intentional, same reason that I gave for disabling the quote button. |
@miukimiu pushed a fix for that bug |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5840/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes look great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @chandlerprall. Tested again and the error is gone. LGTM! 🎉
Summary
Opening as a draft to ensure CI is happy before reviews
aria-pressed
to the toolbar buttonsI wanted to take this further and make the buttons highlight for nested nodes (e.g. italic in bold), but the button actions don't function in that environment so I think it's better to avoid handling element nesting when determining the button state.
Before
After
Checklist
- [ ] Checked in both light and dark modes- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Updated the Figma library counterpart