feat(ext): theme options page + finish popup save UX (#42, #43, #44)#49
Merged
Conversation
#44: theme the options page to the @gitmarks/web palette (ink bg, cyan accents, magenta heading, mono font) — matching the popup restyle from PR #48. Source of truth is extension-shared/src/options.html; the shells regenerate their ignored copies via copy-html.mjs. #42: add a one-line helper under the "Strip tracking parameters" checkbox explaining *why* you'd enable it (same article from two sources collapses to one bookmark), and mirror that framing in the Chrome README. #43: the popup save button no longer sticks on "saving…" with a progress cursor after a successful save. Extract the success/failure transition into a side-effect-free lib module (save-result-view.ts) so it's unit testable without the popup entry's top-level DOM bootstrap; on success it relabels to "Saved ✓", adds a `done` class that cancels the progress cursor, and keeps the ~1.2s auto-close. Adds save-result-view.test.ts (2 cases, fake timers). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #42, closes #43, closes #44.
Follows PR #48 (which restyled the popup and added the save auto-close). This finishes the extension-UI polish cluster.
#44 — options page theming
The options page was still light-themed (
#fafafa/#1a1a1a) while the popup and web UI are dark cyan/magenta. Themedoptions.htmlto the@gitmarks/webpalette pulled fromtailwind.config.ts(ink#0a0a0fbg,#16161einputs, cyan#22d3eefocus/buttons, magenta#e879f9heading, mono font). Hand-ported the token set per the issue's preferred option (1) — no Tailwind, no token package yet.#42 — strip-tracking help text
Added a
<p class="hint">under the checkbox explaining why you'd turn it on (a link shared from two sources collapses to one bookmark instead of two), and mirrored that framing in the Chrome README.#43 — popup save button stuck on "saving…"
The success branch previously only set the status text, leaving the button
disabledwithcursor: progressuntil the user clicked away. Now on success it relabels to "Saved ✓" and adds adoneclass that cancels the progress cursor, while keeping the ~1.2s auto-close (the maintainer's preferred fix from the issue). Extracted the transition into a side-effect-freesave-result-view.tsso it's unit-testable without the popup entry's top-level#rootbootstrap —save-result-view.test.tscovers both branches with fake timers (asserts auto-close fires once after the delay, and never on failure).Notes
extension-shared/src/; the shell copies are gitignored and regenerated bycopy-html.mjs.Verification
extension-sharedtests: 106 pass (104 + 2 new)extension-sharedtypecheck: cleanextension-chrome+extension-firefoxbuilds: clean, HTML regenerated🤖 Generated with Claude Code