-
Notifications
You must be signed in to change notification settings - Fork 13
Breadcrumbs powered by useMatches()
#2531
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is pretty good, though there are still a few weird things, mostly around route tabs. Also edit and create forms. I think we could do without crumbs for those. I just didn't want to change the route config too much yet. 2024-11-01-matches-breadcrumbs.mp4Route tabs already had crumbs defined so they would show up in the page title. We can easily remove them, and I tried that, but then you end up with this weirdness with nested ones, where you can click into the router detail, where you clearly want the crumb, and then when you click back up, the crumb disappears: 2024-11-01-tab-breadcrumb-nesting.mp4 |
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'm having trouble getting this to run locally, but the code looks good.
Edit: Seems like the tests are missing some Projects
in the expected strings. I can add those in.
* Most of the work to get breadcrumbs in place of top bar pickers * Bot commit: format with prettier * Refactor; add System page breadcrumbs * proper arrow; spacing tweaks * Tighten top bar by a few pixels * No back arrow on root pages; no white link when only one item on page * Update tests * Style tweaks * Fix current selected item icon alignment * Cleanup * Breadcrumbs powered by `useMatches()` (#2531) * first pass at matches-based breadcrumbs. route config changes required * kinda fix things in the route config * use-title.ts -> use-crumbs.ts * Update import --------- Co-authored-by: Charlie Park <[email protected]> * Update expected strings in e2e tests * Fix multiple locator match issue, though we might change text on button * use main to select connect button instead of connect breadcrumb * slight refactor on system/silos crumb * move Breadcrumbs into TopBar * prop name systemOrSilo * adjust main pane / footer height on serial console * add titleOnly concept for form crumbs, apply to all routes * --top-bar-height CSS var * fix ssh keys and floating IP edit crumbs * fix z-index on modal dialog overlay so it covers topbar * Bot commit: format with prettier * fix crumbs of pageless route nodes, very zany snapshot test for the crumbs * use helpers to make everything a little cleaner * write a test, find a bug! funny how that works --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Benjamin Leonard <[email protected]> Co-authored-by: David Crespo <[email protected]> Co-authored-by: David Crespo <[email protected]>
This more or less works already, but needs some tweaks to the route config to make it produce the correct results. The route config changes are simple, but they change the indentation, so the whitespace-hidden diff is much better.
useMatches()
thing works