From 9675eda2fa26d54e6b457e5bb595126437ede018 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Wed, 8 May 2019 23:36:32 +0000 Subject: [PATCH] Bug 1546980 - Add ratings and user counts to discopane r=mstriemer,flod Differential Revision: https://phabricator.services.mozilla.com/D29481 --HG-- extra : moz-landing-system : lando --- .../en-US/toolkit/about/aboutAddons.ftl | 4 ++++ .../extensions/content/aboutaddons.css | 8 +++++++ .../extensions/content/aboutaddons.html | 4 ++++ .../mozapps/extensions/content/aboutaddons.js | 21 ++++++++++++++++++- .../extensions/content/rating-star.css | 4 ++++ .../browser/browser_html_discover_view.js | 20 ++++++++++++++++++ 6 files changed, 60 insertions(+), 1 deletion(-) diff --git a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl index 660f2f251141..d44e92e58a31 100644 --- a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl +++ b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl @@ -367,6 +367,10 @@ privacy-policy = Privacy Policy # Variables: # $author (string) - The name of the add-on developer. created-by-author = by { $author } +# Shows the number of daily users of the add-on. +# Variables: +# $dailyUsers (number) - The number of daily users. +user-count = Users: { $dailyUsers } install-extension-button = Add to { -brand-product-name } install-theme-button = Install Theme # The label of the button that appears after installing an add-on. Upon click, diff --git a/toolkit/mozapps/extensions/content/aboutaddons.css b/toolkit/mozapps/extensions/content/aboutaddons.css index d96da4a22f6d..9f02f64dc990 100644 --- a/toolkit/mozapps/extensions/content/aboutaddons.css +++ b/toolkit/mozapps/extensions/content/aboutaddons.css @@ -157,6 +157,14 @@ recommended-addon-card .addon-description:not(:empty) { font-weight: normal; } +.disco-description-statistics { + margin-top: 1em; + display: grid; + grid-template-columns: repeat(2, max-content); + grid-column-gap: 2em; + align-items: center; +} + .disco-cta-button { font-size: 14px; flex-shrink: 0; diff --git a/toolkit/mozapps/extensions/content/aboutaddons.html b/toolkit/mozapps/extensions/content/aboutaddons.html index 1837fbf86eb0..59a97af93e1a 100644 --- a/toolkit/mozapps/extensions/content/aboutaddons.html +++ b/toolkit/mozapps/extensions/content/aboutaddons.html @@ -76,6 +76,10 @@ +
+ + +