Repository navigation
UI: module dashboards at the module root, and the school name goes home - #54
Merged
Merged
Conversation
Every module's tab and address said "Dashboard" (/finance/dashboard). A module's dashboard now lives at the module root (/finance), so the tab, the window title and the address carry the module's name. - MODULE_DASHBOARD_ROOTS (services/tabs/moduleDashboardUrl) is the one list of root modules; canonicalTabUrl() maps the old /<module>/dashboard spelling wherever a tab is created or restored (TabStateDeriver, URLTabSyncEngine, useTabs), and redirectMap generates the legacy redirects from the same list. Links, bookmarks and saved tabs that still carry the old address land on the new one. - Settings is a root module too: its dashboard is a page of its own at /settings, no longer a tab of the School Operations hub. ?tab=dashboard redirects there, and the old /settings redirect into the Configuration hub is gone. - Layout.moduleDashboardRoute prefers the child whose path is the module root (the dashboard is not always the first entry), and the secondary sidebar highlights a module root only on an exact match, so a page it does not list no longer lights "Dashboard". - Tests that asserted the old arrangement now assert the new one. Two lint errors in the test files this touches (deep relative imports, an unused binding) are fixed with it.
…le sidebar no longer covers it The school name and logo in the header are now one button back to the main dashboard. It replaces the whole tab session in a single step - every tab closes, the pinned ones too - and opens /dashboard as the one fresh, pinned tab. The tab menu's "close all" keeps pinned tabs, so it is not used here. Already on the dashboard with a single tab, it does nothing. The header renders without a router, so where "home" is belongs to the layout: Header takes an optional onHome and is a plain label without it. Checking this in a real browser found a fault older than the button: the docked secondary sidebar was `fixed top-0` at the header's own stacking level and rendered after it, so on every module page it painted over the header's leading 208px. The logo and half the name sat under it, with the sidebar's Minimize and Close buttons on top of the name, and a click on the brand landed on those buttons. A docked sidebar now starts below the 48px header; the drawer a narrow screen gets is an overlay by nature and still starts at the top. A unit test holds the cause (where the sidebar starts); the browser spec holds the effect (nothing covers the brand, expanded or minimized).
The shared dashboard shell's hero was a tall, roomy block that pushed the metrics below the fold on every module dashboard. It is now a compact banner like the main dashboard's: tighter padding, a smaller heading, the icon tile before the heading and sized by the shell (so a page's own icon size no longer decides the banner's height), and a tighter gap between sections. The subtitle stays behind its info hint.
…tings dashboard Runs on demand (it is not in CI's golden-path list): pnpm exec playwright test tests/e2e/module-dashboards-brand.spec.ts Against a real school it checks that: a module's tab, window title and address carry the module's name; the old /module/dashboard address lands on the module root; the banner is compact; no point of the school name is under the module sidebar, expanded or minimized; the school name closes every tab - a pinned one too - and lands on the main dashboard, and does nothing when already there; Settings has a dashboard of its own, and the School Operations hub no longer carries a Dashboard tab; and a phone viewport has no horizontal overflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four commits.
/finance, not/finance/dashboard) and its tab is named for the module, so it is never mistaken for the main dashboard. The old/module/dashboardspelling still lands there.tests/e2e/module-dashboards-brand.spec.ts, run on demand).Merge this one first: the Settings pull request is stacked on it.