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

[EuiCollapsibleNavBeta] Close popover when clicking on links #8139

Merged
merged 10 commits into from
Nov 27, 2024

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Nov 14, 2024

In this PR I've updated the logic to close the popover when clicking a link inside EuiCollapsibleNavBeta (collapsed state).

Screenshot 2024-11-21 at 14 21 10

Fixes elastic/kibana#198870

@sebelga sebelga force-pushed the collapsiblenavbeta/closePopover branch from 08e7940 to a97af30 Compare November 21, 2024 12:55
@sebelga sebelga self-assigned this Nov 21, 2024
@sebelga sebelga marked this pull request as ready for review November 21, 2024 14:22
@sebelga sebelga requested a review from a team as a code owner November 21, 2024 14:22
@sebelga
Copy link
Contributor Author

sebelga commented Nov 26, 2024

Thanks for the review @cee-chen ! Let me know if you are going to push the changes or how do you want to proceed? thanks! 👍

@cee-chen
Copy link
Member

I'll push up to this branch by my EOD

… on div wrapper

- instead of having to iterate through `items`

- this also allows us to add an `event.preventDefault()` escape hatch for consumers who do not want the popover to auto close
+ write unit tests, DRY out types
- while retaining focus and tooltip for keyboard users, and re-showing the tooltip on mouseover
…e mobile overlay flyout as well

- less dependent on DOM traversal, also DRYs out logic for checking prevented defaults, etc.
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @sebelga

@sebelga
Copy link
Contributor Author

sebelga commented Nov 27, 2024

Thanks for making the changes @cee-chen, LGTM! 🚀

Copy link
Member

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Thanks Sebastian!

@cee-chen cee-chen merged commit efcafc8 into elastic:main Nov 27, 2024
5 checks passed
@sebelga sebelga deleted the collapsiblenavbeta/closePopover branch November 28, 2024 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collapsed navigation does not scroll to top of dashboards from long pages
4 participants