Repository navigation
feat(#124): radial arc: hub and the first eight neighbours - #130
Merged
Merged
Conversation
The pinned token's dialog now opens on a fixed arc band: the hub carries the token's label and the first eight stored neighbours sit as buttons on an open 240° arc, rank 0 at the lower left. Clicks call the existing neighbour pick, so a jump appends one row, discards the future and re-queries at the new token. The pure `arc-layout.ts` places equal angles over 240°, shrinks the 150 px radius with the panel, and returns centres and fixed 72x22 boxes; the unit test prints the eight-entry table and asserts no two boxes overlap. The dialog's vertical flip now reserves the band instead of a 160 px guess. Verified with check, lint, prettier, 685 unit tests; the eight-entry table at 380 px has no overlapping boxes. Plan: 1 Slice: 1/3 Kind: behavioral
The arc now takes the height the dialog can spare, shrinks its radius to fit, and sheds ranks until neighbouring chips keep a 76 px chord. A new spec walks the eight buttons in rank order and jumps once from the arc; the hand-walk spec targets svg.neighbor-graph now that the arc adds a second svg to the dialog. Deviation: the default provider's page 0 always holds more than eight neighbours, so the browser cannot reach the shed-ranks path; fitCount and arcLayout heights are unit-tested instead. Deviation: the height term is (H - 38) / 1.5 from ARC_CHIP_HEIGHT and ARC_MARGIN, not the plan's 46 px estimate. Verified: check, lint, prettier, 688 unit tests; 13/13 e2e. Plan: 1 Slice: 2/3 Kind: behavioral
The heap takes the plan's deferred items that were not already there: rotation and a 12-entry window for #125, dropping the duplicated shelf rows, a second caption, and WordNet relation labels for #91. The map now names arc-layout.ts and RadialArc.svelte in the neighbour-shelf entry, and the version moves to 1.22.0. Verified with check, lint, prettier and 688 unit tests. Plan: 1 Slice: 3/3 Kind: mechanical
Contributor
Author
|
Reviewed commit: c09a6d4 Verdict: block Blockers
Stewardship notes
What could be deleted or simplified
|
Keep the arc band's 263 px layout height: `flex: none` stops the dialog column from shrinking it under the absolutely positioned chips. The dialog now tracks viewport changes, so shrinking the window re-fits the band instead of leaving stale coordinates; the `state` prop became `status` because a local `$state` cannot share its name. The e2e asserts every chip stays inside the band and folds the stored-count check into the first test; a new test resizes the window and checks the band still matches its inline height. Chips read width/height from the layout entry instead of duplicating the constants. Verified with `node scripts/verify.mjs` (check, lint, format, 688 tests) and the full Playwright suite (13 passed). Plan: 1 Slice: review Kind: behavioral Fixes: review 1
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.
The inspector now opens on a fixed radial arc band: the pinned token's label sits at the hub and its nearest eight stored neighbours are buttons on an open 240° arc, rank 0 at the lower left. An arc chip jumps exactly like a shelf row — one appended row, the future discarded, the dialog re-queried at the new token — while the graph and shelf scroll below. The band shrinks its radius on a short or narrow panel and sheds ranks until neighbouring chips keep a 76 px chord.
arc-layout.tsis pure and unit-tested, ande2e/radial-menu.spec.tswalks the chips in rank order, tabs through them and jumps once.How to try
npm run dev, open http://localhost:5173.The quick brown fox→ noise, then clickquick.Read first
src/lib/components/arc-layout.ts: the angle, radius and overlap bound live there, and its unit test prints the eight-entry table.Deviations: the default provider's page 0 always holds more than eight neighbours, so the shed-ranks path is unit-tested rather than reachable in the browser; the height term is
(H - 38) / 1.5from the chip height and margin, not the plan's 46 px estimate.Noticed: slice 2 measured 184 changed lines against a ~130 estimate, mostly the hand-walk spec — its
dialog svglocator stopped being unique once the arc added a second svg, so it now namessvg.neighbor-graph. The gap is the estimate missing that fix, not the slice doing two things.Closes #124
Next:
/review <pr>; after merge,/retrospective 124.