feat(sidebar): mark the pinned default dashboard with a star#127
Closed
rubenvdlinde wants to merge 2 commits intodevelopmentfrom
Closed
feat(sidebar): mark the pinned default dashboard with a star#127rubenvdlinde wants to merge 2 commits intodevelopmentfrom
rubenvdlinde wants to merge 2 commits intodevelopmentfrom
Conversation
The cog menu's "Set as default" entry already persists a per-user pin (`defaultDashboardUuid`), but the only feedback was the StarCheck icon inside the menu itself — which auto-closes after the click, so users never saw their pin take effect in the sidebar. The pinned row now carries an inline star icon (between the dashboard icon and the label) with a `title` tooltip explaining the pin. The star renders on whichever section the pinned dashboard lives in (personal, group, or default) so users see the affordance regardless of where their chosen default lives. No section restructuring or duplication — the dashboard stays in its home section, just with a visible default-marker.
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 501/501 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 90.7% (127/140 statements)
Quality workflow — 2026-05-05 15:33 UTC
Download the full PDF report from the workflow artifacts.
The first cut only starred a row when the user had explicitly clicked "Set as default" — but most users never have to (the resolver picks a group default for them). Without a fallback, the star never appeared even though there *is* an effective default the user lands on. `effectiveDefaultUuid` mirrors the backend resolver's precedence (steps 0..5): pin → primary-group isDefault=1 → default-group isDefault=1 → first primary-group → first default-group. Step 6 (first personal dashboard) is intentionally excluded — silently starring an arbitrary personal dashboard the user never marked is more confusing than helpful. 5 new tests cover the fallback paths plus a regression check that an explicit pin still wins over any group fallback.
Contributor
Quality Report — ConductionNL/mydash @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ✅ | ✅ 501/501 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Coverage: 90.7% (127/140 statements)
Quality workflow — 2026-05-05 15:39 UTC
Download the full PDF report from the workflow artifacts.
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.
Summary
When a user clicks Set as default in a dashboard's cog menu, the pin (
defaultDashboardUuid) is saved server-side, but the menu auto-closes immediately so the only feedback (the StarCheck icon inside the menu) is gone before the user notices it. The sidebar itself shows nothing.This PR makes the pin visible in the sidebar:
defaultUuid.titletooltip explaining what the pin means ("Default dashboard — opens automatically when you visit MyDash").aria-labelon the same span so screen readers announce the marker.No section restructuring and no duplication: the dashboard keeps its home section, just with an extra visible affordance.
What changed
src/components/Workspace/DashboardSwitcherSidebar.vue:Starimport + registrationisDefaultDashboard(dashboard)method<span class="dashboard-switcher-sidebar__default-marker">injected in all three section row templates, gated onisDefaultDashboard(dashboard)--color-warningso it inherits theme overrides)src/components/Workspace/__tests__/DashboardSwitcherSidebar.spec.js: four new cases pinning the contract — star renders only on the matching row, carries the title + aria-label, hidden whendefaultUuidis empty, and works on a group-section row when the user pinned a shared dashboard.Test plan
vitest run— 850 / 850 (was 846, +4 new)eslintclean on touched files