frappe
frappe copied to clipboard
Breadcrumb when viewing a dashboard should be linked to Module/Workspace rather than Dashboard list
Description of the issue
When we create a Dashboard for a particular module, the breadcrumbs on the Dashboard are as follows:
Home > Dashboard > Dashboard Name

This is very confusing for the users because they cannot go back to the workspace where they entered the dashboard from. The "Dashboard" link takes them to the Dashboard list.
Steps to reproduce the issue
- Open any dashboard
- The breadcrumb will take you back to dashboard list rather than the Workspace the dashboard belongs to.
Upon checking the codebase, I think we could have a field in the Dashboard form where they can choose the Workspace/Page this dashboard belongs to. Then on page render, we fetch the Workspace name and add the breadcrumb. If no workspace is selected, we can default to the Dashboard list.
IMO breadcrumb logic should be changed to:
- Guess hierarchy from which a page is possible to reach. e.g. workspace1 -> dashboard and workspace2 -> same dashboard
- If directly reached just assign some breadcrumb based on heuristics
- If browsed from desk then use actual route history to create breadcrumb.
If I visit same dashboard from two workspace the breadcrumb should show workspace I visited it from and not random name.
@ruchamahabal :eyes:
Breadcrumbs are not tied to workspaces now so shouldn't be a problem in the new desk
Partially solved here: https://github.com/frappe/frappe/pull/26638 (will add screenshots/desc soon) ref doc's Module will be shown in the breadcrumb and that module's sidebar will get rendered in the ModuleShell.