Skip to content

fix(blocks): MascotPanel colour field width, aligned sticky preview - #583

Merged
lorant-one merged 2 commits into
previewfrom
fix/mascot-panel-docs
Nov 23, 2026
Merged

lorant-one merged 2 commits into
previewfrom
fix/mascot-panel-docs

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Two board posts on docs /components/mascotPanel.

Color row: stray bar after the swatches

The custom colour field sat in <Flex maxWidth={10}>. Flex numbers are pixels, so the field was 10px wide and showed as a thin bar. Separately, the side grid had minmax(18rem…) minmax(20rem…) tracks, wider than the docs preview, so the controls column spilled past the box and got clipped.

  • The colour fields (body, eye, accessory) now use fillWidth maxWidth={160} and wrap under the swatches or switch when the row is tight.
  • The grid tracks are minmax(0, …). The panel stacks below 34rem by container query, based on its own width instead of the viewport's.

Preview and Body tops not level; preview not sticky in docs

  • With top: 16px, the sticky aside was pushed 16px down inside a scroll box that starts flush with the panel. It now uses top: var(--mascot-panel-sticky-top, 0), so both columns start level. The variable is there for hosts with a fixed header.
  • The docs CodeBlock clips overflow, so a sticky element there never sticks to the page. The two docs examples now scroll inside a 40rem Column, so the preview visibly sticks while the controls scroll.

Verified in the docs dev server at 1280px: the Preview and Body headings are both at the same y (they were 16px apart). After scrolling the controls 500px, the preview stays put.

Checks

  • Blocks vitest: 397 passed, with 2 new tests (the colour field isn't capped at 10px, and the side grid sits in the sizing frame).
  • tsc, biome and docs check-examples are clean.
  • CHANGELOG Fixed entry added.

Generated by Claude Code

The custom colour fields sat in a Flex capped at maxWidth={10}, which is
10px, so they showed as a thin bar after the swatches. They now take up
to 160px and wrap under the swatches when the row is tight.

The side layout is a grid whose tracks can shrink, switching to one
column by container query below 34rem instead of by viewport width, so
it no longer spills past a narrow card or docs preview. The sticky
preview sits at top 0 (or --mascot-panel-sticky-top), level with the
first control group; at top 16px it was pushed down inside a scroll box
that starts flush with the panel. The docs examples scroll inside a
40rem box so the preview visibly sticks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk
@lorant-one
lorant-one merged commit cf714cb into preview Nov 23, 2026
10 checks passed
@lorant-one lorant-one added the approved label Nov 23, 2026 — with Claude
@lorant-one
lorant-one deleted the fix/mascot-panel-docs branch November 29, 2026 13:45
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