Skip to content

feat: per-section copy-link anchors + clickable health scorecard cards - #7

Merged
datnguye merged 2 commits into
mainfrom
feat/node-page-deep-links
Jun 25, 2026
Merged

feat: per-section copy-link anchors + clickable health scorecard cards#7
datnguye merged 2 commits into
mainfrom
feat/node-page-deep-links

Conversation

@il-dat

@il-dat il-dat commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

What & why

Two small SPA usability upgrades:

  • Per-section copy-link anchors — every node-page section (nodeSection) now gets an icon-only "copy link to this section" button in its summary actions slot, copying a #/node/<id>?sec=<sectionId> deep link that route() already resolves via focusSection (opens + scrolls to the section on load). Wired once in nodeSection, so no per-renderer plumbing.
  • Clickable health scorecard cards — each dimension chip on the Health scorecard is now an <a> linking to #/health?d=<key> in both the overview card and the Health page (the old compact flag is gone). Cards get a modern lift-on-hover affordance (transform + accent border, status-color left edge preserved), a :focus-visible outline, a prefers-reduced-motion opt-out, and a full-state aria-label.
  • Shared copyToClipboard helper — extracts the clipboard-guard plumbing shared by the page-level and section-level copy-link buttons (DRY).
  • Node-page section reorderDepends on / Referenced by now sit after the Related ERD and just before Transformation logic, so the columns/tests/ERD detail leads and the graph-derived dependency chip lists trail.
  • Demo screenshots refreshed to reflect the above.

Type of change

  • ✨ Feature (non-breaking change that adds capability)

Area

  • site/ (data dict / builder / 3-tier SPA / deploy)
  • frontend/ (React Flow graph bundle) — E2E test only (no src/** change, no bundle rebuild)
  • Config (dbdocs.yml) / packaging / CI / docs — .claude/design_patterns.md + refreshed demo screenshots

How to test

task generate && task serve
# Open a node page → hover any section summary → click the link icon → paste: lands on #/node/<id>?sec=<section>, section opened + scrolled.
# Open the Health page (and the overview health card) → click any scorecard card → routes to #/health?d=<dim>.

task frontend:e2e   # 62 passed

Checklist

  • task lint passes (ruff format --check + ruff check, incl. PLC0415).
  • task test passes at 100% coverage (458 passed, 100.00%).
  • task frontend:e2e passes (62 passed). Fixed a strict-mode locator collision the new section button introduced (see note below) and added a test for the new copy-link button.
  • I followed the load-bearing patterns in .claude/design_patterns.md — extended the Collapsible node-page sections pattern (added sectionLinkButton, the section-order table reorder, and updated symbol + CSS citations in the same change).
  • Data-dict / SPA changes keep producer ↔ consumer in sync — all changes are ui.js/css only; no data-dict shape change, payload not re-inlined.
  • Graph-UI changes — n/a, no frontend/src/** change (only an E2E spec edit; no graph bundle rebuild needed).
  • New files under dbdocs/site/bundle/** — n/a, only edits to existing ui.js/style.css.
  • Docs / dbdocs.yml.example — n/a, no new config knob or CLI flag added.

Screenshots / notes

Site change — docs/assets/img/demo-*.png screenshots refreshed in this PR.

E2E fix (2nd commit): the new per-section copy-link button reuses the fs-btn style class, so #node-sec-erd's summary actions now hold two .fs-btn elements (copy-link + full-screen). The existing Playwright assertion .node-section-summary-actions .fs-btn hit a strict-mode "resolved to 2 elements" failure. Fix scopes the selector to [title="Toggle full screen"]; a new test covers the section copy-link button (.copied flip on click). Behavior-neutral polish; /dbdocs-code-review ran clean across all six dimensions.

@datnguye
datnguye merged commit 3204c35 into main Jun 25, 2026
14 checks passed
@datnguye
datnguye deleted the feat/node-page-deep-links branch June 25, 2026 15:43
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