Detailed cookie settings window (CookieBanner settings="detailed")

A third settings mode next to 'inline' and 'modal': a large dialog where every consent
category is a card with its on/off control, description and an expandable list of the
cookies it covers (name, provider, purpose, duration), taken from Cookie Settings → Cookies
— the same rows as <CookieTable>. The developer picks the mode with one prop; the
component default stays 'inline', so existing sites are unchanged.

Cookie Settings gets a localized detailLabels group (list labels, English fallback);
getConsentTexts passes texts.cookies and texts.details, sharing the row mapping with
getCookieTable. New classNames slots and data-ipal handles for the cards and lists.

Docs for devs and agents: consent.md (modes compared, which to pick — new projects default
to 'detailed' when the cookie list is filled), AGENT.md, PROGRAMISTA §2.8/§2.11/§6, skills
ipal-setup, ipal-site, ipal-upgrade, ipal-locale-add, ipal-consent-check. Postgres/SQLite
projects need migrate:create for the new fields.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-21 18:16:30 +02:00
co-authored by Claude Opus 5.5
parent 1413e96731
commit 6b4336f961
17 changed files with 278 additions and 54 deletions
+15 -1
View File
@@ -100,6 +100,20 @@ export const cookieSettingsFields: Field[] = [
},
],
},
{
name: 'detailLabels',
type: 'group',
admin: {
description:
'Labels of the cookie list in the detailed settings window (CookieBanner settings="detailed"). The list itself comes from Cookies below.',
},
fields: [
{ name: 'cookies', type: 'text', admin: { description: 'Expander under each category, e.g. "Cookies used" — the count is added.' }, localized: true },
{ name: 'provider', type: 'text', localized: true },
{ name: 'purpose', type: 'text', localized: true },
{ name: 'duration', type: 'text', localized: true },
],
},
{
name: 'categories',
type: 'array',
@@ -122,7 +136,7 @@ export const cookieSettingsFields: Field[] = [
type: 'array',
admin: {
description:
'Cookies the site uses — shown on the cookie policy page (<CookieTable>). Fill it from a scan: ipal-consent-check → cookie-scan.',
'Cookies the site uses — shown on the cookie policy page (<CookieTable>) and per category in the detailed settings window. Fill it from a scan: ipal-consent-check → cookie-scan.',
initCollapsed: true,
},
fields: [