Skip to content

The button rings: no chip swells to full size while panning - #140

Merged
reportbase merged 1 commit into
mainfrom
claude/keen-pasteur-irpfwz-ringsize
Nov 27, 2026
Merged

reportbase merged 1 commit into
mainfrom
claude/keen-pasteur-irpfwz-ringsize

Conversation

@reportbase

Copy link
Copy Markdown
Owner

Tom (27 Nov 2026): "why to the icons all expand to full size when panning."

Why

makeRing's layout, as merged in #138, showed every chip and set its scale to 1 before reading the widths. A chip's transform eases (button.icon-btn, 80 ms). A chip coming back round from the far end had been hidden, so the width read made the browser apply that 1 before the chip's real scale was written. The chip then grew to full size and shrank again on the way in. On a phone, a touch drag showed a far chip at 52 px, full size, mid-pan.

The fix

  • Shown chips are measured as they stand, since a transform changes no offsetWidth.
  • Hidden chips are taken at the widest chip's width.
  • A chip's size is written before it is shown.
  • A culled chip keeps --ring-s 0.15, so it comes back small.

Checks

  • Touch-drag probe at 390 px: chips grow only as they near the focus, and no far chip jumps to full size.
  • tests/editor.mjs: the phone top-bar, strip-holds and centred-row checks pass.

This is independent of #139, the shape browser, whose tiles have no transition.


Generated by Claude Code

A chip coming back round from the far end was shown at full size before its
scale was written, and its transform transition grew it to full size and
shrank it again while the ring was panned. Hidden chips are now taken at the
widest chip's width, a chip's size is written before it is shown, and a
culled chip keeps a small size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014hCELqa1Wq59Y67k57PZCD
@reportbase
reportbase marked this pull request as ready for review November 27, 2026 02:59
@reportbase
reportbase merged commit c281954 into main Nov 27, 2026
9 checks passed
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