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
+4
-4
@@ -170,8 +170,8 @@ drops every inline style; style with `classNames` (`dialog`, `figure`, `image`,
|
||||
| Feature | Default | Turn off / override |
|
||||
|---|---|---|
|
||||
| Whole feature | off — nothing renders without a trigger | don't use the components |
|
||||
| Notifications → Lightbox labels | off | `ipalKit({ lightbox: true })`; `lightboxNotificationFields` for your own global; `globalOverrides.notifications` |
|
||||
| Texts | panel → `LIGHTBOX_FALLBACK` (English) | `texts` on the provider / trigger / dialog; `resolveLightboxTexts` |
|
||||
| Form messages → Image viewer labels | off | `ipalKit({ lightbox: true })`; `lightboxNotificationFields` for your own global; `globalOverrides.notifications` |
|
||||
| Texts | panel → `lightboxFallback(locale)` (`LIGHTBOX_FALLBACK_PL` on `pl`, else `LIGHTBOX_FALLBACK`) | `texts` on the provider / trigger / dialog; `resolveLightboxTexts` |
|
||||
| Provider in `SiteProviders` | off | `lightbox` prop; or your own `<LightboxProvider>` in a client component |
|
||||
| Large image markup | `<img srcSet>` | `renderImage={({ image, imgProps, index }) => <Image … />}` (provider, client only) |
|
||||
| The whole viewer | `LightboxDialog` | `renderDialog={(props) => <MyViewer {...props} />}` — same props, your markup |
|
||||
@@ -181,7 +181,7 @@ drops every inline style; style with `classNames` (`dialog`, `figure`, `image`,
|
||||
| Look | inline styles from `--ipal-lightbox-*` | CSS variables; `unstyled` + `classNames` + `data-ipal` |
|
||||
|
||||
Building blocks: `lightboxImage`, `lightboxIndex` (wrap / clamp), `formatLightboxCounter`,
|
||||
`resolveLightboxTexts`, `LIGHTBOX_FALLBACK`, `prefersReducedMotion`, `useOptionalLightbox` (null
|
||||
`resolveLightboxTexts(texts, locale?)`, `LIGHTBOX_FALLBACK`, `LIGHTBOX_FALLBACK_PL`, `lightboxFallback`, `prefersReducedMotion`, `useOptionalLightbox` (null
|
||||
outside a provider), `useLightbox`, `LightboxDialog`.
|
||||
|
||||
## Replacing a hand-made modal (migration)
|
||||
@@ -191,7 +191,7 @@ Projects built before this feature open images in different ways: a `glightbox`
|
||||
to the shared lightbox:
|
||||
|
||||
1. **Config:** `ipalKit({ lightbox: true })`, then `pnpm payload migrate:create` (Postgres) and commit
|
||||
the migration. Fill **Settings → Notifications → Lightbox** in every language — copy the labels
|
||||
the migration. Fill **Forms → Form messages → Image viewer** in every language — copy the labels
|
||||
from the old block fields (e.g. `closeLabel`, `prevLabel`, `nextLabel`) or seed them.
|
||||
2. **Layout:** `<SiteProviders lightbox={{ texts: (await getNotificationTexts({ payload, locale })).lightbox }}>`.
|
||||
3. **Gallery block:** replace the clickable `<div>` / custom `<button>` + `useState(index)` + dialog
|
||||
|
||||
Reference in New Issue
Block a user