|
| 1 | +# PR_26167_190-platform-banner-ux-cleanup |
| 2 | + |
| 3 | +## Summary |
| 4 | +- Updated platform banner tone styling so Info uses the Theme V2 green highlight, Warning uses the existing yellow/gold highlight, and Urgent uses the red highlight. |
| 5 | +- Moved Banner controls into the Platform Settings center column directly under the Banner message field. |
| 6 | +- Retained Notice Type because it is persisted as `platform.banner.kind`; made it visibly meaningful by rendering a notice label in both the public banner and Admin preview. |
| 7 | +- Preserved platform-settings as the SSoT and validated save/load through the Admin platform-settings API. |
| 8 | + |
| 9 | +## Branch Validation |
| 10 | +- PASS: current branch is `main`. |
| 11 | +- Expected branch: `main`. |
| 12 | + |
| 13 | +## Requirement Checklist |
| 14 | +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before execution. |
| 15 | +- PASS: Hard stop branch guard satisfied on `main`. |
| 16 | +- PASS: Info tone uses Theme V2 green/success highlight via `var(--green)`. |
| 17 | +- PASS: Warning tone keeps Theme V2 yellow/gold highlight via existing gold tokens. |
| 18 | +- PASS: Urgent tone keeps Theme V2 red highlight via `var(--red)`. |
| 19 | +- PASS: Notice Type reviewed and retained because the DB/settings contract persists `platform.banner.kind`. |
| 20 | +- PASS: Notice Type now visibly controls the rendered notice label: |
| 21 | + - `general` renders `Notice`. |
| 22 | + - `temporary-data` renders `Data notice`. |
| 23 | + - `outage` renders `Outage`. |
| 24 | +- PASS: Banner controls now appear in the center column directly under the Banner message textarea. |
| 25 | +- PASS: Platform settings remain the SSoT through `/api/platform-settings/banner` and `/api/admin/platform-settings/banner`. |
| 26 | +- PASS: No inline scripts, style blocks, or inline event handlers were added. |
| 27 | +- PASS: No page-local CSS was added. |
| 28 | +- PASS: Styling changes are limited to reusable Theme V2 `status.css` classes/tokens. |
| 29 | +- PASS: Full samples smoke was not run, per request. |
| 30 | + |
| 31 | +## Notice Type Decision |
| 32 | +- Decision: Retained. |
| 33 | +- Reason: `platform.banner.kind` is an existing platform-settings record written by the server seed/runtime contract. |
| 34 | +- Visible behavior added: Notice Type now renders a visible label in the public header/footer banner and in the Admin preview. It controls the operational label, while Tone controls the color treatment. |
| 35 | +- API payload decision: Retained in the Admin API payload because it remains part of the platform-settings write/read contract. |
| 36 | + |
| 37 | +## Tone Render Evidence |
| 38 | +- PASS: Targeted Playwright validated the live banner class for each tone: |
| 39 | + - Info -> `platform-banner--info`. |
| 40 | + - Warning -> `platform-banner--warning`. |
| 41 | + - Urgent -> `platform-banner--danger`. |
| 42 | +- PASS: Targeted Playwright compared computed banner background colors and notice-label background colors and confirmed all three tones render distinctly. |
| 43 | +- PASS: Public active banner still renders in both required placements: under the header and above the footer. |
| 44 | +- PASS: Notice labels render in both placements for active banners. |
| 45 | + |
| 46 | +## Validation Lane Report |
| 47 | +- contract lane: |
| 48 | + - PASS: `node --check assets/theme-v2/js/admin-platform-settings.js` |
| 49 | + - PASS: `node --check assets/theme-v2/js/gamefoundry-partials.js` |
| 50 | + - PASS: `node --check tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs` |
| 51 | + - PASS: changed HTML inline script/style/event-handler guard for `admin/platform-settings.html` |
| 52 | + - PASS: `git diff --check` |
| 53 | +- integration lane: |
| 54 | + - PASS: `npx playwright test tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs --grep "Platform Settings Admin wireframe|Platform banner renders|Platform banner tones|Platform Settings Admin controls" --workers=1` |
| 55 | + - PASS: Playwright verified save/load through the Admin Preferences service route. |
| 56 | + - PASS: Playwright verified Banner controls are under the Banner message field in the center column. |
| 57 | + - PASS: Playwright verified Notice Type label rendering in the public banner and Admin preview. |
| 58 | +- runtime lane: |
| 59 | + - PASS: live DEV API roundtrip read current platform banner, wrote a temporary validation banner, read it back from `platform_settings`, and restored the original banner. |
| 60 | + - PASS: live read-back matched validation payload. |
| 61 | + - PASS: live restore matched original payload. |
| 62 | + - PASS: live write reported `recordsWritten: 4` and `sourceTable: platform_settings`. |
| 63 | +- skipped lanes: |
| 64 | + - SKIP: full samples smoke, per request and because this PR only affects Platform Settings banner UX and targeted shared partial rendering. |
| 65 | + |
| 66 | +## Manual Validation Notes |
| 67 | +- Admin Preferences/Platform Settings page loads with Banner message first, then Show banner, Notice kind, Tone, and Save Banner controls in the center column. |
| 68 | +- Preview now shows the Notice Type label before the message when active. |
| 69 | +- Public banner now shows the same Notice Type label under the header and above the footer. |
| 70 | +- Live DEV API validation temporarily wrote `PR190 validation banner` and restored the original platform banner state. |
| 71 | +- No secrets or `.env.local` changes are included. |
| 72 | + |
| 73 | +## Playwright V8 Coverage |
| 74 | +- PASS: `docs_build/dev/reports/playwright_v8_coverage_report.txt` refreshed from the targeted Playwright run. |
| 75 | +- PASS: PR190 browser runtime files were collected: |
| 76 | + - `(74%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 750/750; executed functions 49/66` |
| 77 | + - `(100%) assets/theme-v2/js/admin-platform-settings.js - executed lines 112/112; executed functions 17/17` |
| 78 | +- WARN: the shared coverage helper also lists HEAD-diff advisory entries from previous committed work; those are not PR190 worktree changes and remain advisory only. |
| 79 | + |
0 commit comments