Skip to content

feat(home): convert dashboard view (closes #15)#27

Merged
fdaugan merged 5 commits into
feature/vuejsfrom
norman/feat-dashboard-convert
Jun 11, 2026
Merged

feat(home): convert dashboard view (closes #15)#27
fdaugan merged 5 commits into
feature/vuejsfrom
norman/feat-dashboard-convert

Conversation

@Terracosmos

Copy link
Copy Markdown
Collaborator

Closes

closes #15

Depends on

This PR depends visually on #26 (CSS cache desync fix). Without that fix, the new scoped styles introduced here would silently mismatch their JS scope after upgrade — please review/merge #26 first.

Changes per request

Matches the 6 elements of the issue description :

  • A. Progressbar in card title : tool-level health bar relocated from .card-foot to .card-head, computed from a single batched rest/subscription/status/refresh?id=… (chunks of 50) that fans out across all listed subscription ids, then merged best-effort. When no statuses are available, the bar is hidden.
  • B. Content = mini-table (without node type/name) : <div class="row"> listing replaced by a lightweight scoped mini-table (.mini / .mrow). Headers: project name + LjStatus dot (imported from @ligoj/host since #115). Capped at 50 rows with a +N more marker.
  • C. Click row → related project : each row routes to /project/${row.projectId}, mirroring ProjectListView.openProject. realTools now preserves projectId per row.
  • D. Collapsible cards : chevron in .card-head, local reactive Set of collapsed tool keys, smooth v-expand-transition. Default state : all expanded.
  • E. Global collapse / expand all button : added in .toolbar next to the existing LjSegmented Cartes/Liste toggle, visible only in cards mode. Dynamic label (common.collapseAll / common.expandAll, new i18n keys).
  • F. Preferred color per card : layered cascade — best-effort same-origin PNG canvas extraction (dominant non-white / non-black pixels, weighted by saturation) → existing COLORS named map → deterministic PALETTE fallback. Applied as a 4px border-top on .card-head in addition to the existing gradient.

Note on the SVG-derived option

The issue text says the color can also be "provided by the plugin (need data model evolution)". This PR stays strictly frontend (no plugin-api / data model changes). A follow-up PR is planned to migrate NodeIcon from <img> PNG to inline <svg> in the host, which would enable a stricter SVG-derived color path. Tracked separately.

Verified runtime

All six criteria validated on localhost:

  • title progressbars visible (Jira 82%, Confluence 88%, Squash TM 80%)
  • mini-table renders with LjStatus dots per row
  • chevron collapses individual cards; "Tout réduire" / "Tout déplier" toggles all
  • border-top colors distinct per tool (blue / orange / red)
  • list mode left intact (still routes to /project since rows are tools, not single projects)

No behavioural regression introduced. Stat-bar and admin layout bugs surfaced during this work are fixed in the companion PR #26.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@fdaugan fdaugan merged commit 912f1c8 into feature/vuejs Jun 11, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants