Theme switcher, table of contents, missing-page redirect, form placeholders and time field; audit and revalidate fixes
- buildRevalidateHook skips outside Next (no NEXT_RUNTIME) and with context.disableRevalidate - BuilderForm focuses only on a real step change (no scroll to the form on remount) - mediaImageProps: placeholder colour only for JPEG (placeholderColor); hook stores no colour for transparent images - buildLinkField: interface name per shape (CmsLink, CmsLinkPlain, CmsLinkNoLabel) + interfaceName option - Cookie Settings: buttons.save -> buttons.savePreferences (Mongoose reserved name) - ThemeScript, ThemeSwitcher, useTheme; Site Settings defaultTheme 'system' + themeToggleLabel; Turnstile follows page theme - extractHeadings, RenderRichText headingIds, TableOfContents, buildTableOfContentsField - createPageRoute onMissing: 'redirectHome' - Form builder: localized placeholder on text/email/textarea/number, new time field - ipal-audit: no false positive for object keys between JSX elements; /md route not reported as dynamic Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
23e033d7d7
commit
faa4ad679c
@@ -74,6 +74,7 @@ describe('form validation — choice lists and dates', () => {
|
||||
{ name: 'services', blockType: 'checkboxGroup', maxSelected: 2, minSelected: 1, options: [{ value: 'www' }, { value: 'seo' }, { value: 'ads' }] },
|
||||
{ name: 'size', blockType: 'radio', options: [{ value: 's' }, { value: 'l' }] },
|
||||
{ name: 'deadline', blockType: 'date' },
|
||||
{ name: 'hour', blockType: 'time' },
|
||||
{ blockType: 'step' },
|
||||
],
|
||||
},
|
||||
@@ -96,6 +97,12 @@ describe('form validation — choice lists and dates', () => {
|
||||
expect(await v({ deadline: '2026-13-45' })).toMatchObject({ field: 'deadline', kind: 'invalid_format' })
|
||||
})
|
||||
|
||||
test('time: HH:MM within a day', async () => {
|
||||
expect(await v({ hour: ' 09:30 ' })).toMatchObject({ cleaned: { hour: '09:30' }, ok: true })
|
||||
expect(await v({ hour: '24:00' })).toMatchObject({ field: 'hour', kind: 'invalid_format' })
|
||||
expect(await v({ hour: 'rano' })).toMatchObject({ field: 'hour', kind: 'invalid_format' })
|
||||
})
|
||||
|
||||
test('a Step block carries no value and is not an unknown field', async () => {
|
||||
expect(await v({})).toMatchObject({ ok: true })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user