feat(components): give every detail page a breadcrumb trail #497
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-746-detail-breadcrumbs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes PMS-746. Follow-up to PMS-745 (#496), which fixed the reported Assets case and surfaced that the gap was not specific to Assets.
Before this PR, 4 of 9 non-portal detail pages had a breadcrumb trail (contract, rate card, company, and asset as of #496). On the other five, opening a record left the browser Back button or the sidebar as the only route back to its list. Their New/Edit siblings mostly already had a trail from MAPPS-294, which is what made the detail pages read as an oversight rather than a decision.
Now consistent across all nine: ticket, project, invoice, quote and contact detail each render
<List> > <record>.One shared builder, not five copies.
detail_breadcrumbs(list_label, list_route, title)lives next toBreadcrumbsincomponents/layout.rs. It is a plain function rather than a component so a trail can be asserted without standing up a router, which is what its test does.AssetDetailPagemoves onto it in the last commit: PMS-745 landed a page-localasset_detail_crumbsbefore there was anywhere shared to put it, so this is the same output with one implementation. That page-local test is removed along with the function it covered.Two judgement calls worth flagging in review:
Contacts > <name>. A contact also belongs to a company, and ticket and project detail can likewise be reached from a company context banner. A parent that reflects how the page was reached is a real feature with its own design questions; this PR keeps the trail predictable and leaves that as a separate ticket if anyone asks for it.Out of scope and deliberately untouched: the Knowledge Base, which has its own
KbBreadcrumbreflecting a real category hierarchy, and the portal detail pages, which are a different shell.269 lib tests pass. clippy
-D warnings, fmt, the theme-token guard and the cancel-route guard are all clean.Verify on staging: open a ticket, a project, an invoice, a quote and a contact; each should show its list name followed by the record, and the first crumb should return to the list. On the quote page, confirm the header no longer carries a "Back to Quotes" button.