Cookie button stays in the bottom corner of the window; it no longer climbs above the footer

Owner, 2026-12-01: by default the cookie button should go to the bottom of the page, not to the footer.
Until now the button (fixed, a child of <body>) moved up by the visible part of the footer: on a phone with a tall
footer it ended at the top of the screen over the header, on a short page in the middle of it.

- Default: fixed in the bottom corner on every page and scroll position; safe-area inset also on the side.
- Only at the very end of the page it steps just above a link, button or form field it would keep covered
  (`clear`, COOKIE_BUTTON_CLEAR, stepAbove); a transform, no layout shift.
- The placement before: avoid={COOKIE_BUTTON_AVOID}; avoid={false} still means never move; className as before.

Tests: test/cookieButtonPlacement.test.ts; reference e2e on desktop and phone (corner on long and short pages,
no covered control at the page end, no layout shift, keyboard reopen).
Docs: consent.md "Where the cookie button sits", AGENT.md, skills, PROGRAMISTA item 83, changelog draft 1.17.2.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 10:49:23 +01:00
co-authored by Claude Fable 5.2
parent fc70a34f3e
commit 1025446a28
15 changed files with 426 additions and 28 deletions
+2
View File
@@ -24,10 +24,12 @@ export {
ConsentProvider,
ConsentScript,
COOKIE_BUTTON_AVOID,
COOKIE_BUTTON_CLEAR,
CookieBanner,
CookieButton,
readEffectiveConsent,
signalVendors,
stepAbove,
useConsent,
useConsentContext,
} from '../modules/consent/client.js'