Skip to content

test(preprod): Hide overlay color picker at xs in toolbar snapshot#117104

Merged
mtopo27 merged 1 commit into
masterfrom
test/fix-snapshots-toolbar-xs-snapshot
Jun 8, 2026
Merged

test(preprod): Hide overlay color picker at xs in toolbar snapshot#117104
mtopo27 merged 1 commit into
masterfrom
test/fix-snapshots-toolbar-xs-snapshot

Conversation

@mtopo27

@mtopo27 mtopo27 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

The all controls breakpoint snapshot for SnapshotsToolbar hardcoded diffMode='split', which rendered the overlay ColorPickerButton at the xs breakpoint. Production never reaches this state, so the baseline was capturing an unreachable UI.

Why the xs state was wrong

snapshots.tsx derives effectiveDiffMode, coercing 'split' to 'wipe' below the sm breakpoint before passing the mode down. The color picker is gated on diffMode === 'split', so in production it is hidden at xs. The snapshot skipped this coercion and showed the picker anyway.

The snapshot now derives the mode the same way (split at/above sm, wipe below), so the xs baseline matches real behavior. No production code changes; sm/md snapshots are unchanged.

The 'all controls' breakpoint snapshot hardcoded diffMode='split', rendering
the overlay ColorPickerButton at the xs breakpoint. Production never produces
this state: snapshots.tsx coerces 'split' to 'wipe' below the sm breakpoint via
effectiveDiffMode, so the color picker (gated on 'split') is hidden there.

Derive the mode in the snapshot the same way, so the xs baseline matches real
behavior instead of an unreachable state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 8, 2026
@mtopo27 mtopo27 marked this pull request as ready for review June 8, 2026 17:53
@mtopo27 mtopo27 requested a review from a team as a code owner June 8, 2026 17:53
@mtopo27 mtopo27 merged commit 4bafc84 into master Jun 8, 2026
79 of 81 checks passed
@mtopo27 mtopo27 deleted the test/fix-snapshots-toolbar-xs-snapshot branch June 8, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants