Skip to content

Shrink the empty portrait to a slim button - #111

Open
rayzhou-bit wants to merge 2 commits into
masterfrom
polish/compact-empty-portrait
Open

rayzhou-bit wants to merge 2 commits into
masterfrom
polish/compact-empty-portrait

Conversation

@rayzhou-bit

Copy link
Copy Markdown
Owner

An empty portrait was a 96px box — measured at 96px of a 394px content area, about a quarter of every stat card without a picture, and the same tax on note cards. It's now a 26px labelled button, reclaiming 70px.

Two deliberate choices

Slim strip, not a small icon. Keeping it full-width in its column means it stays a usable drop target. The onDrop handler lives on the portrait wrapper, so shrinking it to an icon would have quietly made drag-and-drop almost unhittable — the kind of thing that still "works" in a test and fails in use.

Always visible, not hover-revealed. The codebase hover-gates + Add text and + Add Detail, so that was the obvious convention to follow — but those sit at the end of their card. This one sits at the top, so revealing it on hover would push everything below it down every time the pointer crossed the card.

Fixture refit

The Barrow areas and the party sheets were sized around the old 96px box and were left with ~85px of dead space once it went. Re-measured and refitted: 32 → 27 units for the areas, 34 → 29 for the party sheets, landing at 21–25px of slack with no content overflow.

Verification

847 tests pass, build clean. Checked in the browser on the canvas and in the Library (which has its own smaller portrait sizing): placeholder is 26px, no content overflow, no card overlaps on either refitted tab.

Still open

Nothing here lets someone make an image — that was the second half of the ask and needs a decision before I build it. There's also no paste support anywhere in the app (onPaste only appears on title fields, for text), which is probably the cheapest way to get an image onto a card.

🤖 Generated with Claude Code

rayzhou-bit and others added 2 commits October 27, 2026 00:45
An empty portrait was a 96px box - about a quarter of a stat card's content
height, on every card without one, and the same tax on note cards. It's now a
26px labelled button, reclaiming 70px.

Slim rather than a small icon so it stays full-width in its column and
remains a usable drop target, and always visible rather than hover-revealed:
revealing it would shift the card's content every time the pointer crossed
the card.

Refits the fixture cards that were sized around the old box - the Barrow
areas and the party sheets were left with ~85px of dead space once it went.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blankTs called Date.now() fresh for every card and added a small offset, so
if the clock ticked while the module evaluated, card A's `now + 2` and card
B's `now + 1` landed on the same millisecond and two starter cards shared a
timestamp. One clock reading for all three makes them distinct by
construction.

Mine, from #107. It passed locally because the three cards happened to
evaluate inside one millisecond; CI's clock ticked and the test I wrote for
exactly this caught it there. Ran the affected file 20x after the fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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