Commit Graph

17 Commits

Author SHA1 Message Date
00507fe87c refactor: decompose CSS, unify dark mode, extract shared modules
Structural cleanup based on thermo-nuclear code quality review:
- Extract shared color-picker.css and color-popover.css from badges.css (611→85 lines)
- Extract shared lib/presets.js for preset CRUD used by popup and popover
- Unify dark mode to single applyDarkModeClass on <html>, removing 4 scattered functions
- Fix stale closure in startPostObserver, data-driven reload key check
- Remove dead exports, getHelpers wrapper, duplicated colorToHex
- Replace DOM expando properties with state array in popup.js

Net: -318 lines of duplication, no file over 401 lines.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 01:39:25 -04:00
a13eca930c feat: card UI polish — voting pill, rank badge, selection, density
Rework card layout from flex to block flow for sidebar compatibility.
Add voting pill capsule with voted-state tinting (orange/purple),
rank badge watermark, custom rt-selected selection system replacing
Reddit/RES classes, density-responsive border radius, bold titles,
and comprehensive dark mode variants for all interactive states.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 15:55:10 -04:00
5521e39a66 feat: add card layout tweak with unified post observer
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:14:06 -04:00
7ac47b5c3c refactor: extract isDarkMode/getColorPrefix to settings.js as shared utilities
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:09:03 -04:00
48db2fc70e feat: add color presets + fix badge hover effect
- Add global color presets: save/apply/delete sets of {bg, border, text}
  colors as reusable presets, shown as mini badges in their own colors.
- Popover: preset badges under preview with + to save, click to apply,
  × on hover to delete.
- Popup: dedicated Color Presets section with same functionality,
  applying to light subreddit badge colors.
- Storage: colorPresets array added to settings defaults.
- Fix badge hover: change brightness(0.9) to brightness(1.1) so hover
  brightens (activates) instead of dimming.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 18:00:54 -04:00
fb0c03d46a fix: switch popover back to position:absolute with dynamic max-height
position:fixed pinned the popover to the viewport layer, so scrolling
the page could never reveal off-screen content. Revert to absolute
positioning (scrolls with the page) and dynamically compute max-height
based on available viewport space so the popover fits and scrolls
internally when content exceeds the available area.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:42:51 -04:00
d5f8c2e480 fix: stabilize popover positioning and prevent viewport overflow
- Switch popover from position:absolute to position:fixed to avoid
  scroll-offset math and simplify viewport clamping.
- Add max-height + overflow-y:auto so the popover scrolls internally
  instead of overflowing the viewport.
- Remove the reposition call after picker opens — this was causing
  the popover to flash and jump when the picker changed its height.
- Improve edge clamping: if neither above nor below fits, clamp to
  viewport bottom rather than flipping unpredictably.
- Remove the CSS arrow (::before) which was mispositioned when the
  popover appeared above the badge or near edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:26:12 -04:00
84621484da fix: reposition popover after picker opens, debounce popup saves
- Popover: call positionPopover() after opening the picker so the
  popover flips above the badge if it would clip the viewport bottom.
- Popup: debounce saveFromControls() calls during picker drag (200ms)
  to avoid dozens of storage writes per gesture.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:20:37 -04:00
d26f133efb feat: integrate tabbed color picker into inline popover
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:14:02 -04:00
a3567005bd feat: add tabbed color picker widget (palette, named colors, custom HSV)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:11:53 -04:00
210676e65b fix: only persist edited/existing mode overrides, refresh popover theme on dark mode toggle
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:11:24 -04:00
4385cc1c28 feat: inline color popover with mode toggle, live preview, and save/reset
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:04:48 -04:00
1da061f12d feat: gear icon on subreddit badges and popover CSS
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:02:57 -04:00
af7afde592 feat: mode-aware subreddit color overrides with v1→v2 migration
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 16:00:52 -04:00
cca7940dd9 fix: subreddit badge fill, tagline 'to' cleanup, and comments li spacing
- Default subreddit badge background from transparent to opaque fill
  (light: #fde8e0, dark: #3d2518) so page highlights don't bleed through
- Remove lingering "to" text node from tagline when subreddit is hidden
- Hide the <li> wrapping the comments link (not just the <a>) to
  eliminate leftover whitespace in the flat-list
- Simplify popup: subreddit bg fields are now color pickers (no longer
  need transparent text-input workaround)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:32:33 -04:00
6cedae7a2c feat: badge DOM manipulation with MutationObservers and dark mode detection
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 15:00:49 -04:00
ddc47bfdcc feat: extension skeleton with manifest, settings module, and placeholder icons
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 14:57:11 -04:00