Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 609e0edf60 | |||
| c3e3cc16fd | |||
| 7c476315f5 |
+73
-2
@@ -7,12 +7,83 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Planned — Tier 2 polish (next)
|
### Planned — Future polish
|
||||||
- Light mode support (`prefers-color-scheme` + flipped palette across popup / NewTab / Options)
|
|
||||||
- `.m3u` parser alongside `.pls` to widen future-adapter compatibility
|
- `.m3u` parser alongside `.pls` to widen future-adapter compatibility
|
||||||
- Station artwork lazy-load + fallback to family helmet
|
- Station artwork lazy-load + fallback to family helmet
|
||||||
- Better error UI for failed streams ("Stream unavailable, try another")
|
- Better error UI for failed streams ("Stream unavailable, try another")
|
||||||
- `.crx` packaging instructions in README for sideload users
|
- `.crx` packaging instructions in README for sideload users
|
||||||
|
- Second source adapter stub to exercise the multi-source UI
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [0.5.0] — 2026-06-10 — Light mode + theme toggle + Options back-link
|
||||||
|
|
||||||
|
Second post-launch update, ~36 hours after v0.4.0 cleared the Chrome Web Store. Three bundled improvements, all UX polish:
|
||||||
|
|
||||||
|
### Added — Light mode support across all three surfaces
|
||||||
|
|
||||||
|
**Phase 1 — Auto-follow OS theme.** Each stylesheet (popup, NewTab, Options) gets a `@media (prefers-color-scheme: light)` block that flips the `:root` CSS variables to a light palette while preserving brand identity. Every existing rule using `var(--*)` tokens carries over unchanged.
|
||||||
|
|
||||||
|
Light palette:
|
||||||
|
- `--bg` `#f6f4ed` cream-leaning off-white
|
||||||
|
- `--bg-soft` `#ece5d2` slightly darker for header bars
|
||||||
|
- `--bg-row` `#ddd6c0` hover backgrounds
|
||||||
|
- `--bg-row-hi` `#c8c0a8` active rows
|
||||||
|
- `--fg` `#2a2f28` dark forest-green-leaning text
|
||||||
|
- `--accent` `#2a7d3e` darker brand green (preserves "RangerHQ green" identity)
|
||||||
|
- `--cream` `#b8861a` darker amber (readable on light)
|
||||||
|
- `--danger` `#b53a2b` darker red (readable on light)
|
||||||
|
|
||||||
|
NewTab helmet watermark opacity bumped 0.025 → 0.04 in light mode (helmet contrasts differently on light bg). Wired via a new `--watermark-opacity` CSS variable.
|
||||||
|
|
||||||
|
State pills, primary play button, toasts, and danger button hover all get text-colour overrides for both modes so they stay readable when their background becomes solid accent / cream / danger.
|
||||||
|
|
||||||
|
### Added — Manual Auto / Dark / Light theme toggle (Phase 2)
|
||||||
|
|
||||||
|
**Three-radio group in a new "Appearance" card on the Options page.** Stored in `chrome.storage.local` under `tuner.theme`. Defaults to "auto" (follow OS).
|
||||||
|
|
||||||
|
- **Auto** — follows OS via `@media (prefers-color-scheme: light)` (covers ~95% of users)
|
||||||
|
- **Dark** — forces dark palette regardless of OS
|
||||||
|
- **Light** — forces light palette regardless of OS
|
||||||
|
|
||||||
|
This exists because there are three independent theme layers (OS, browser-chrome, page CSS) that can disagree. `@media (prefers-color-scheme: ...)` reads the OS layer only, NOT the browser-chrome theme. So users with mismatched layers (e.g. macOS light + Chrome dark theme installed) can override the auto-follow.
|
||||||
|
|
||||||
|
Implementation: `data-theme` attribute on `<html>` ( "light" / "dark" / removed for auto). `html[data-theme="..."]` CSS selectors beat both the default `:root` and the `@media :root` on specificity.
|
||||||
|
|
||||||
|
New file: `src/lib/theme.js` — shared `getTheme/setTheme/applyTheme/initTheme` helpers used by all three entry-point scripts.
|
||||||
|
|
||||||
|
The choice syncs across surfaces via `chrome.storage.onChanged`: pick Light in Options → popup + NewTab flip instantly without reload. Theme applies BEFORE first paint (each init() calls `initTheme()` first) so there's no dark flash on light-mode-preferring browsers.
|
||||||
|
|
||||||
|
### Added — Options page → Tuner back-link
|
||||||
|
|
||||||
|
The Options page header (helmet + "RangerHQ Tuner — Options") is now a single clickable anchor pointing at `newtab.html`. Subtle `←` glyph to the left of the helmet; hover shifts the arrow left and tints it accent green. Same-tab navigation — user came IN via Options, goes OUT into the player UI in the same tab. No accumulating Tuner tabs.
|
||||||
|
|
||||||
|
Fixes UX gap David flagged on 2026-06-09 night: *"when i click the settings button i go to settings but we have no back link to radio."*
|
||||||
|
|
||||||
|
### Files touched
|
||||||
|
|
||||||
|
- `src/lib/theme.js` (NEW, ~55 lines)
|
||||||
|
- `src/popup/popup.css` (+50 lines — light + dark override blocks)
|
||||||
|
- `src/popup/popup.js` (+8 lines — initTheme call + storage.onChanged hook)
|
||||||
|
- `src/newtab/newtab.css` (+50 lines — light + dark override blocks)
|
||||||
|
- `src/newtab/newtab.js` (+8 lines — same wiring)
|
||||||
|
- `src/options/options.html` (+24 lines — Appearance card)
|
||||||
|
- `src/options/options.css` (+90 lines — light + dark blocks + radio styling)
|
||||||
|
- `src/options/options.js` (+32 lines — radio handlers + cross-surface sync)
|
||||||
|
|
||||||
|
Total: 8 files, ~340 lines added.
|
||||||
|
|
||||||
|
### Not changed
|
||||||
|
|
||||||
|
- No new permissions
|
||||||
|
- No new host_permissions
|
||||||
|
- No new external libraries
|
||||||
|
- No data migration required
|
||||||
|
- Existing user state (current station / volume / history / favourites) survives intact
|
||||||
|
|
||||||
|
### Reviewer expectations
|
||||||
|
|
||||||
|
Same-account update with no permission change. Same-day review expected (~hours to 24h), similar to v0.4.0's 24h-ish re-review window per [[reference_chrome_web_store_rules]].
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "RangerHQ Tuner",
|
"name": "RangerHQ Tuner",
|
||||||
"version": "0.4.0",
|
"version": "0.5.0",
|
||||||
"description": "Lightweight SomaFM radio player. Logs what plays. One-click search to Spotify, YouTube, Apple Music, Bandcamp. No telemetry.",
|
"description": "Lightweight SomaFM radio player. Logs what plays. One-click search to Spotify, YouTube, Apple Music, Bandcamp. No telemetry.",
|
||||||
"author": "David Keane",
|
"author": "David Keane",
|
||||||
"homepage_url": "https://davidtkeane.com/rangerhq-tuner",
|
"homepage_url": "https://davidtkeane.com/rangerhq-tuner",
|
||||||
|
|||||||
+19
-8
@@ -57,15 +57,26 @@ const CATALOGUE_TTL_MS = 6 * 60 * 60 * 1000;
|
|||||||
|
|
||||||
// Quick-pick stations. These are the SomaFM ids most people start with.
|
// Quick-pick stations. These are the SomaFM ids most people start with.
|
||||||
// If the catalogue is missing any (rare), they're just dropped silently.
|
// If the catalogue is missing any (rare), they're just dropped silently.
|
||||||
|
//
|
||||||
|
// Layout: 14 stations across roughly chill / ambient / indie / lounge /
|
||||||
|
// space / electronic / americana / 80s / alt-rock / celtic — broader
|
||||||
|
// genre coverage than the v0.4.0 list, plus DEF CON Radio (the on-brand
|
||||||
|
// cybersecurity pick) and ThistleRadio (the Dublin-built Irish nod).
|
||||||
const QUICK_IDS = [
|
const QUICK_IDS = [
|
||||||
'groovesalad',
|
'groovesalad', // chill / electronic
|
||||||
'dronezone',
|
'dronezone', // ambient
|
||||||
'indiepop',
|
'indiepop', // indie pop rocks
|
||||||
'secretagent',
|
'secretagent', // lounge / spy
|
||||||
'spacestation',
|
'spacestation', // ambient / space
|
||||||
'lush',
|
'lush', // vocal / chill
|
||||||
'deepspaceone',
|
'deepspaceone', // ambient
|
||||||
'fluid',
|
'fluid', // electronic
|
||||||
|
'defcon', // electronic / hacker culture (DEF CON Radio)
|
||||||
|
'beatblender', // electronic / breakbeat
|
||||||
|
'bootliquor', // americana / outlaw country
|
||||||
|
'u80s', // 80s indie / synthwave (Underground 80s)
|
||||||
|
'bagel', // indie / alt-rock (BAGeL Radio)
|
||||||
|
'thistle', // celtic / folk (ThistleRadio)
|
||||||
];
|
];
|
||||||
|
|
||||||
let stations = [];
|
let stations = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user