Skip to content

feat(glitch): let Randomize collapse to its glyph on mobile, beside Re-roll - #293

Merged
andraderaul merged 1 commit into
mainfrom
feat/glitch-randomize-icon-only-mobile
Aug 1, 2026
Merged

feat(glitch): let Randomize collapse to its glyph on mobile, beside Re-roll#293
andraderaul merged 1 commit into
mainfrom
feat/glitch-randomize-icon-only-mobile

Conversation

@andraderaul

Copy link
Copy Markdown
Owner

Randomize was the only Strip control still spending the chip row's width on a label at every size.
It now reads as the pair Re-roll already established: the glyph alone below sm, the label back
from sm up, and the label as the accessible name at both — so neither the glyph nor the visible
text is ever the only carrier of the name.

That made the collapse markup a byte-identical copy across two callers, which is the repo's own bar
for extraction, so it becomes IconLabelButton. It stayed app-local rather than crossing into the
kit: the breakpoint is this Strip's width problem, not the kit's.

What changed

  • src/components/icon-label-button.tsx — new, with the rationale in one place instead of copied
    into two call sites
  • preset-picker.tsx (Randomize) and chain-editor.tsx (Re-roll) become its two callers; Re-roll's
    rendered output is unchanged
  • app.test.tsx's five /randomize/i queries become the exact name 'randomize', matching the
    pattern Re-roll's queries already used — without the aria-label the name would be
    "⚄ randomize" and they now fail, where before they passed either way
  • icon-label-button.test.tsx pins the three things the collapse can break: the name is the label
    alone, the glyph stays out of the accessibility tree, the label rides the element that collapses

Verification

Driven in Chrome for Testing at three widths with a Source Image loaded, per the app's verify skill:

Width Randomize Re-roll Accessible name
390 (iPhone 13, hasTouch) — 59×44 — 60×44 randomize
640 (sm exactly) ⚄ randomize — 147×44 ⟳ re-roll — 131×44 randomize
1280 ⚄ randomize — 147×44 ⟳ re-roll — 131×44 randomize

Tapped with a real touch gesture (page.touchscreen.tap, not a synthetic click) on the mobile
viewport: the active Preset cleared VAPORWAVE → none and the canvas pixels changed. The 44px
floor holds at every width.

🤖 Generated with Claude Code

…e-roll

Randomize was the only Strip control still spending the chip row's width on a
label at every size. It now reads as the pair Re-roll already established: the
glyph alone below sm, the label back from sm up, and the label as the accessible
name at both — so neither the glyph nor the visible text is ever the only carrier
of the name.

That made the collapse markup a byte-identical copy across two callers, which is
the repo's own bar for extraction, so it becomes IconLabelButton — app-local
rather than kit-bound, since the breakpoint is this Strip's width problem.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ascii-art-converter Ready Ready Preview Aug 1, 2026 4:55pm
atlas-sprawl Ready Ready Preview Aug 1, 2026 4:55pm
cyberdeck-golem Ready Ready Preview Aug 1, 2026 4:55pm
glitch-studio Ready Ready Preview Aug 1, 2026 4:55pm

@andraderaul
andraderaul merged commit 499e5e5 into main Aug 1, 2026
7 checks passed
@andraderaul
andraderaul deleted the feat/glitch-randomize-icon-only-mobile branch August 1, 2026 16:56
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