Skip to content
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

[Dashboard] Fix unsaved changes badge React error #154607

Merged

Conversation

Heenawter
Copy link
Contributor

@Heenawter Heenawter commented Apr 6, 2023

Summary

Before

Since adding the tooltip to the unsaved changes badge in #154253, React was throwing an error to the console because the element in the top nav no longer had a unique key:

Screen.Recording.2023-04-10.at.8.57.26.AM.mov

image

After

This PR fixes this by adding the key to the tooltip if the badge has one; if it doesn't have a tooltip, then the key is added directly to the EuiBadge as expected. It also ensures that the tooltip has the proper a11y support (cc @elastic/kibana-accessibility) by adding the badge to the tab order and using the pass-through-props to ensure that the tooltip shows up on focus:

Screen.Recording.2023-04-10.at.9.07.04.AM.mov

Checklist

For maintainers

@Heenawter Heenawter added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Apr 6, 2023
@Heenawter Heenawter self-assigned this Apr 6, 2023
@Heenawter Heenawter force-pushed the fix-unsaved-badge-react-error_2023-04-06 branch from 786dfe0 to 080b8b8 Compare April 10, 2023 14:38
@Heenawter Heenawter force-pushed the fix-unsaved-badge-react-error_2023-04-06 branch 2 times, most recently from 6587e47 to a1d84bb Compare April 10, 2023 14:55
@Heenawter Heenawter force-pushed the fix-unsaved-badge-react-error_2023-04-06 branch from a1d84bb to 7bd06a1 Compare April 10, 2023 15:35
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
navigation 9.7KB 9.7KB +89.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

  • 💛 Build #118518 was flaky 786dfe00fe1aca6795f44bb23cde21b3026df82d

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @tsullivan @Heenawter

@Heenawter Heenawter marked this pull request as ready for review April 10, 2023 16:37
@Heenawter Heenawter requested a review from a team as a code owner April 10, 2023 16:37
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh, thanks for fixing this! lgtm! code review only

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

Copy link
Contributor

@rshen91 rshen91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!!

@Heenawter Heenawter merged commit ddd44b8 into elastic:main Apr 11, 2023
@Heenawter Heenawter deleted the fix-unsaved-badge-react-error_2023-04-06 branch April 11, 2023 17:51
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Project:Accessibility release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants