Skip to content

fix: misc website fixes — decrypt UX, dark-mode, QR popup width#213

Merged
rubenhensen merged 9 commits into
mainfrom
fix/website-misc-fixes
May 12, 2026
Merged

fix: misc website fixes — decrypt UX, dark-mode, QR popup width#213
rubenhensen merged 9 commits into
mainfrom
fix/website-misc-fixes

Conversation

@rubenhensen

Copy link
Copy Markdown
Contributor

Summary

Collection of small website fixes bundled together:

  • Decrypt fallback UX: mobile-friendly upload affordance with the desktop-only banner hidden on small screens; theme-aware plain-text rendering that leaves HTML emails alone; single-screen list/reader flow on mobile; anchored mobile flex heights with the left-border accents removed; plain-text emails now render in monospace.
  • Dark mode: improved email body legibility and a cross-subdomain visited flag fix.
  • Cookie migration revert: drop the pg_visited cookie migration (move pg-visited to cookie so it van be used over multiple tlds #208).
  • Typography token cleanup: define a semibold token and consolidate font-weight-semibold into font-weight-medium.
  • Filesharing popup: constrain the Yivi Sign & send QR popup to the QR width — it referenced an undefined --popup-width and was stretching to fit the unwrapped instruction text.

Test plan

  • Decrypt page renders correctly on mobile (list ↔ reader flow, upload affordance visible, no desktop-only banner)
  • Plain-text and HTML emails render correctly in both light and dark themes
  • Sign & send QR popup on desktop is sized to the QR + tight padding (not stretched wide)
  • Header, marketing pages, addons, and blog pages render unchanged

- EmailView: render decrypted email in a forced light-themed iframe so
  emails that hardcode dark text on no background stay legible when the
  host page is in dark mode (#159).
- Marketing page: store the returning-visitor flag in a cookie scoped to
  the registrable domain so it carries across postguard.eu subdomains
  instead of being trapped per-origin in localStorage (#208).
Previously the iframe forced a light surface unconditionally. That fixed
the original dark-mode bug for HTML emails (which set their own dark
text on no background), but it also overrode the site theme for plain-
text emails — leaving them stuck in light mode forever.

- HTML emails: don't touch the styling. Email designs are self-contained.
- Plain-text emails: wrap the text in <pre> and inject body styles that
  follow the host theme (background, color, color-scheme), reactively
  switching when the user toggles the theme via a MutationObserver on
  the <html> class.
…nner

On mobile the "install Thunderbird/Outlook extension" banner is
irrelevant, and the dashed "drop the postguard.encrypted file here" zone
implies a drag-and-drop interaction that isn't available on touch.

- Hide the extension banner under 768px.
- Restyle the upload label as a solid primary button on mobile and swap
  its text to "Upload \"postguard.encrypted\"" so it reads as a tappable
  action rather than a drop target. The underlying <input type="file">
  already opens the native picker on tap.
- Add the new fallback.upload i18n key in EN and NL.
On a phone the side-by-side panels squeezed both lists and the email
view into ~40vh slices. Switch to a phone-style two-step flow instead.

- Inbox view: full-screen panel with search/cog at the top, email list
  filling the middle, and the upload button pinned to the bottom (via
  flex order — desktop layout is unchanged).
- Reader view: clicking an email or hitting Decrypt swaps to a
  full-screen right panel with a "Back to inbox" button up top.
- "Back" resets currSelected and hashMode so the effect collapses
  currRight back to Nothing, restoring the list view.
- Add fallback.back i18n key in EN and NL.
…ents

- decrypt mobile: anchor .fallback-page to the viewport height and add
  min-height:0 + explicit flex bases to the panel/list chain so the
  email list can shrink instead of growing to fit content and pushing
  the upload button below the fold.
- ListView: replace the 3px left-border selected accent with a solid
  primary-coloured background and white text — clearer affordance and
  drops the "AI-template" stripe look.
- Addons callout: drop the left-border stripe in favour of a full
  bordered, slightly muted amber card.
Cookies cannot be shared across different registrable domains (e.g.
postguard.eu ↔ postguard.nl), so the cookie-scoped flag only solved
the subdomain case — which already worked well enough via the
existing localStorage approach for our deployed surfaces. Cross-TLD
sharing would require either consolidating to a single canonical
domain or a third-party tracker iframe, neither of which is in scope.
Revert to localStorage and close #208.
Two notes from the dobby review.

- Define --pg-font-weight-semibold in global.scss. It was referenced in
  five places (Header, marketing root, marketing layout, blog post page,
  and the new .mobile-back button) but never declared, silently falling
  back to 400. Mapping it to 600 matches the existing --medium token.
- Switch the plain-text email <pre> to a monospace face. text/plain
  bodies routinely rely on column alignment (ASCII tables, quoted
  replies with leading '>', signatures), which broke under system-ui.
  Drop the font-family from <body> so it doesn't shadow the <pre>.
…edium

Both pointed at 600, so there were two tokens for one value. Drop the
just-added --pg-font-weight-semibold and migrate the existing five
callers (Header, marketing root + layout, blog post page, decrypt
.mobile-back) to --pg-font-weight-medium.
The desktop Sign & send popup referenced an undefined --popup-width
variable, so it fell back to auto and stretched to fit the unwrapped
instruction text. Cap width to the QR (330px) plus tight padding and
let the text wrap.
@rubenhensen rubenhensen merged commit 2db2dcf into main May 12, 2026
6 checks passed
@rubenhensen rubenhensen deleted the fix/website-misc-fixes branch May 12, 2026 14:05
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