Skip to content

feat(p33): ship org-chart block with pan/zoom and tree a11y - #51

Merged
jack755051 merged 7 commits into
mainfrom
feat/p33-org-chart
Oct 2, 2026
Merged

jack755051 merged 7 commits into
mainfrom
feat/p33-org-chart

Conversation

@jack755051

@jack755051 jack755051 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Deliver sanring add block/org-chart: elkjs worker layout, HTML cards + SVG orthogonal edges, dual managers / dotted-line reporting.
  • Pan/zoom viewport with Fit, directory tree for keyboard selection (sync + focus card), docs notes for EPL-2.0 / worker size / allowedCommonJsDependencies.
  • Register the block in registry.json (elkjs peer), Playwright + axe coverage, CLI dry-run asserts elkjs install, minor changeset.

Test plan

  • pnpm start → /blocks#org-chart shows chart + tree; Fit / ± work; tree click focuses card
  • pnpm ng test docs --include='**/org-chart-layout.spec.ts' --watch=false
  • pnpm --filter @sanring/cli test -- src/commands/add.test.ts
  • pnpm test:e2e:docs -- org-chart.spec.ts (or full docs e2e)
  • Confirm main docs bundle still has no elk (worker chunk only)

jack755051 and others added 7 commits October 1, 2026 14:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spike gate (batch A) passed: elk layered handles dual managers and
dotted lines, 1000 nodes lay out in ~170 ms in a worker, and elk ships
only in the worker chunk. Spike page removed; findings live in ADR-0002.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
layoutOrg() turns people + solid/dotted reporting lines into plain
coordinates via elk layered with orthogonal routing. Solid and dotted
edges use separate fixed ports so dotted lines never ride the solid
bus. Bad edges (unknown nodes, self-loops, solid reporting cycles) are
dropped with a warning. elk runs in a worker in apps; tests use the
bundled build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…value

Both broke compilation in a consumer app after `sanring add`. Found by
type-checking the registry in its installed layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocks import siblings relatively ('../card'), which only resolves after
`sanring add` flattens components, blocks and shared into one folder.
stage-registry.mjs reproduces that layout under apps/docs/src (gitignored)
on postinstall and before start/build/test, so `ng build docs` now
type-checks every registry component and block, and the blocks page can
render live previews.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OrgChartComponent lays out people/links through a resource() backed by
the worker engine, draws cards as positioned buttons and connectors as
an SVG overlay, and covers loading, empty and error states. The previous
layout stays on screen while a new one is computed. The docs blocks page
renders a live preview from the staged registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Surface block templates (including org-chart) with fragment links so the docs shell matches the /blocks page.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jack755051
jack755051 merged commit b852815 into main Oct 2, 2026
5 of 7 checks passed
@jack755051 jack755051 changed the title feat(p33): org-chart layout shell and docs Blocks nav feat(p33): ship org-chart block with pan/zoom and tree a11y Oct 2, 2026
@jack755051

Copy link
Copy Markdown
Contributor Author

Docs: blocks are now separate pages (/blocks/dashboard-shell, /blocks/login, /blocks/table-page, /blocks/org-chart) with scenario / composition / usage / preview. Catalog stays at /blocks.

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.

1 participant