Files
ipal-kit/docs/dev
Radosław SmolińskiandClaude Fable 5.2 3821174be4 Cookie button never moves; the footer gets room under its last row while the button is shown
Owner, 2026-12-01, after the review of fb92b35: option 3, "miejsce pod stopką" — the button stays in its corner at
all times and covers nothing; the page gets room under its last row.

- Removed: the step up at the end of the page (`clear`, COOKIE_BUTTON_CLEAR, stepAbove; never released).
- New: while the button is shown, the last footer (`reserve`, COOKIE_BUTTON_RESERVE; no footer: <body>) gets bottom
  padding, measured: button height + offset + safe area + 8 px, minus what is already free under the lowest text or
  control in the button's column. The footer's own padding counts (no double space); an empty corner gets nothing.
  Not before a decision, not while the banner is open, gone with the button; `reserve={false}` turns it off,
  `--ipal-cookie-button-space` on the footer sets the amount (0 = none, per breakpoint).
- No layout shift: on a static page <CookieButton> renders an inline script that makes the room before the first
  paint for a visitor who already decided — in a constructed style sheet, so the server's markup is untouched and
  React hydrates without a mismatch; after hydration the same function moves it onto the element.
- consentDecidedScript: the shared start of the banner's and the button's pre-paint scripts.
- avoid={COOKIE_BUTTON_AVOID} is still the placement before 1.17.2 (no room then).

Tests: test/cookieButtonPlacement.test.ts rewritten (24); reference e2e on desktop, 390 px and 360 px phones, light
and dark, five pages: the corner at every scroll position, nothing under the button at the very end, every footer
link clickable, layout shift < 0.001, the room before hydration.
Docs: consent.md, AGENT.md, skills, PROGRAMISTA item 83, changelog draft 1.17.2.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 12:08:00 +01:00
..
2026-11-26 11:09:53 +01:00