Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localized Microsoft Store badge / button (Fixes #14738) #14745

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

alexgibson
Copy link
Member

@alexgibson alexgibson commented Jun 27, 2024

One-line summary

  • Adds a localized badge for linking to Firefox on the Microsoft Store.
  • Adds MS Store URL helper and button macro.
  • Records MS Store badge click events in GA / Glean.

Issue / Bugzilla link

#14738

Testing

Add the following code to any template to render the badge:

{% from "macros.html" import ms_store_button with context %}

{% set ms_store_href = ms_store_url(product='firefox') %}
{{ ms_store_button(href=ms_store_href) }}

You can also point to Firefox Beta on the Ms Store using:

{% set ms_store_href = ms_store_url(product='firefox_beta') %}
{{ ms_store_button(href=ms_store_href) }}

A campaign ID can be added as an optional parameter:

{% set ms_store_href = ms_store_url(product='firefox', campaign='firefox-all') %}
{{ ms_store_button(href=ms_store_href) }}

Finally, the installer mode can be changed (defaults to direct)

{% set ms_store_href = ms_store_url(product='firefox', mode='full') %}
{{ ms_store_button(href=ms_store_href) }}
@alexgibson alexgibson added P2 Second level priority - Should have Needs Review Awaiting code review Review: XS Code review time: up to 30min labels Jun 27, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.29%. Comparing base (7babc30) to head (068ab11).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14745      +/-   ##
==========================================
+ Coverage   77.27%   77.29%   +0.02%     
==========================================
  Files         160      160              
  Lines        8273     8281       +8     
==========================================
+ Hits         6393     6401       +8     
  Misses       1880     1880              

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

@alexgibson
Copy link
Member Author

Thanks both for these suggestions, will follow up shortly 👍

@alexgibson
Copy link
Member Author

Updated helper with suggestions (thanks @robhudson!) and also optimized SVGs (thanks @janbrasna!)

Copy link
Member

@craigcook craigcook left a comment

Choose a reason for hiding this comment

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

LGTM! r+ 🦡

I kinda wish it was the same size and shape as the iOS and Android badges, but presumably their brand guidelines won't let us change it (and it won't appear alongside those badges anyway... unless MS brings back WinCE).

@craigcook craigcook merged commit 861735c into mozilla:main Jul 11, 2024
6 checks passed
@janbrasna
Copy link
Contributor

@craigcook This is how they present it (not) "side by side":

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review Awaiting code review P2 Second level priority - Should have Review: XS Code review time: up to 30min
5 participants