Sign-in look: the logo follows IAWL's rules; no plate by default; the brand fields are admin-only

Bitmaps only (JPEG, PNG, WebP, AVIF, GIF; SVG with svgLogo: true), the file fetched and checked by its
bytes before it is printed (checkLogo; 512 KB; ten-minute memory; an unreachable address is believed),
served from a generated size at least twice the shown width. logoPlate replaces logoMadeFor: no plate
unless asked. With the look on, the name, logo and icon of Site settings are changed by admins only
(brandAccess: 'editor' gives them back). Docs, skills, changelog draft, tests and pictures follow.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 20:52:41 +01:00
co-authored by Claude Fable 5.2
parent 3ceeab8469
commit 939ab679c7
67 changed files with 343 additions and 111 deletions
+9 -5
View File
@@ -13,10 +13,11 @@ site; `after-*` from a production build with `signIn: { allScreens: true }`, `be
|---|---|
| `before-*.png` | IAPL 1.17.0: login (light, dark, phone, Polish, wrong password), forgot password, 2FA code, 2FA setup; `-logo` = with a logo set |
| `after-*-name.png` | the new look with no logo set: the site's name |
| `after-*-logo.png` | the new look with a logo (`placeholder-logo.png`, drawn for these pictures) |
| `after-*-logo.png` | the new look with a logo made for dark grounds (`placeholder-logo-for-dark.png`), no plate — the default |
| `after-login-*-logo-dark-letters-no-plate.png` | a logo with dark letters (`placeholder-logo.png`) on the default: hard to read; such a site sets `logoPlate: true` |
| `after-first-user-*.png` | create first user on an empty database (no site name yet: the host is shown) |
| `legacy-unedited-*.png` | the reference site as it was at v1.16.7, **unedited**, built against this plugin: login has the look (through `AdminLogo`), forgot password and create first user are Payload's own until the project sets `allScreens` |
| `iawl-*.png` | IAWL's sign-in page, copied from its repository (`docs/reviews/white-label/`, made 2026-11-24). Two later changes are not in them: the languages are plain links now (no drop-down with a button), and messages are square boxes with a straight bar |
| `iawl-*.png` | IAWL's sign-in page, copied from its repository (`docs/reviews/white-label/`, made 2026-11-24; the languages are still a drop-down there). `iawl-current-sign-in.png` is the page as built now (`docs/reviews/rule-13/after-5-sign-in.png`) |
| `placeholder-logo*.png` | the placeholder logos (dark text; white text for `logoMadeFor: 'dark'`) |
Screens: `login-{light,dark,phone,phone-dark,pl}`, `login-error-{light,phone}`, `forgot-{light,dark,phone}`,
@@ -48,7 +49,9 @@ without users: `--only=first-user`). The files are 8-bit PNGs (re-encoded to kee
| Element | IAPL | Same as IAWL? |
|---|---|---|
| Split, panel inset and corners, grid, glows, colours | the same numbers (`css.ts`) | yes |
| Label, plate, logo box, name as text, link to the site | the same | yes |
| Label, logo box (240 × 72, 2× source), name as text, link to the site, alternative text | the same | yes |
| Logo types (JPEG, PNG, WebP, AVIF, GIF; no SVG) and the look at the file before printing | the same; Payload accepts SVG uploads, so `svgLogo: true` exists; the file is checked by a fetch (IAWL reads the disk), and an unreachable address counts as "believe the upload" | yes, two notes |
| Plate | **no plate by default** (the owner's choice for new surfaces), `logoPlate: true` adds it | IAWL: plate by default, `logoMadeFor => 'dark'` removes it |
| Button, link, focus and border colours; field and button heights; 28 rem column | the same | yes |
| Phone band at 52 rem | the same | yes |
| Languages | links, **on the panel** (top corner; under the brand on a phone), because the form's markup is Payload's and differs per screen | place differs |
@@ -67,8 +70,9 @@ without users: `--only=first-user`). The files are 8-bit PNGs (re-encoded to kee
2. **The panel is one self-contained element**, fixed on a desktop and in the flow on a phone, hidden by its own
CSS off the minimal template. It therefore works wherever it is printed (inside the login form's wrapper, before
a 2FA view, at the top of the body).
3. **No new stored data.** Logo and name are Site settings fields that exist since 1.0: no migration. The plate
switch (`logoMadeFor`) and the accent are code options; putting them in the panel would add columns on SQL.
3. **No new stored data.** Logo and name are Site settings fields that exist since 1.0 — the ones the public site
reads — so every part of the site shows the same logo and there is no migration. The plate switch (`logoPlate`)
and the accent are code options; putting them in the panel would add columns on SQL.
4. **Payload draws its admin screens in the browser** (the server's HTML body is empty until React runs), so "no
flash" means: the panel, its stylesheet and the form appear in the same step. The e2e spec checks that the
form's template is never in the page without them.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

+18 -8
View File
@@ -9,28 +9,38 @@ the 2FA screens (code, setup) show a dark panel with the client's logo — or th
look IAPL now shares with IAWL. No edit, no `generate:importmap`, no migration, no new env var.
Keep Payload's screens: `whiteLabel: { signIn: false }`. Sites without `whiteLabel`: nothing changes.
Three things to look at on such a site, each with a one-line way back:
- **The logo stands straight on a dark panel** (no plate). A logo with dark letters: `signIn: { logoPlate: true }`.
- **An SVG logo is not shown on the sign-in screens** (the site's name is; the rest of the site is untouched):
upload a PNG / WebP logo or set `signIn: { svgLogo: true }`.
- **Editors can no longer change the site's name, logo and icon** in Site settings (admins can): these are what the
public sign-in page shows. `whiteLabel: { brandAccess: 'editor' }` gives them back.
## Added
- **Sign-in look (`whiteLabel.signIn`, on with `whiteLabel`).** A dark panel with the label "Administration panel",
the client's logo on a white plate (Site settings → Logo) or the site's name, and the panel's languages as links;
the client's logo (Site settings → Logo) or the site's name, and the panel's languages as links;
the form beside it, in both admin themes; a band above the form on a phone. Logo and name come from Site settings:
no env var, **no new field, no schema change** (MongoDB, Postgres, SQLite alike). With nothing set the panel shows
the label and the site's host — no Payload or Intecion mark.
the label and the site's host — no Payload or Intecion mark. The logo on a white plate is an option; the default is no plate.
- **`signIn: { allScreens: true }`** — the same look on forgot / reset password, create first user, logout and
"unauthorized". Adds the provider `SignInLook` (one import-map entry: `pnpm payload generate:importmap`). The
project starter writes it for new sites. A production start that does not find the entry in `importMap.js`
leaves the provider out and logs what to run; the panel keeps working.
- **Options:** `signIn.accent` (hex colour of the button, links and focus ring), `signIn.logoMadeFor: 'dark'` (a
white logo: no plate), `signIn.languages: false`, `signIn.svgLogo: false` (an SVG logo is not shown on the sign-in
screens), `whiteLabel.brandAccess: 'admin'` (only admins change the name, logo and icon in Site settings;
field-level access, no schema change). CSS variables `--iapl-signin-*` for a project's `custom.scss`.
- **The logo follows IAWL's rules:** JPEG, PNG, WebP, AVIF or GIF; fetched and checked by its bytes before it is
printed (at most 512 KB; a deleted or broken file gives the name); fits 240 × 72, served from a generated size
at least twice as wide when the media collection has one; alternative text = the site's name.
- **Options:** `signIn.accent` (hex colour of the button, links and focus ring), `signIn.logoPlate` (a white plate),
`signIn.svgLogo` (allow an SVG logo), `signIn.checkLogo: false`, `signIn.languages: false`,
`whiteLabel.brandAccess` (`'admin'` with the look, `'editor'` as before; field-level access, no schema change).
CSS variables `--iapl-signin-*` for a project's `custom.scss`.
- **Language links before sign-in:** `GET /api/ipal/admin-language?lng=<code>` writes Payload's language cookie for
a supported language and returns to the admin page it was opened from (public; 400 for an unknown language;
never redirects off the admin route). Registered only with the sign-in look and `languages !== false`.
- **The 2FA code boxes have names** for screen readers ("Digit 2 of 6") and ask a phone for the numeric keyboard
(with the sign-in look).
- Exports: `SignInPanel`, `SignInLook` (`/admin`); `resolveSignInLook`, `loadSignInBrand`, `signInLogo`,
`signInName`, `fitLogo`, `isSvgUpload`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`,
`signInName`, `checkLogoFile`, `fitLogo`, `isSvgUpload`, `SIGN_IN_LOGO_TYPES`, `languageLinks`, `LANGUAGE_NAMES`, `signInCss`, `isHexColour`,
`signInProviderActive`, `buildAdminLanguageEndpoint`, `adminPathFromReferer`, `SIGN_IN_LOOK`, `SIGN_IN_STYLE_ID`,
`SIGN_IN_LOGO_BOX`, `SIGN_IN_NAME_MAX`, `ADMIN_LANGUAGE_PATH` and their types.
@@ -44,5 +54,5 @@ Keep Payload's screens: `whiteLabel: { signIn: false }`. Sites without `whiteLab
## Requires project changes
None. Recommended: `allScreens` (one config line, regenerate the import map). A project with its own CSS for the
None for the panel to work — but read the three points at the top. Recommended: `allScreens` (one config line, regenerate the import map). A project with its own CSS for the
login screen looks at the result after the update.
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB