Skip to content

Firefox-first UX pass: instant render, UI scale, branding, empty state, resizable panel - #1

Merged
ridaken merged 1 commit into
mainfrom
feat/firefox-first-ux
Jun 25, 2026
Merged

Firefox-first UX pass: instant render, UI scale, branding, empty state, resizable panel#1
ridaken merged 1 commit into
mainfrom
feat/firefox-first-ux

Conversation

@ridaken

@ridaken ridaken commented Jun 25, 2026

Copy link
Copy Markdown
Owner

A Firefox-first UX pass plus CI/CD. Firefox is the primary target; Chrome builds are maintained alongside.

What's included

1. Instant options/popup render

The 1–2s delay traced to the dev runner (unminified React + Tailwind recompiled per page open), not bundle size (bundles are small). To make first paint instant regardless, inline critical theme CSS in options/index.html and popup/index.html so the correct themed surface paints before the stylesheet + React bundle resolve — no white/blank flash. README documents loading the optimized build as a temporary add-on to judge real speed.

2. UI text/icon scale (auto + manual)

New textSize setting (auto / default / large / larger), defaulting to auto, which enlarges on >1080p displays (e.g. 1440p). Driven by one --g-scale variable. Panel sizing moved to em by scoping Tailwind's --spacing and --text-* to .glance-root — so everything scales uniformly and stops leaking the page's root font-size inside the content-script Shadow DOM (a latent bug). Added under Options → Appearance → Text size.

3. Brand icon

Replaced the default WXT puzzle piece with a Glance mark (assets/logo.svg): an orange tile + magnifier with "context lines". scripts/generate-icons.mjs (sharp, npm run icons) rasterizes the PNG set. A Logo component carries the branding into the popup, options, and empty state.

4. Branded empty state

The previously blank flyout now shows the logo + tagline, recent searches as clickable chips (reusing stored history), and shortcut tips. Shows a "No matches for …" line on empty results.

5. Resizable, persisted panel

Drag the panel's left edge to resize; width is clamped (320 → min(900, 90% viewport)) and persisted to sync settings, so it carries across sessions. Page-push reflow tracks the drag live, and the scrollbar marker rail follows the new width.

CI/CD

  • ci.yml — typecheck, vitest, and both browser builds on PRs/pushes.
  • release.yml — zips Chrome + Firefox packages and attaches them to GitHub releases (no store credentials needed).

Testing

  • npm run compile, npm test (46 pass — added resolveScale/clampPanelWidth/width tests), npm run build, npm run build:firefox all green.
  • Recommended manual check (Firefox first): npm run build:firefox → load .output/firefox-mv2/manifest.json via about:debugging, then verify instant render, larger default text on 1440p, the new icon, the empty state, and drag-resize persistence across a restart.

🤖 Generated with Claude Code

…e, resizable panel

- Instant first paint: inline critical theme CSS in options/popup index.html so the
  correct surface paints before the stylesheet + React bundle resolve (no flash).
- UI text/icon scale: new `textSize` setting (auto/default/large/larger), defaulting
  to enlarge on >1080p displays. Driven by a single `--g-scale` var; panel sizing
  moved to `em` (via `--spacing`/`--text-*` overrides scoped to `.glance-root`) so it
  scales uniformly and no longer leaks the page's root font-size inside the Shadow DOM.
- Brand icon: assets/logo.svg + scripts/generate-icons.mjs (sharp) replacing the
  default WXT puzzle piece; Logo component used in popup, options, and empty state.
- Branded empty state: logo, recent searches as clickable chips, and shortcut tips
  fill the previously blank flyout; "No matches" line on empty results.
- Resizable panel: left-edge drag handle, width clamped and persisted to sync
  settings; page-push and scrollbar markers are now width-aware.
- CI/CD: ci.yml (typecheck, tests, both builds) and release.yml (zip artifacts on
  release); README CI badge + dev-perf note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ridaken
ridaken merged commit c8beab9 into main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant