[GH-ISSUE #8874] [Feature]: Pick an element to restyle it (Settings → Appearance) #8535

Closed
opened 2026-11-07 16:43:35 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8874

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Users can restyle the app with full CSS themes, or recolor tracker cards with a live-preview editor. There is nothing in between: someone who wants the top bar darker or their own message bubbles rounder has to write CSS against undocumented selectors.

Proposed solution

A Pick an element button in Settings → Appearance. It opens a full-screen pick overlay that highlights named parts of the interface under the pointer (top bar, sidebar, message bubbles, composer, modals and about ten more). Clicking one selects it and opens a small editor for its background, text color, border color, corner radius, opacity and font size. Changes preview live; the user then saves or reverts, the same way the tracker Card Colors editor works. A dropdown selects the same regions without the overlay (the mobile path). Saved styles sync across devices like other appearance settings, and "Reset appearance" clears them.

Alternatives considered

  • Picking arbitrary DOM nodes: rejected; selectors are unstable across releases, so saved styles would silently stop applying.
  • Applying changes immediately: rejected in favor of the Save / Revert draft model the tracker color editor already uses.

Additional context

Interaction model follows the tracker panel's "edit UI" mode: enter a mode, click the thing on screen, edit it, leave the mode.

Template check

  • I DID NOT read this template and provide the requested details.

Minimal fix

Client-only. New: packages/client/src/lib/ui-style-overrides.ts (region registry, normalization as the trust boundary for the synced blob, CSS generation with a :root prefix, pick resolver), packages/client/src/components/layout/UiStyleOverridesInjector.tsx (style tag + pick overlay, mounted next to <CustomThemeInjector /> in App.tsx), packages/client/src/components/panels/settings/UiStyleSettings.tsx (draft editor mirroring TrackerCardColorSettings.tsx), scripts/regressions/ui-style-overrides.regression.ts. Touched: stores/ui.store.ts (persisted+synced uiStyleOverrides, transient pick/selection/preview fields, reset wiring, normalize in persist merge), hooks/use-settings-sync.ts (normalize in omitLocalOnlySettings), SettingsPanel.tsx (render after App Style), packages/shared/src/constants/settings-registry.ts (ui-element-styles section), localization/locales/en.json.

Regression: exact CSS output for a top-bar override; injected color (red;} body{display:none) dropped, unknown keys and region ids dropped, fontSize clamped; serialization key-order independent; resolver returns user-message for a bubble → user row → center chain and null for an unmatched chain.

Originally created by @Promansis on GitHub (Nov 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8874 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Users can restyle the app with full CSS themes, or recolor tracker cards with a live-preview editor. There is nothing in between: someone who wants the top bar darker or their own message bubbles rounder has to write CSS against undocumented selectors. ## Proposed solution A **Pick an element** button in Settings → Appearance. It opens a full-screen pick overlay that highlights named parts of the interface under the pointer (top bar, sidebar, message bubbles, composer, modals and about ten more). Clicking one selects it and opens a small editor for its background, text color, border color, corner radius, opacity and font size. Changes preview live; the user then saves or reverts, the same way the tracker Card Colors editor works. A dropdown selects the same regions without the overlay (the mobile path). Saved styles sync across devices like other appearance settings, and "Reset appearance" clears them. ## Alternatives considered - Picking arbitrary DOM nodes: rejected; selectors are unstable across releases, so saved styles would silently stop applying. - Applying changes immediately: rejected in favor of the Save / Revert draft model the tracker color editor already uses. ## Additional context Interaction model follows the tracker panel's "edit UI" mode: enter a mode, click the thing on screen, edit it, leave the mode. ## Template check - [ ] I DID NOT read this template and provide the requested details. ## Minimal fix Client-only. New: `packages/client/src/lib/ui-style-overrides.ts` (region registry, normalization as the trust boundary for the synced blob, CSS generation with a `:root ` prefix, pick resolver), `packages/client/src/components/layout/UiStyleOverridesInjector.tsx` (style tag + pick overlay, mounted next to `<CustomThemeInjector />` in `App.tsx`), `packages/client/src/components/panels/settings/UiStyleSettings.tsx` (draft editor mirroring `TrackerCardColorSettings.tsx`), `scripts/regressions/ui-style-overrides.regression.ts`. Touched: `stores/ui.store.ts` (persisted+synced `uiStyleOverrides`, transient pick/selection/preview fields, reset wiring, normalize in persist `merge`), `hooks/use-settings-sync.ts` (normalize in `omitLocalOnlySettings`), `SettingsPanel.tsx` (render after App Style), `packages/shared/src/constants/settings-registry.ts` (`ui-element-styles` section), `localization/locales/en.json`. Regression: exact CSS output for a top-bar override; injected color (`red;} body{display:none`) dropped, unknown keys and region ids dropped, `fontSize` clamped; serialization key-order independent; resolver returns `user-message` for a bubble → user row → center chain and `null` for an unmatched chain.
bsakaguchi 2026-11-07 16:43:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#8535
No description provided.