Skip to content

feat(palette): collapsible desktop rail, tighter rows, steadier mobile sheet - #190

Merged
StephenTangCook merged 6 commits into
mainfrom
claude/blocks-palette-mobile-fixes-c3v2l9
Aug 16, 2026
Merged

feat(palette): collapsible desktop rail, tighter rows, steadier mobile sheet#190
StephenTangCook merged 6 commits into
mainfrom
claude/blocks-palette-mobile-fixes-c3v2l9

Conversation

@StephenTangCook

@StephenTangCook StephenTangCook commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Palette housekeeping either side of the md breakpoint: the desktop rail is now narrower, tighter, and collapsible from a handle on its own edge; the mobile sheet stops stealing focus on open and stops forgetting that the user asked for the advanced palette. Also bumps slack-blocks-to-jsx to 1.1.2.

Why

Reported while using the builder:

  • The rail was wide and loosely spaced. Rows are py-1 now (from py-1.5) and the rail is w-56 (from w-72), so the preview gets the width back.
  • No way to get the rail out of the way on desktop. A thin chevron rides the rail's own right border, vertically centred and half over the line — no border or shadow of its own, its background is what breaks the border behind it. With the rail hidden the column has no width, so the chevron tucks against the shell's left edge and points the other way. Collapsing hides the rail rather than unmounting it, so it comes back with its open sections and search exactly as they were; a zero-width spacer stands in for it so the shell keeps its height in hosts that hand the builder none of their own.
  • Tapping "+ Blocks" on mobile auto-focused the Advanced link and popped its tooltip. Radix focuses the first tabbable node on open; in advanced mode that's the search box instead, which raises the on-screen keyboard over the list the user came to read. Focus now lands on the sheet itself, so the focus trap, Escape and reading order still start at the top.
  • The sheet reset to Basic on every re-open. It's torn down whenever it closes, so the palette's own state went with it. The builder now remembers which side of the switch the user is on and hands it back — and drops it if the host flips paletteMode underneath.
  • The "+ Blocks" button had a wide gap — now gap-1.
  • The Advanced tooltip mentioned a search box it doesn't need to sell — copy trimmed.

Dependency bump

slack-blocks-to-jsx 1.1.1 → 1.1.2 (patch). Two of its fixes land in the preview: rich_text sections stack on their own lines, and a bullet list no longer seeds the numbering of an ordered list that follows it. No API change on our side.

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm build
  • pnpm test — 503 passing, including the Storybook a11y project and the built-stylesheet browser tests
  • New test/palette-rail-and-sheet.test.tsx: rail collapses/restores and comes back with its search intact; the sheet opens unfocused with no tooltip; the sheet re-opens on the side of the switch it was left on (and back again)
  • Spot-checked in a real browser against the built stylesheet at 1280×800 and 390×844 — the edge handle in both states, the rail (collapsed shell height unchanged), simple-mode header, and the mobile sheet
  • Spot-checked the preview on 1.1.2 with stacked rich_text sections and a bullet list followed by an ordered list

…e sheet

Palette rail:
- Collapse/restore it from a new toolbar toggle (desktop only — the
  mobile palette is already a sheet). Collapsing hides the rail rather
  than unmounting it, so it returns with its sections and search intact,
  and a zero-width spacer stands in for it so the shell keeps its height
  in hosts that give the builder none.
- Narrow the rail (w-72 → w-56) and tighten the rows to py-1.

Mobile sheet:
- Give the toolbar's "+ Blocks" button gap-1.
- Don't hand focus to the palette's first control when the sheet opens.
  Radix's default put it on the Advanced link, whose tooltip then opened
  unbidden on every tap (and in advanced mode it raised the keyboard over
  the list instead). Focus lands on the sheet itself.
- Remember which side of the simple/advanced switch the user is on, so a
  sheet that reopens after a pick doesn't drop back to the basic list.

Also drops "plus a search box" from the Advanced tooltip.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
block-kitchen c81679c Commit Preview URL

Branch Preview URL
Aug 16 2026, 04:43 PM

@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

✅ Deployed c81679c · Branch preview · Commit preview · Build logs

claude added 4 commits August 16, 2026 04:09
Upstream patch release. Two of its fixes land in the preview: rich_text
sections now stack on their own lines, and a bullet list no longer seeds
the numbering of an ordered list that follows it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
The toolbar was the wrong home for it — it sat away from the thing it
acts on and spent a labelled slot on it. It's now a thin chevron riding
the rail's own right border, vertically centred and half over the line,
with no border or shadow of its own: its background is what breaks the
border behind it. With the rail hidden the column has no width, so the
chevron tucks against the shell's left edge and points the other way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
In the mobile palette the disclosure chevron sat left of the label,
where an icon identifying the block would go — but it isn't one. Moving
it to the end of the row lines the labels up for scanning and lets the
chevron read as what it is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
Simple mode was a one-block list: the rich text section and nothing
else. An ordinary message usually wants a heading, a rule and a picture
too, so the built-in palette flags those as `basic` as well — the list
now reads Header, Divider, Rich Text Section, Image, in palette order.

The flat list has no section headings, which is what made "No title"
(under Image) unusable there. Variants can now carry a `basicLabel` for
that case, and the built-in image variant uses it to show up as "Image"
in simple mode while keeping its sectioned name in the full palette.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
@StephenTangCook
StephenTangCook force-pushed the claude/blocks-palette-mobile-fixes-c3v2l9 branch from f596a52 to 08dc19f Compare August 16, 2026 16:37
A bare chevron over the border line read as loose; a hairline border in
the rail's own border color makes the handle part of the edge it rides.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnK76UVo9ZyuGodyyroiSb
@StephenTangCook
StephenTangCook merged commit 4f2bc70 into main Aug 16, 2026
14 checks passed
@StephenTangCook
StephenTangCook deleted the claude/blocks-palette-mobile-fixes-c3v2l9 branch August 16, 2026 16:49
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.

2 participants