Cookies: fill empty languages, and one Cookies entry in the admin
Every language filled (fillEmptyLocales, default on): text saved in one language goes to every language where the same field is still empty, never over a language's own text. Applies to the cookie list (purpose, duration) and the cookie review (purpose, duration). Scanner and approval writes give a language without its own text the default language's text. Building blocks: buildFillEmptyLocalesGlobalHook / CollectionHook, fillEmptyLocales, withFillLocales. One Cookies entry (cookieScanner.adminLayout, default combined): the Cookie banner global is now labelled Cookies and gets Review and approve (scan box and approval list inline) and Site check tabs, built from ui fields. Cookie review and Cookie check leave the navigation (admin.group false) but keep their pages, data and API. This is presentation only: no schema change and no migration, only generate:importmap. adminLayout separate keeps the old layout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a9e1adc03b
commit
b10c2dc0e3
@@ -206,7 +206,8 @@ describe('cookie scanner — labels and config', () => {
|
||||
expect(review?.admin?.components?.beforeListTable).toEqual([
|
||||
expect.objectContaining({ path: '@intecion/ipal-kit/admin#CookieScanButton' }),
|
||||
])
|
||||
expect(review?.hooks?.afterChange).toEqual([])
|
||||
// No accept → cookie list hook; only the hook that fills empty locales (fillEmptyLocales).
|
||||
expect(review?.hooks?.afterChange).toHaveLength(1)
|
||||
expect(config.endpoints?.filter((e) => e.path === '/ipal/cookie-scan').map((e) => e.method).sort()).toEqual(['get', 'post'])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user