Skip to content

fix(settings): simplify preview styling and stabilize math fonts - #281

Merged
ThisIs-Developer merged 4 commits into
mainfrom
fix/preview-appearance-settings
Oct 18, 2026
Merged

ThisIs-Developer merged 4 commits into
mainfrom
fix/preview-appearance-settings

Conversation

@ThisIs-Developer

@ThisIs-Developer ThisIs-Developer commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #278. Preview settings now use five compact controls under Workspace settings → Preview Styling. The separate navbar icon is removed, and math stays usable when an optional font is slow, unavailable, or superseded by a newer selection.

Changes

  • Replace the verbose library names, field descriptions, and repeated icons with short labels: Code theme, Math font, Diagram theme, Diagram style, and Emoji skin tone. Preserve every existing option, automatic saving, and Reset.
  • Use compact rows on desktop and stacked controls on mobile. Preserve keyboard focus trapping and return focus to the Settings/menu button when the dialog closes.
  • Reuse the Share Snapshot/Live Share footer and button sizing, padding, and rounded corners. Reset uses the shared red action style; Done uses the standard dialog style. The Settings entry is named Preview Styling, with the subtitle Customize preview elements. Its lucide lucide-wand-sparkles SVG is included in the bundled icon stylesheet for web and desktop.
  • Fix the three outstanding math-font lifecycle issues:
    1. Editing during a saved-font download: start with bundled Modern and preserve the initializing MathJax runtime.
    2. Overlapping font selections: share pending downloads and let only the latest request update the renderer, including when an older request fails.
    3. Failed downloads and Reset: keep Modern available, allow Reset during loading, remove failed script elements, and support retrying the same font.
  • Keep font classes, WOFF URLs, and dynamic glyph paths synchronized. Optional theme/font downloads no longer delay workspace readiness.
  • Mirror the web changes into desktop resources, translate the new labels in all 15 catalogs, and update the configuration guide, terminology glossary, changelog, and test documentation.

Preferences continue to use mdv.visualSettings.v1. Optional theme/font assets can still require a network connection, including on desktop.

Validation

  • npm run build — passed.
  • npm run test:unit — 40 passed.
  • Full Chromium suite — 324 passed initially. Corrected one stale mobile-menu assertion; that test and three storage/Live Share tests that timed out all passed in a focused single-worker rerun. All 328 tests therefore passed across the full run and rerun; the initial run was not entirely green.
  • Cross-browser smoke suite — 12 passed across Chromium, Firefox, and WebKit.
  • Real MathJax regression coverage uses locked local packages and controlled download timing/failures.
  • Browser checks: all 10 math fonts rendered five equations live and after reload; a separate Reset check restored all five equations in Modern without errors.
  • UI checks at 1280, 375, and 320px widths in light/dark appearances; keyboard focus and all 15 interface languages checked.
  • Locale audit — 15 catalogs × 1,226 matching keys. Desktop preparation, final static checks, and mirrored-script/style comparisons passed.

The final footer/icon adjustment passed the two focused UI specifications and direct browser comparisons against Share Snapshot and Live Share at desktop/mobile sizes in both themes. Button heights match at 32px on desktop and 44px on mobile; icon masks render, Reset works, and focus returns correctly. The full-suite results above are from the preceding implementation commit. The final label/icon update also passed desktop/mobile browser checks in light and dark themes, the 15-locale audit, desktop preparation, and static checks. The screenshots below reflect the current labels and controls.

Screenshots

Desktop Mobile
Preview Styling on desktop Preview Styling on mobile

@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
markdown-viewer Ready Ready Preview Oct 18, 2026 6:49am UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e5ba5c
Status: ✅  Deploy successful!
Preview URL: https://30095abf.markdownviewer.pages.dev
Branch Preview URL: https://fix-preview-appearance-setti.markdownviewer.pages.dev

View logs

@ThisIs-Developer ThisIs-Developer changed the title fix(settings): simplify preview appearance and stabilize math fonts fix(settings): simplify preview styling and stabilize math fonts Oct 18, 2026
@ThisIs-Developer
ThisIs-Developer merged commit b1bc1b8 into main Oct 18, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2e5ba5c8 Deployed Oct 18, 2026 by vercel[bot]
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