Skip to content

feat(blocks): StylePanel row hints and one label width - #514

Merged
lorant-one merged 6 commits into
previewfrom
feat/style-panel-row-hints
Nov 24, 2026
Merged

lorant-one merged 6 commits into
previewfrom
feat/style-panel-row-hints

Conversation

@lorant-one

Copy link
Copy Markdown
Member

HOLD for 3.1. Retarget to preview once 3.0.0 is out. It's additive and doesn't break anything.

Lorant asked for this in the style panel rework: every colour row gets the same label width so labels never wrap, and each setting gets a tooltip that explains it. Tavilio already does this in its own code (Tavilio#233). This PR brings it into core.

What changes

  • hint on any row. It shows an info icon with a tooltip beside the label. StylePanelRow takes one, and so does every built-in row.
  • hints on Root / StylePanel. Turns on an English tooltip for every built-in row. The text comes from the new labels.hints, which can be translated like the other labels. A row's own hint wins over the default, and hint={false} drops it.
  • labelWidth on Root / StylePanel. Sets one width for every label that sits beside its control (for example "8rem"). The label doesn't shrink and truncates instead of wrapping. It's ignored while stacked.
  • Exports a new StylePanelLabelWidth type. The AI harness JSON has been regenerated.

Nothing changes when none of these props are passed.

Tests

  • New file style-panel-hints.test.tsx covers the defaults off/on, a row's own hint vs false, the shared width, and stacked mode.
  • Blocks: 370/370 pass. tsc and biome are clean.

Generated by Claude Code

Rows take a `hint` (an info icon with a tooltip beside the label). The Root's
`hints` turns on an English default for every built-in row from the new
`labels.hints`, and `hint={false}` drops one. The Root's `labelWidth` gives
every inline label the same width so controls line up and long or translated
labels truncate instead of wrapping; it is ignored while `stacked`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtzSPqS85sXMVcAaizx
@lorant-one lorant-one self-assigned this Nov 13, 2026

Copy link
Copy Markdown
Member Author

The Compare visual check fails on one shot, blocks_social@390__tile06 (495 px, 0.11%). The diff is only the round comment avatar in the /blocks/social demo. That avatar is a remote image, and that demo doesn't render StylePanel or anything else this PR touches. The same 495 px diff showed up on both heads, including after 85ed628, which makes the default label layout byte-identical to the base. So this failure isn't caused by this PR. I'm not adding the visual-change label, because nothing in this PR is meant to change how anything looks.


Generated by Claude Code

@lorant-one
lorant-one changed the base branch from feat/3-0-breaking-cleanup to preview November 23, 2026 20:50

Copy link
Copy Markdown
Member Author

"Build, typecheck and test" fails on 1949ec8 in one test: ai-bundles.test.ts › keeps the catalog small enough to load on every task. catalog.json is 31,303 bytes against a cap of 31,200.

This isn't caused by the row hints change. The growth came in with today's preview merge: the regenerated catalog adds the WorkspaceSwitcher entry, which takes it from 31,183 bytes on preview to 31,303 here. #548 is stacked on this branch and will fail the same way.

The fix is either a shorter purpose line somewhere in the catalog, or moving the cap with a note, as the test's comment already does for earlier growth. Another session is merging into this branch right now, so I'm not pushing on top of it.


Generated by Claude Code

@lorant-one
lorant-one merged commit 40446f5 into preview Nov 24, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
27 tasks done
@lorant-one lorant-one added the approved label Nov 24, 2026 — with Claude
@lorant-one
lorant-one deleted the feat/style-panel-row-hints branch November 29, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants