Docs: image lightbox page, agent guide, skills, audit check, upgrade note
- docs/lightbox.md: setup, sizes, styling, overrides, migration from a hand-made modal or glightbox - AGENT.md (§6.9, §7 catalog, §7.1, §12), ipal-reference (option, wiring, api.md section), ipal-site and ipal-block steps, PROGRAMISTA §6 row 48 - ipal-audit warns about lightbox libraries - notifications.md, richtext.md, media.md, frontend.md, README index Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
476c3ac1df
commit
7eacf1e713
@@ -21,6 +21,12 @@ the texts in the panel (Notifications tab), grouped per context. Group `form`:
|
||||
exported from `@intecion/ipal-kit`).
|
||||
For forms: `getFormTexts(locale)` from `lib/content` = the `form` group in the given language.
|
||||
|
||||
Group `lightbox` (only with `ipalKit({ lightbox: true })` — adds columns, run a migration on Postgres):
|
||||
`open` ("Enlarge image"), `dialog` ("Image viewer"), `previous`, `next`, `close`, `counter`
|
||||
("{current} / {total}"). `getNotificationTexts(...).lightbox` always returns the full set (fallback
|
||||
`LIGHTBOX_FALLBACK`), and `getSiteShell(locale).lightboxTexts` carries it to `<SiteProviders lightbox>`.
|
||||
Details: [lightbox.md](./lightbox.md).
|
||||
|
||||
## Helper — getNotificationTexts
|
||||
|
||||
Reads the texts from the global per language, with a fallback per field. The counterpart of `getConsentTexts`:
|
||||
@@ -29,7 +35,7 @@ Reads the texts from the global per language, with a fallback per field. The cou
|
||||
import { getNotificationTexts } from '@intecion/ipal-kit'
|
||||
|
||||
const notifications = await getNotificationTexts({ payload, locale }) // in lib/content: getFormTexts(locale) = .form
|
||||
// notifications.form.error, notifications.form.success, ...
|
||||
// notifications.form.error, notifications.form.success, ..., notifications.lightbox.close
|
||||
```
|
||||
|
||||
## Mapping the result — resolveFormMessage
|
||||
@@ -74,7 +80,7 @@ users), so the frontend reads them without a session. Write: `editor+` (`adminOr
|
||||
|
||||
## Turn off, override, extend
|
||||
|
||||
- **Turn off:** none — the `notifications` global is currently always added (also without the `forms` option).
|
||||
- **Turn off:** none — the `notifications` global is currently always added (also without the `forms` option). The `lightbox` group is opt-in (`ipalKit({ lightbox: true })`); `lightboxNotificationFields` puts it in your own global instead.
|
||||
- **Override texts:** in the panel, per language; empty field → `NOTIFICATION_FALLBACK` (EN).
|
||||
The fallbacks cannot be swapped with a plugin option — apply your own default texts in the project
|
||||
on the result of `getNotificationTexts` (e.g. `texts.form.error ||= '…'`).
|
||||
|
||||
Reference in New Issue
Block a user