Skip to content

PosterBoard step 2: render linked cards at grid positions (CS-12214)#5560

Draft
burieberry wants to merge 5 commits into
mainfrom
cs-12214-linked-card-tiles
Draft

PosterBoard step 2: render linked cards at grid positions (CS-12214)#5560
burieberry wants to merge 5 commits into
mainfrom
cs-12214-linked-card-tiles

Conversation

@burieberry

Copy link
Copy Markdown
Contributor

Stacked on #5554 (step 1). Ports cardstack/boxel-catalog#667 into the experiments realm and closes out the review feedback it had accumulated.

Closes CS-12214.

What's here

  • Schema: @field cards = linksToMany(() => CardDef) and @field frameSettings = containsMany(FrameSettingsField) (cardIndex/x/y, exported for tests).
  • Tiles: each linked card renders fitted inside FittedCardContainer @size='cardsgrid-tile' (dimensions from FITTED_FORMATS; the same spec drives the placement math), absolutely positioned in the single transformed plane.
  • Placement: persisted positions with Number() coercion + Number.isFinite guards (instance JSON is hand-editable); cards without settings flow into a 4-column grid offset 10px from the origin. Hint header shows only on an empty board.
  • Demo instance: links experiments-realm cards with relation-free fitted views (Pets, IkeaProducts) — two positioned via frameSettings, three grid-placed.

Review fixes folded in (from the Codex review on the catalog PR)

  • Tiles don't start board pans: pointerdown inside a tile bails out of the pan handler (functional data-poster-board-tile hook), so the root no longer captures the pointer and preventDefaults over fitted-card content. Tile pointerdown becomes drag-to-move in step 3 (CS-12215).
  • Broken-link placeholders in placed tiles: indexed access via (get @fields.cards i) bypasses the linksToMany renderer's broken-slot branch, which produced blank tiles for error/not-found links. The board reads per-slot relationship state (getRelationshipMembershipState) and renders boxel-ui's BrokenLinkTemplate at the tile's position. (The open-anyway affordance is omitted — CardCrudFunctions isn't exposed to cards.)

Known limitation

Cards whose fitted views read through their own linksTo relations can still error the whole board render during indexing — CS-12220 tracks degrading that to a per-tile failure.

Testing

Draft pending a live-test run: glint (0 errors in poster-board/) and template lint pass; the placement test was verified green when this code lived in the catalog realm, but the local dev stack is currently down and the experiments realm isn't publicly readable to the live-test loader yet (401 at _mtimes), so the ported suite (4 tests, incl. the new tile-pan regression assertion) hasn't run here. Will mark ready once it has.

🤖 Generated with Claude Code

burieberry and others added 5 commits July 20, 2026 17:45
FigJam-style infinite-canvas board card, step 1 of CS-12193: pan,
cursor-anchored wheel/pinch zoom with momentum (rig.gts camera engine),
zoom toolbar, and layout-independent keyboard shortcuts, with live tests
and a demo instance. Continues development in the monorepo; the
boxel-catalog PRs (#666, #667) hold the earlier history.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
qunit/qunit-dom devDependencies plus the qunit-dom types entry give
assert.dom its Assert augmentation, and the @cardstack/host/* path
mapping resolves the host service registry so getService is typed —
mirroring the catalog package's setup for .test.gts files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ports boxel-catalog#667 onto the review-fixed step-1 board: cards
linksToMany plus FrameSettingsField (cardIndex/x/y), tiles wrapped in
FittedCardContainer at the cardsgrid-tile size from FITTED_FORMATS,
persisted positions with Number.isFinite guards falling back to a
padded 4-column grid, and the hint header only on empty boards. The
demo instance links experiments-realm cards with relation-free fitted
views (relation-traversing ones error the board render — CS-12220).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pointers that go down inside a tile now bail out of the pan handler
(like the HUD), so the root no longer captures the pointer and
preventDefaults over fitted-card content; tiles carry a functional
data-poster-board-tile hook for the guard. Tile pointerdown becomes
drag-to-move in step 3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Indexed access via (get @fields.cards i) bypasses the linksToMany
renderer's broken-slot branch, so an error/not-found link produced a
blank tile. The board now reads the per-slot relationship state itself
(getRelationshipMembershipState, a pure read) and renders boxel-ui's
BrokenLinkTemplate at the tile's position for terminal failures. The
open-anyway affordance is omitted: CardCrudFunctions isn't exposed to
cards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@burieberry
burieberry force-pushed the cs-12213-poster-board branch 2 times, most recently from 0d692f4 to 12b2bca Compare July 21, 2026 15:26
Base automatically changed from cs-12213-poster-board to main July 21, 2026 16:24
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