Docs: admin languages and texts, wording rule for agents, new screen names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6b46bc0c14
commit
0a2374db18
+15
-10
@@ -28,8 +28,8 @@ from a separate field.
|
||||
|
||||
| What | Where from |
|
||||
|---|---|
|
||||
| Where it leads | Site Settings → System Pages → Privacy Policy |
|
||||
| Link text | Cookie Settings → `privacyLinkLabel` (per language) |
|
||||
| Where it leads | Site settings → System pages → Privacy Policy |
|
||||
| Link text | Cookie banner → `privacyLinkLabel` (per language) |
|
||||
| When the text is empty | title of the policy page in that language |
|
||||
|
||||
`privacyPolicy` options in `getConsentTexts`: omit (automatic), `false` (no
|
||||
@@ -64,8 +64,8 @@ export default async function Layout({ children, params }) {
|
||||
const { locale } = await params
|
||||
const payload = await getPayload({ config })
|
||||
|
||||
// texts from Cookie Settings; the policy link is automatic:
|
||||
// target = System Pages → Privacy Policy, text = Cookie Settings → privacyLinkLabel
|
||||
// texts from Cookie banner; the policy link is automatic:
|
||||
// target = System pages → Privacy Policy, text = Cookie banner → privacyLinkLabel
|
||||
const texts = await getConsentTexts({ payload, config: i18nConfig, locale })
|
||||
|
||||
return (
|
||||
@@ -84,6 +84,11 @@ export default async function Layout({ children, params }) {
|
||||
the opposite (it shows only after a decision and reopens the banner); both
|
||||
render only after mounting on the client.
|
||||
|
||||
Built-in banner texts follow the page language: `consentFallback(locale)` → `CONSENT_FALLBACK_PL` on `pl`,
|
||||
`CONSENT_FALLBACK` (English) otherwise; panel values always win. Category names for your own selects:
|
||||
`CONSENT_CATEGORY_LABELS` (`{ en, pl }` per category), `consentCategoryOptions()`. `<CookieTable>`
|
||||
takes `locale` and optional `labels`; defaults: `COOKIE_TABLE_LABELS` (`@intecion/ipal-kit/rsc`).
|
||||
|
||||
`getConsentTexts({ payload, config, locale, privacyPolicy?, settingsSlug? })` —
|
||||
`settingsSlug` is the SiteSettings slug for the automatic link (default
|
||||
`'site-settings'`). Empty fields in the panel → English fallback.
|
||||
@@ -243,7 +248,7 @@ Three settings modes to pick in the project — one prop:
|
||||
<CookieBanner equalChoice controls="switch" settings="detailed" />
|
||||
```
|
||||
|
||||
The cookie list comes from **Cookie Settings → Cookies** (the same source as `<CookieTable>` on the policy
|
||||
The cookie list comes from **Cookie banner → Cookie list** (the same source as `<CookieTable>` on the policy
|
||||
page), filtered by category — a category without entries has no expandable list. List labels: **Cookie
|
||||
Settings → Detail labels** (`cookies` — e.g. "Cookies used", the counter is added automatically; `provider`,
|
||||
`purpose`, `duration`), per language; empty → English. `getConsentTexts` passes this in `texts.cookies` /
|
||||
@@ -261,7 +266,7 @@ Recommendation (AGENT.md §7): tokens and `classNames` first — then fixes from
|
||||
project. When you need a completely different layout, you can build your own window; the data is in the
|
||||
context: `useConsentContext()` → `texts.cookies`, `texts.details`, `state`, `savePreferences`.
|
||||
|
||||
Texts from the panel (**Cookie Settings**, per language) — empty field = the element is not shown:
|
||||
Texts from the panel (**Cookie banner**, per language) — empty field = the element is not shown:
|
||||
|
||||
| Field | Where |
|
||||
|---|---|
|
||||
@@ -281,7 +286,7 @@ The elements also have stable `data-ipal` handles for CSS and e2e tests (used by
|
||||
`accept`, `back`, `save`; in modal mode also `consent-overlay`, `consent-dialog`, `close`; in detailed mode
|
||||
additionally `category-<category>` (card) and `cookies` (expandable list).
|
||||
|
||||
Accessibility: the banner dialog and `CookieButton` have an `aria-label` from **Cookie Settings →
|
||||
Accessibility: the banner dialog and `CookieButton` have an `aria-label` from **Cookie banner →
|
||||
title** or **settingsTitle** (per language) — no hard-coded texts in the components. The modal has
|
||||
`aria-modal`, focus on ✕ after opening and closes on Escape; switches have `role="switch"` and `aria-checked`.
|
||||
|
||||
@@ -327,7 +332,7 @@ independent consent state).
|
||||
|
||||
## Policy version, withdrawing consent, consent log, cookie table (1.9.1)
|
||||
|
||||
- **New consent after a policy change:** Cookie Settings → *Policy version* (sidebar). Raise it by 1
|
||||
- **New consent after a policy change:** Cookie banner → *Consent version* (sidebar). Raise it by 1
|
||||
after adding a tool or changing the policy — every visitor will see the banner again.
|
||||
`getConsentTexts` passes the version to `<ConsentProvider texts>` automatically.
|
||||
- **Withdrawing consent deletes the tools' cookies** (`_ga`, `_ga_*`, `_gid`, `_fbp`, `_gcl_*`, Clarity,
|
||||
@@ -343,7 +348,7 @@ independent consent state).
|
||||
choices, the policy version and the time — **no IP and no user agent**. *Consent records* collection
|
||||
(admin only), automatic cleanup after `retentionDays` (default 1095). Details below. Postgres:
|
||||
`migrate:create`.
|
||||
- **Cookie table** for the policy page: Cookie Settings → *Cookies* + `getCookieTable` + `<CookieTable>` from `/rsc`.
|
||||
- **Cookie table** for the policy page: Cookie banner → *Cookie list* + `getCookieTable` + `<CookieTable>` from `/rsc`.
|
||||
Fill the list from the panel with the cookie scanner (`cookieScanner` option — drafts an editor accepts,
|
||||
[cookie-scanner.md](./cookie-scanner.md)) and check the real site with `ipal-consent-check` → cookie-scan.
|
||||
- Consent cookie: `cookie-consent` (`CONSENT_COOKIE`), JSON `{ id, state, timestamp, version }`,
|
||||
@@ -394,7 +399,7 @@ ipalKit({
|
||||
- **Cookie list from the panel:** `ipalKit({ cookieScanner: true })` — opt-in, see
|
||||
[cookie-scanner.md](./cookie-scanner.md) (off, overrides and building blocks there).
|
||||
- **Pre-consent check in a real browser:** `cookieScanner: { crawl: true }` + the shared scanner service
|
||||
— **Crawl site** in the panel, violations (non-necessary cookies or trackers before consent), dashboard
|
||||
— **Check site** in the panel, violations (non-necessary cookies or trackers before consent), dashboard
|
||||
warning, optional e-mail ([cookie-scanner.md → Browser crawl](./cookie-scanner.md#browser-crawl)).
|
||||
- **Extend:** `cookieMap` (your own cookies to delete), `ConsentScript` (scripts without Consent
|
||||
Mode), `useConsentContext()` (your own UI: `state`, `acceptAll`, `rejectAll`, `savePreferences`,
|
||||
|
||||
Reference in New Issue
Block a user