-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Solution nav] Prevent href click on accordion button #183508
[Solution nav] Prevent href click on accordion button #183508
Conversation
/ci |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
Tested locally and works. I was able to get the tests to pass as well by using navId here after giving the child link an ID to distinguish it from the parent link id. Thank you! |
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 lgtm
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
## Summary Currently the breadcrumb of the parent navigation item isn't a link: <img width="339" alt="Screenshot 2024-05-10 at 2 06 42 PM" src="https://github.com/elastic/kibana/assets/1676003/1471125f-59d7-468e-8ede-3a3c3c3e42dc"> This change makes it so the breadcrumb of parent navigation item is linkable: <img width="293" alt="Screenshot 2024-05-10 at 2 21 27 PM" src="https://github.com/elastic/kibana/assets/1676003/aad5e650-33e1-419d-b866-0b7ec70e1f42"> The links will go to the first item in the list of child links. The merging of this PR depends on #183508 allows for this functionality to work without making the left side parent collapsible link, also a href link - only the breadcrumb. ## Testing - Start a serverless kibana instance - Navigate to a child link of an accordion using the left side navigation <img width="589" alt="Screenshot 2024-05-15 at 11 26 24 AM" src="https://github.com/elastic/kibana/assets/1676003/d225967d-37d1-4f19-b3f5-856fcc1bce68"> - The breadcrumb should of this page should be a link and link you to the first child link of the accordion
In this PR I've added support for
href
value to the accordion header button required to fix https://github.com/elastic/observability-serverless/issues/24.With the changes of this PR it is now possible to declare a
link
to an accordion parent, ant not have it affect the accordion toggle on/off behaviour. The link is then only used for the Breadcrumb.Manual testing
To test manually the change, apply the diff from here https://github.com/elastic/kibana/pull/183189/files and launch serverless observability. You should have the breadcrumb parent.