Skip to content

Navigation Menu

Sign in
Sign up

Fix cookie settings banner horizontal space on mobile - #157

Draft
mkayander wants to merge 3 commits into
main from
cursor/cookie-consent-mobile-layout-543f
Draft

Fix cookie settings banner horizontal space on mobile #157
mkayander wants to merge 3 commits into
main from
cursor/cookie-consent-mobile-layout-543f

Conversation

@mkayander

@mkayander mkayander commented Aug 2, 2026
edited by cursor Bot
Loading

Copy link
Copy Markdown
Owner

Summary

Fixes wasted horizontal space in the cookie settings banner on mobile when the close (✕) button is absolutely positioned.

Problem

In settings view, padding-right was applied to the outer Stack, which in column layout (mobile) inset the accept/reject buttons as if a dedicated close-button column existed — leaving empty space beside the actions.

Fix

  • Remove pr from the outer Stack
  • Apply pr: 5 only on the text Box so copy clears the overlaid close control without narrowing the action buttons

Deep review follow-up

  • Race fix: CookieConsentBannerWithDismissEffect now freezes isSettingsView before calling dismiss handlers (onClose, accept/reject). Previously, onClose could set settingsOpen=false synchronously so the banner flashed initial consent copy during the disintegrate animation.
  • Regression test: settings view stays frozen while close-dismiss animation is pending.

Test plan

  • pnpm exec vitest run src/features/cookieConsent
  • Manual: open cookie settings on mobile → accept/reject buttons span full width; close ✕ does not create empty column
  • Manual: close settings with disintegrate → settings copy/close button remain visible during animation

Scope close-button clearance padding to the text block only so action
buttons span the full banner width; the close control stays overlaid.

vercel Bot commented Aug 2, 2026
edited
Loading

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dstruct Ready Ready Preview Aug 2, 2026 8:03pm

Capture isSettingsView before onClose/accept handlers run so the
dismiss animation does not flash initial consent copy when the parent
sets settingsOpen=false synchronously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /