Bug 1568233 - Add tooltips to the protection report graph r=fluent-reviewers,mtigley,flod
authorErica Wright <ewright@mozilla.com>
Fri, 09 Aug 2019 05:15:26 +0000
changeset 487185 881f2821fd6ebff555778f72e8257d1051980fd4
parent 487184 0f9e8c785bee1e2dde93d486713265f4f36fb262
child 487186 e68a224480507640c15a8bb7da8429311154527d
push id36413
push usercsabou@mozilla.com
push dateFri, 09 Aug 2019 21:56:59 +0000
treeherdermozilla-central@2909b0a1eb06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfluent-reviewers, mtigley, flod
bugs1568233
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1568233 - Add tooltips to the protection report graph r=fluent-reviewers,mtigley,flod Differential Revision: https://phabricator.services.mozilla.com/D41261
browser/components/protections/content/protections.ftl
browser/components/protections/content/protections.js
--- a/browser/components/protections/content/protections.ftl
+++ b/browser/components/protections/content/protections.ftl
@@ -128,8 +128,19 @@ password-warning =
     *[other] Saved logins may have been exposed in a data breach. Change these passwords for better online security. <a data-l10n-name="lockwise-link">View Saved Logins</a>
   }
 
 # This is the title attribute describing the graph report's link to about:settings#privacy
 go-to-privacy-settings = Go to Privacy Settings
 
 # This is the title attribute describing the Lockwise card's link to about:logins
 go-to-saved-logins = Go to Saved Logins
+
+bar-tooltip-social =
+  .title = Social Media Trackers
+bar-tooltip-cookie =
+  .title = Cross-Site Tracking Cookies
+bar-tooltip-tracker =
+  .title = Tracking Content
+bar-tooltip-fingerprinter =
+  .title = Fingerprinters
+bar-tooltip-cryptominer =
+  .title = Cryptominers
--- a/browser/components/protections/content/protections.js
+++ b/browser/components/protections/content/protections.js
@@ -119,16 +119,17 @@ document.addEventListener("DOMContentLoa
         bar.style.height = `${barHeight}%`;
         for (let type of dataTypes) {
           if (content[type]) {
             let dataHeight = (content[type] / content.total) * 100;
             let div = document.createElement("div");
             div.className = `${type}-bar inner-bar`;
             div.setAttribute("data-type", type);
             div.style.height = `${dataHeight}%`;
+            div.setAttribute("data-l10n-id", `bar-tooltip-${type}`);
             weekTypeCounts[type] += content[type];
             innerBar.appendChild(div);
           }
         }
       } else {
         // There were no content blocking events on this day.
         bar.classList.add("empty");
       }