Skip to content

fix(squawk): let the poll be removed when the system asks for reduced motion - #317

Merged
Github-Samuel merged 1 commit into
mainfrom
fix/squawk-poll-remove-reduced-motion
Oct 24, 2026
Merged

Github-Samuel merged 1 commit into
mainfrom
fix/squawk-poll-remove-reduced-motion

Conversation

@Github-Samuel

Copy link
Copy Markdown
Member

Reported in general support: a poll added to a Squawk post by accident could not be removed.

Cause

Removing a poll only sets pollClosing. The poll is cleared in onAnimationEnd once sq-poll-out finishes. Under prefers-reduced-motion: reduce the composer sets .sq-poll { animation: none !important }, so that event never fires and the poll stays. Chromium reports reduced motion when Windows "Animation effects" is off, which the "Adjust for best performance" preset also turns off.

The poll draft lives in session state (birdy:composerPoll), so it also came back every time the composer was reopened, until the UI reloaded.

Fix

togglePoll clears the poll straight away when reduced motion is on, the same way the admin panel's sheets close (admin/ui.tsx). Otherwise the fold-out animation plays as before.

No other component pairs a reduced-motion animation: none with state that waits on onAnimationEnd.

Verified

Composer mounted from the dev server, with reduced motion emulated:

before after
X removes the poll (reduced motion) no yes, instantly
Toolbar poll button removes it (reduced motion) no yes
Poll gone after Cancel and reopen (reduced motion) no yes
X with normal motion animates out animates out

Tested in game with Windows Animation effects on and off.

Gates

  • tsc --noEmit: pass
  • oxlint: 0 errors, 24 existing warnings
  • knip: pass
  • i18n:check: pass
  • vitest: 885/885
  • Phone and tablet bundles rebuilt

@Github-Samuel
Github-Samuel merged commit 0a69d3d into main Oct 24, 2026
1 check passed
@Github-Samuel
Github-Samuel deleted the fix/squawk-poll-remove-reduced-motion branch October 24, 2026 12:31
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