Skip to content

fix: #5726 make homepage downloads platform and chip aware - #5911

Merged
Jocs merged 1 commit into
developfrom
codex/5726-homepage-downloads
Oct 27, 2026
Merged

Jocs merged 1 commit into
developfrom
codex/5726-homepage-downloads

Conversation

@Jocs

@Jocs Jocs commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Closes #5726

Summary

The homepage download buttons currently send visitors to GitHub Releases, where they have to find the right installer themselves. This change lets visitors download the correct build directly from the homepage.

  • Detect the desktop OS and, when the browser provides reliable information, its chip architecture. Keep the Hero button to one line, such as Download for macOS. When the chip is unknown, scroll to that platform's download card; unknown or mobile systems open the complete download section.
  • Provide macOS, Windows, and Linux cards with Apple Silicon / Intel or x64 / Arm64 downloads, alternate package formats, installation help, and release links. Highlight the detected OS and recommended installer, and keep Homebrew instructions inside the macOS card.
  • Generate versioned links only for published release assets. Refresh the release version and asset list together during the existing build update, preserving the last verified snapshot if GitHub is unavailable.

Scope is the website homepage and its supporting data/tests. README is unchanged.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change)
  • Documentation update

Test plan

  • Added automated coverage for OS/chip detection, missing or denied client hints, mobile/unknown platforms, published download URLs, SSR fallback, and release snapshot consistency (13 tests including the existing project-info suite).
  • Manually tested on macOS Chrome, including Apple Silicon detection, desktop and 390px layouts, and light/dark themes.
  • pnpm run lint (passes with existing desktop warnings)
  • pnpm run typecheck
  • pnpm --filter marktext-website lint
  • pnpm --filter marktext-website type-check
  • pnpm --filter marktext-website test:downloads
  • pnpm --filter marktext-website test:project-info
  • pnpm -C packages/website exec next build

Notes for reviewers

Browsers that cannot reliably identify the chip, including Safari on macOS, retain an explicit choice of installers. The visible button text does not include the architecture.

Screenshots

downloads-desktop

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@github-actions

Copy link
Copy Markdown
Contributor

Website preview ready: https://pr-5911-marktext-website.ransixi.workers.dev

Built from 00d5132425523b02f1ef1d008a034c50278a3f89 · Worker: marktext-website · Version: a86b3a07-5eda-460b-91a6-8ef80ad08694 · Alias: pr-5911

@github-actions

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5911:

Run: https://github.com/marktext/marktext/actions/runs/40486754379

Artifact Size Link
marktext-windows-arm64 327.3 MB Download
marktext-linux-x64 729.4 MB Download
marktext-macos-arm64 320.8 MB Download
marktext-windows-x64 335.4 MB Download
marktext-macos-x64 332.4 MB Download
marktext-linux-arm64 571.7 MB Download

@Jocs
Jocs merged commit c4b8cda into develop Oct 27, 2026
14 checks passed
Zane-0x5a added a commit to Zane-0x5a/marktext that referenced this pull request Oct 27, 2026
Brings in v0.22.0 and v0.23.0 and the start of 0.24.0: Electron 45,
GitHub Alerts, foldable headings, per-tab reading mode and --read-only,
the docked document outline, multiple folder roots, preview tabs, recent
files in quick open, Italian, and the large-document fixes of marktext#4942 and
marktext#5863.

Conflicts:

- muya state/inlineRenderer: marktext#4942 caches reference definitions per
  candidate state, which supersedes the fork's per-revision cache. Took
  upstream's; the fork's display math cache in mathPreview stays.
- editor.vue: kept the fork's deferred content snapshot (no getState()
  deep clone per keystroke), document virtualization and camera, on top
  of upstream's reading mode, shortcut resolvers and image drop. The
  json-change handler keeps upstream's loadingContent/readOnly guard,
  the source handoff and reload take upstream's loadingContent blocks,
  and scrollToHeader reveals folded headings before following the
  target. publishContentChange uses getSelectionState().
- Print/PDF: the fork's paged preview replaces MarkdownPrint and the
  printToPDF export path, so printService, its specs and the pdf branch
  of handleResponseForExport keep the fork's side. marktext#3323 moved image
  resolution into the engine; exportHtml drops its own image rewrite and
  keeps the fork's rendered-heading TOC.
- marktext#5802's assertExportDestination moves to main/filesystem so Save PDF in
  the preview refuses the source document too.
- syntheticHistory keeps the 53-bit cyrb53 hash over upstream's BigInt
  FNV-64 (~6 ms per key on a 500 KB note); the store keeps isSameList
  and drops deep-equal.
- Sidebar rows keep draggable alongside preview tabs; locales keep both
  printPreview and readingMode, and it.json gets the printPreview strings.

Merge adjustments:

- SET_READ_ONLY publishes the pending snapshot first: a read-only tab
  drops content changes, so an edit made within 150 ms of entering
  reading mode would otherwise be missing from the tab.
- marktext#5798 moved notices to the bottom-right corner, over the preview's
  Save PDF and Print buttons, and an export notice stays while hovered.
  The preview lifts notices clear of its actions while it is open.
- Specs: the docked outline is expanded by default and narrows the
  column, so the virtualization specs open it only when it is closed,
  measure the settled position and place their target inside the
  viewport. The camera specs press Control once before measuring,
  because since marktext#5878 the first key press re-renders the caret's heading
  with its marks shown.

Verified on Windows 11 (175%): typecheck, lint, the desktop unit suite
(1467) and the muya unit suite (3978) pass. In background windows the
e2e suite (514 passed, 45 failed) fails only where a build of
upstream/develop fails on this machine too (copy-anchor-link,
document-outline, image clipboard/relative path, 5394, 5685,
toc-active-heading, outline-layout, ...: 56 cases in 19 specs there),
plus media-viewer cases that flake on both when the 1 px image's resize
bar takes the click. print-preview, export-pdf, document-virtualization
and sidebar-file-drag pass, and editor-camera passes on screen.
reading-mode:54 needs the camera focus fix in the next commit.
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.

[Feature] "Download the app" needs a better UI/UX

1 participant