Sealious Playground now has automatically generated breadcrumbs:
But the labels on those breadcrumbs are just the ActionNames, so they are not very human-readable.
This task is about adding an option to customize the labels of the breadcrumb.
Each route now exposes an actionName that is then read by sealgen and taken into consideration when creating variables in urls.ts. So a page with actionName set to MyPage will cause a const named MyPageURL to be created in urls.ts. Those urls are then read in order to build the url_tree present in routes.ts. Breadcrumbs are built using this url_tree.
Changes that need to be done:
- Make sealgen add export breadcrumbLabel to each route generated with npx sealgen add-route. It should expect the const to be a function that takes context and returns string, or just a string. Both should be properly handled
- Put that action label in the url_tree
- Make the breadcrumbs.tsx page use the breadcrumbLabel if it's present in the tree. If it's not, fall back to actionName
