Skip to content

Add desktop QR-code button to iOS download page - #1654

Open
slightlyoffbeat wants to merge 4 commits into
mainfrom
danb/iosbutton
Open

Add desktop QR-code button to iOS download page#1654
slightlyoffbeat wants to merge 4 commits into
mainfrom
danb/iosbutton

Conversation

@slightlyoffbeat

Copy link
Copy Markdown
Contributor

One-line summary

Add a desktop-only QR-code button to the iOS download page so visitors who can't install from the App Store link can scan to get Firefox on their phone.

Significant changes and points to review

  • cms/download_page.html (iOS branch only) — This is the main change and the thing to review. The page is shared by all six platform download pages; the change is scoped strictly to the page.platform == "ios" branch. Desktop visitors (windows/osx/linux) now see a "Get it for mobile" button that opens a QR-code modal (fl-dialog); everyone else (ios/android/other) still gets the existing App Store button. Show/hide is the existing conditional-display CSS mechanism keyed off the platform class site.js puts on <html> — both buttons render in the HTML and CSS gates visibility. No new JS/CSS: the modal reuses the Flare dialog (setupDialogs) and QR (qrcode_rounded) already loaded via base-flare.html.
  • Strings — New l10n/en/cms/download.ftl (download-get-it-for-mobile, download-scan-to-get) in the CMS Fluent namespace (scoped to CMS locales), wired via DownloadPage.ftl_files.
  • ⚠️ WIP — placeholder QR. The QR currently encodes the same App Store URL as the button, so scans aren't independently trackable, and it only routes to iOS. Before launch we need to finalize (1) the destination (device-aware /browsers/mobile/ page vs. App Store deep-link) and (2) a QR-specific tracking token. Marked with a TODO (WIP) in the template. Please don't merge until that's resolved.

Testing

  1. Run locally and visit /download/ios.
  2. Desktop: confirm you see the "Get it for mobile" button; click it and confirm the QR-code modal opens and closes.
  3. Simulate other platforms without a device — in DevTools, select the <html> element and edit its class:
    • ios → App Store button shows, QR button hidden.
    • windows / osx / linux → QR button shows, App Store hidden.
    • android / other → App Store button shows (fallback).
  4. Confirm the modal heading reads "Scan to download Firefox on your mobile device" (no "iOS").
  5. Confirm the other platform pages (/download/, /download/android, etc.) are unchanged.

Desktop visitors to /download/ios can't install from the App Store
link, so show a "Get it for mobile" button that opens a QR-code modal
instead. iOS/Android/other visitors still get the App Store button.

QR is a placeholder (WIP): it encodes the App Store URL for now;
destination and unique tracking token to be finalized before launch.
@slightlyoffbeat
slightlyoffbeat marked this pull request as ready for review August 7, 2026 02:59
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (ed6d12d) to head (ab6542d).
⚠️ Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1654      +/-   ##
==========================================
+ Coverage   88.15%   88.43%   +0.28%     
==========================================
  Files         167      171       +4     
  Lines       11600    12093     +493     
==========================================
+ Hits        10226    10695     +469     
- Misses       1374     1398      +24     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@knowler knowler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to #1699 (comment), I think we we should include a link alternative for the QR code, since that’d better serve screen reader and keyboard users.

Comment on lines +80 to +87
<include:button
extra_classes="fl-dialog-trigger fl-store-button"
label="{{ ftl('download-get-it-for-mobile') }}"
analytics_text="Get it for mobile"
analytics_position="download-intro"
analytics_id="ios-qr-modal"
data_target_id="ios-qr-modal"
/>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a device-mobile icon to this button as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

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.

2 participants