Skip to content

Only show the demo button's running state on slow runs - #499

Merged
mjackson merged 1 commit into
mainfrom
mjackson/fix-run-demo-flicker
Aug 26, 2026
Merged

mjackson merged 1 commit into
mainfrom
mjackson/fix-run-demo-flicker

Conversation

@mjackson

Copy link
Copy Markdown
Member

The homepage confetti demo's button flashed its Running… label on every click because warm runs complete in a few milliseconds. Standard delayed-indicator fix: the running state (label + dimming) only appears when a run exceeds 250ms, and the button reserves the wider label's width so the swap never changes its size. Fast clicks now change nothing visually; cold first clicks still show feedback.

Warm runs of the confetti demo finish in a few milliseconds, so the
Running label and disabled styling flashed on every click. The running
state now appears only when a run exceeds 250ms, the dimmed styling
follows that same delayed flag instead of the disabled attribute, and
the wider label's width is reserved so the swap never resizes the
button.
@mjackson
mjackson merged commit 59a1cf0 into main Aug 26, 2026
1 check 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.

1 participant