42 lines
2.0 KiB
Markdown
42 lines
2.0 KiB
Markdown
# Inline Subreddit Color Popover — Design, Plan & Implementation
|
|
|
|
**Date:** 2026-08-26
|
|
**Task:** Design, plan, and implement an inline color-override popover for subreddit badges, allowing users to set per-subreddit colors directly on the page.
|
|
|
|
## Changes Made
|
|
|
|
### Commits (6bf7935..210676e)
|
|
|
|
1. **`af7afde`** — feat: mode-aware subreddit color overrides with v1→v2 migration
|
|
- `lib/settings.js`: migration logic for `subredditColors` schema
|
|
- `content/tweaks/badges.js`: mode-aware `applyColorsToContainer()`, `data-rt-subreddit` attribute, exported `isDarkMode`/`getColorPrefix`
|
|
|
|
2. **`1da061f`** — feat: gear icon on subreddit badges and popover CSS
|
|
- `content/tweaks/badges.js`: gear icon injection in `processPost()`
|
|
- `content/styles/badges.css`: full replacement with gear styles, popover styles, `filter: brightness()` hover
|
|
|
|
3. **`4385cc1`** — feat: inline color popover with mode toggle, live preview, and save/reset
|
|
- `content/tweaks/color-popover.js`: new file — all popover logic
|
|
- `manifest.json`: added color-popover.js to content scripts
|
|
|
|
4. **`565f039`** — feat: popup per-subreddit overrides with mode-aware light/dark toggle
|
|
- `popup/popup.html`, `popup/popup.js`, `popup/popup.css`: mode-aware override UI
|
|
|
|
5. **`dd92ce8`** — fix: subreddit entry flex layout for stacked mode-aware structure
|
|
- `popup/popup.css`: `flex-direction: column` on `.subreddit-entry`
|
|
|
|
6. **`210676e`** — fix: only persist edited/existing mode overrides, refresh popover theme on dark mode toggle
|
|
- Dirty-mode tracking in popover and popup
|
|
- Popover theme refresh on dark mode toggle
|
|
- Popup partial override corruption fix
|
|
|
|
### Docs
|
|
|
|
- Design spec: `docs/superpowers/specs/2026-08-26-inline-color-popover-design.md`
|
|
- Implementation plan: `docs/superpowers/plans/2026-08-26-inline-color-popover.md`
|
|
|
|
## Follow-up
|
|
|
|
- Manual testing via `about:debugging` against the 20-item test checklist in the spec
|
|
- Known minor items: popover arrow doesn't flip, gear is mouse-only, no async error handling on save/reset
|