Repository navigation
Consent approval & spend window UX: approve-once, rich event previews, and keyboard/layout polish - #41
Merged
Conversation
…previews, keyboard & layout polish
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.
Summary
Upgrades the signing approval prompt (
popup/approve.*) and polishes the sidestr spend window (popup/spend.*) for clearer consent decisions, better ergonomics, and reliable cleanup.Signing Approval Prompt (
popup/approve.*,src/event-preview.js,src/background.js)Always trust this sitecheckbox that dynamically switches the action button between Approve & trust (trust: true) and Approve once (trust: false), letting users approve a single request without granting permanent silent signing/decryption access. Backward-compatible whentrustis omitted.src/event-preview.jsto surface plain-English event kind labels (Public note,Relay authentication,HTTP / Solid authentication, etc.) along with key tags (u,method,relay) and content — replacing the bare tag count — plus a collapsibleRaw payloadinspector.Approvewith a trust-blue button while keepingDenyautofocused on the left, paired with a brief350msanti-clickjacking grace delay beforeApproveenables.100%width and a sticky bottom footer so Deny/Approve and countdown are never pushed below the fold.Escapekey immediately denies and closes.requestAnimationFramecountdown loop with a lightweight250mstimer and fixes WCAG AA label contrast (--text-faint→--text-muted).windowIdinsrc/background.jsand denies immediately inchrome.windows.onRemovedif the window is closed abruptly withoutbeforeunload.Sidestr Spend Window (
popup/spend.*)100%body width to avoid horizontal scrollbars inside the440pxpopup window on Windows/Linux.Escapekey rejects/closes from opt-in, review, failure, or signed screens; adds an explicitClosebutton on the signed confirmation card.#sign/#ackafter clicking Forget the old signer.'en-GB'and improves pending-step contrast.Testing
npm run buildnpm test(249/249 passing, includingtest/event-preview.test.jsand newconsent-approval.test.jscases for approve-once andwindows.onRemoved)npm run lint+npx eslint popup/