|
| 1 | +## Context |
| 2 | + |
| 3 | +See proposal.md for motivation. Overlay messages already have `.message__identity` (flex) and a `.message__platform` sibling. HUD themes use CSS grid without a platform area, so the icon auto-places under the avatar. Preview backdrops are body classes `overlay-preview--busy|checker|dark`. Admin already imports `web/overlay/overlay-settings.js`. |
| 4 | + |
| 5 | +## Goals / Non-Goals |
| 6 | + |
| 7 | +**Goals:** |
| 8 | + |
| 9 | +- One identity slot for the platform icon across themes |
| 10 | +- Shared preview backdrop vocabulary and query values |
| 11 | +- Theme defaults that match G-Rebels platform-identity need (`both`) |
| 12 | + |
| 13 | +**Non-Goals:** |
| 14 | + |
| 15 | +- Uploading a real OBS scene screenshot |
| 16 | +- Gray fifth backdrop |
| 17 | +- Migrating existing G-Rebels presets that already saved `stripe` |
| 18 | +- Changing platform-marker semantics (stripe vs author rail) |
| 19 | +- Making cockpit-panel glass transparent in preview so footage always shows through |
| 20 | + |
| 21 | +## Decisions |
| 22 | + |
| 23 | +### Identity owns the icon |
| 24 | + |
| 25 | +**Choice:** Append `.message__platform` inside `.message__identity` before `.message__user`. |
| 26 | + |
| 27 | +**Rationale:** Identity already has `grid-area: user` in HUD themes and `inline-flex` + gap. Moving the node fixes placement without a new grid track. |
| 28 | + |
| 29 | +**Alternatives:** Avatar-corner badge (clips on G-Rebels chamfer); extra grid column (duplicates identity). |
| 30 | + |
| 31 | +### Canonical preview values |
| 32 | + |
| 33 | +**Choice:** Canonical values `white`, `checker`, `scene`, `dark`. Alias `busy` → `scene`. Default `scene`. Shared `normalizePreviewBackground` in `overlay-settings.js`. |
| 34 | + |
| 35 | +**Rationale:** `dark` stays as the query value (FAQ already uses it); labels become Black / Чёрный. Keep `scene` as the honest name instead of `busy`. |
| 36 | + |
| 37 | +**Alternatives:** Rename `dark` to `black` (breaks FAQ URLs); keep `busy` as canonical (labels stay confusing). |
| 38 | + |
| 39 | +### Backdrop lives on overlay `body` |
| 40 | + |
| 41 | +**Choice:** Continue painting preview CSS on overlay `body`. Themes that cover the rectangle with HUD glass still hide footage there — that matches OBS. |
| 42 | + |
| 43 | +**Alternatives:** Letterbox the scene around the iframe in admin chrome (preview-only lie); force HUD panel transparent in preview (dishonest). |
| 44 | + |
| 45 | +### G-Rebels default `both` |
| 46 | + |
| 47 | +**Choice:** `defaultOverlayStyleForTheme` / `defaultStyleForTheme` for `g_rebels_popups` use `both`, like `cockpit_popups`. No rewrite of stored preset style. |
| 48 | + |
| 49 | +**Rationale:** G-Rebels nicknames are gold, so the icon is the platform signal. Existing saved `stripe` remains an explicit operator choice. |
| 50 | + |
| 51 | +## Risks / Trade-offs |
| 52 | + |
| 53 | +- [Existing G-Rebels presets stay without icons] → Changelog points at "Reset group to theme" |
| 54 | +- [Cockpit panel name column is `fit-content(18ch)`] → Icon is `flex-shrink: 0`; name keeps ellipsis |
| 55 | +- [Cached overlay CSS/JS] → Bump `?v=` on overlay assets |
| 56 | + |
| 57 | +## Migration Plan |
| 58 | + |
| 59 | +- New installs and new G-Rebels presets get `both` |
| 60 | +- `preview_background=busy` and localStorage `busy` map to `scene` |
| 61 | +- Rollback: revert overlay DOM/CSS and restore the three-value select; alias keeps old URLs working during the change only |
0 commit comments