Bug 1484574 - Update copy for the content blocking section in the identity popup. r=paolo
authorJohann Hofmann <jhofmann@mozilla.com>
Fri, 24 Aug 2018 09:26:33 +0000
changeset 433269 1a83a81da7387171b49c73ed634f026e070ba83d
parent 433268 123eca2de8b83e4519a911d486dcfb3100a9b440
child 433270 067c58fa95f155a7cc2780c11ca76dc3dca5896d
push id34503
push useraiakab@mozilla.com
push dateFri, 24 Aug 2018 22:07:45 +0000
treeherdermozilla-central@d2da77c319d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaolo
bugs1484574
milestone63.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 1484574 - Update copy for the content blocking section in the identity popup. r=paolo This updates some copy based on UX and legal requirements as well as add a correct SUMO URL for the "Learn More" link for breakage reporting. Differential Revision: https://phabricator.services.mozilla.com/D4172
browser/base/content/browser-contentblocking.js
browser/base/content/test/trackingUI/browser_trackingUI_report_breakage.js
browser/components/controlcenter/content/panel.inc.xul
browser/locales/en-US/chrome/browser/browser.dtd
browser/themes/shared/controlcenter/panel.inc.css
--- a/browser/base/content/browser-contentblocking.js
+++ b/browser/base/content/browser-contentblocking.js
@@ -236,21 +236,20 @@ var ContentBlocking = {
     this.icon = $("#tracking-protection-icon");
     this.iconBox = $("#tracking-protection-icon-box");
     this.animatedIcon = $("#tracking-protection-icon-animatable-image");
     this.animatedIcon.addEventListener("animationend", () => this.iconBox.removeAttribute("animate"));
 
     this.identityPopupMultiView = $("#identity-popup-multiView");
     this.reportBreakageButton = $("#identity-popup-content-blocking-report-breakage");
     this.reportBreakageURL = $("#identity-popup-breakageReportView-collection-url");
-    this.reportBreakageUA = $("#identity-popup-breakageReportView-collection-userAgent");
     this.reportBreakageLearnMore = $("#identity-popup-breakageReportView-learn-more");
 
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
-    this.reportBreakageLearnMore.href = baseURL + "tracking-protection-pbm";
+    this.reportBreakageLearnMore.href = baseURL + "blocking-breakage";
 
     this.updateReportBreakageUI = () => {
       this.reportBreakageButton.hidden = !Services.prefs.getBoolPref(this.PREF_REPORT_BREAKAGE_ENABLED);
     };
 
     this.updateReportBreakageUI();
 
     Services.prefs.addObserver(this.PREF_REPORT_BREAKAGE_ENABLED, this.updateReportBreakageUI);
@@ -351,17 +350,17 @@ var ContentBlocking = {
     }
 
     let formData = new FormData();
     formData.set("title", this.reportURI.host);
 
     // Leave the ? at the end of the URL to signify that this URL had its query stripped.
     let urlWithoutQuery = this.reportURI.asciiSpec.replace(this.reportURI.query, "");
     let body = `Full URL: ${urlWithoutQuery}\n`;
-    body += `userAgent: ${this.reportBreakageUA.textContent}\n`;
+    body += `userAgent: ${navigator.userAgent}\n`;
 
     body += "\n**Preferences**\n";
     body += `${TrackingProtection.PREF_ENABLED_GLOBALLY}: ${Services.prefs.getBoolPref(TrackingProtection.PREF_ENABLED_GLOBALLY)}\n`;
     body += `${TrackingProtection.PREF_ENABLED_IN_PRIVATE_WINDOWS}: ${Services.prefs.getBoolPref(TrackingProtection.PREF_ENABLED_IN_PRIVATE_WINDOWS)}\n`;
     body += `${TrackingProtection.PREF_UI_ENABLED}: ${Services.prefs.getBoolPref(TrackingProtection.PREF_UI_ENABLED)}\n`;
     body += `urlclassifier.trackingTable: ${Services.prefs.getStringPref("urlclassifier.trackingTable")}\n`;
     body += `network.http.referer.defaultPolicy: ${Services.prefs.getIntPref("network.http.referer.defaultPolicy")}\n`;
     body += `network.http.referer.defaultPolicy.pbmode: ${Services.prefs.getIntPref("network.http.referer.defaultPolicy.pbmode")}\n`;
@@ -390,17 +389,16 @@ var ContentBlocking = {
   },
 
   showReportBreakageSubview() {
     // Save this URI to make sure that the user really only submits the location
     // they see in the report breakage dialog.
     this.reportURI = gBrowser.currentURI;
     let urlWithoutQuery = this.reportURI.asciiSpec.replace("?" + this.reportURI.query, "");
     this.reportBreakageURL.textContent = urlWithoutQuery;
-    this.reportBreakageUA.textContent = navigator.userAgent;
     this.identityPopupMultiView.showSubView("identity-popup-breakageReportView");
   },
 
   eventsHistogramAdd(value) {
     if (PrivateBrowsingUtils.isWindowPrivate(window)) {
       return;
     }
     Services.telemetry.getHistogramById("TRACKING_PROTECTION_EVENTS").add(value);
--- a/browser/base/content/test/trackingUI/browser_trackingUI_report_breakage.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_report_breakage.js
@@ -157,20 +157,18 @@ add_task(async function testReportBreaka
     ok(BrowserTestUtils.is_visible(reportBreakageButton), "report breakage button is visible");
     let reportBreakageView = document.getElementById("identity-popup-breakageReportView");
     let viewShown = BrowserTestUtils.waitForEvent(reportBreakageView, "ViewShown");
     reportBreakageButton.click();
     await viewShown;
 
     let submitButton = document.getElementById("identity-popup-breakageReportView-submit");
     let reportURL = document.getElementById("identity-popup-breakageReportView-collection-url").textContent;
-    let reportUA = document.getElementById("identity-popup-breakageReportView-collection-userAgent").textContent;
 
     is(reportURL, TRACKING_PAGE, "Shows the correct URL in the report UI.");
-    is(reportUA, navigator.userAgent, "Shows the correct user agent in the report UI.");
 
     // Make sure that sending the report closes the identity popup.
     let popuphidden = BrowserTestUtils.waitForEvent(gIdentityHandler._identityPopup, "popuphidden");
 
     // Check that we're receiving a good report.
     await new Promise(resolve => {
       server.registerPathHandler("/", async (request, response) => {
         is(request.method, "POST", "request was a post");
@@ -202,17 +200,17 @@ add_task(async function testReportBreaka
           prefsBody += `${pref}: ${Preferences.get(pref)}\r\n`;
         }
 
         Assert.deepEqual(sections, [
           "",
           "Content-Disposition: form-data; name=\"title\"\r\n\r\ntracking.example.org\r\n",
           "Content-Disposition: form-data; name=\"body\"\r\n\r\n" +
           `Full URL: ${reportURL + "?"}\r\n` +
-          `userAgent: ${reportUA}\r\n\r\n` +
+          `userAgent: ${navigator.userAgent}\r\n\r\n` +
           "**Preferences**\r\n" +
           `${prefsBody}\r\n` +
           "**Comments**\r\n" +
           "This is a comment\r\n",
           ""
         ], "Should send the correct form data");
 
         resolve();
--- a/browser/components/controlcenter/content/panel.inc.xul
+++ b/browser/components/controlcenter/content/panel.inc.xul
@@ -84,17 +84,17 @@
               <label flex="1" class="identity-popup-content-blocking-category-label">&contentBlocking.fastBlock.label;</label>
               <label flex="1" class="identity-popup-content-blocking-category-state-label">&contentBlocking.fastBlock.blocked.label;</label>
               <label flex="1" class="identity-popup-content-blocking-category-add-blocking text-link"
                      onclick="ContentBlocking.openPreferences('identityPopup-CB-fastblock');">&contentBlocking.fastBlock.add.label;</label>
             </hbox>
             <hbox id="identity-popup-content-blocking-category-tracking-protection"
                   class="identity-popup-content-blocking-category" align="center" role="group">
               <image class="identity-popup-content-blocking-category-icon tracking-protection-icon"/>
-              <label flex="1" class="identity-popup-content-blocking-category-label">&contentBlocking.trackingProtection.label;</label>
+              <label flex="1" class="identity-popup-content-blocking-category-label">&contentBlocking.trackingProtection2.label;</label>
               <label flex="1" class="identity-popup-content-blocking-category-state-label">&contentBlocking.trackingProtection.blocked.label;</label>
               <label flex="1" class="identity-popup-content-blocking-category-add-blocking text-link"
                      onclick="ContentBlocking.openPreferences('identityPopup-CB-tracking-protection');">&contentBlocking.trackingProtection.add.label;</label>
             </hbox>
             <hbox id="identity-popup-content-blocking-category-3rdpartycookies"
                   class="identity-popup-content-blocking-category" align="center" role="group">
               <image class="identity-popup-content-blocking-category-icon thirdpartycookies-icon"/>
               <label flex="1" class="identity-popup-content-blocking-category-label">&contentBlocking.3rdPartyCookies.label;</label>
@@ -117,17 +117,17 @@
           <button id="tracking-action-block"
                   class="tracking-protection-button"
                   label="&trackingProtection.block5.label;"
                   accesskey="&trackingProtection.block5.accesskey;"
                   oncommand="ContentBlocking.enableForCurrentPage();" />
           <label id="identity-popup-content-blocking-report-breakage"
                  onclick="ContentBlocking.showReportBreakageSubview();"
                  class="text-link subviewkeynav"
-                 flex="1">&contentBlocking.openBreakageReportView.label;</label>
+                 flex="1">&contentBlocking.openBreakageReportView2.label;</label>
         </vbox>
       </hbox>
 
       <!-- Permissions Section -->
       <hbox class="identity-popup-section"
             when-connection="not-secure secure secure-ev secure-cert-user-overridden file extension">
         <vbox id="identity-popup-permissions-content" flex="1" role="group"
               aria-labelledby="identity-popup-permissions-headline">
@@ -246,30 +246,26 @@
 
     </panelview>
 
     <!-- Report Breakage SubView -->
     <panelview id="identity-popup-breakageReportView"
                title="&contentBlocking.breakageReportView.label;"
                descriptionheightworkaround="true">
         <vbox id="identity-popup-breakageReportView-heading">
-          <description>&contentBlocking.breakageReportView.description;</description>
+          <description>&contentBlocking.breakageReportView2.description;</description>
           <label id="identity-popup-breakageReportView-learn-more"
                  class="text-link">&contentBlocking.breakageReportView.learnMore;</label>
         </vbox>
         <vbox id="identity-popup-breakageReportView-body" class="panel-view-body-unscrollable">
           <vbox class="identity-popup-breakageReportView-collection-section">
             <label class="identity-popup-breakageReportView-collection-label">&contentBlocking.breakageReportView.collection.url.label;</label>
             <label id="identity-popup-breakageReportView-collection-url"/>
           </vbox>
           <vbox class="identity-popup-breakageReportView-collection-section">
-            <label class="identity-popup-breakageReportView-collection-label">&contentBlocking.breakageReportView.collection.userAgent.label;</label>
-            <label id="identity-popup-breakageReportView-collection-userAgent"/>
-          </vbox>
-          <vbox class="identity-popup-breakageReportView-collection-section">
             <label class="identity-popup-breakageReportView-collection-label">&contentBlocking.breakageReportView.collection.comments.label;</label>
             <textbox multiline="true" id="identity-popup-breakageReportView-collection-comments"/>
           </vbox>
         </vbox>
         <vbox id="identity-popup-breakageReportView-footer" class="identity-popup-footer">
           <button id="identity-popup-breakageReportView-cancel"
                   label="&contentBlocking.breakageReportView.cancel.label;"
                   oncommand="ContentBlocking.backToMainView();"/>
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -933,17 +933,17 @@ you can use these alternative items. Oth
      "Slow-Loading Trackers [are] Blocked"-->
 <!ENTITY contentBlocking.fastBlock.blocked.label "Blocked">
 <!-- LOCALIZATION NOTE (contentBlocking.fastBlock.add.label):
      This is displayed as a link to preferences, where the user can add
      this specific type of content blocking. When this text is shown
      the type of content blocking is currently not enabled. -->
 <!ENTITY contentBlocking.fastBlock.add.label "Add Blocking…">
 
-<!ENTITY contentBlocking.trackingProtection.label "Trackers">
+<!ENTITY contentBlocking.trackingProtection2.label "All Detected Trackers">
 <!-- LOCALIZATION NOTE (contentBlocking.trackingProtection.blocked.label):
      This label signals that this type of content blocking is turned
      ON and is successfully blocking tracker content, so this is
      a positive thing. It forms the end of the (imaginary) sentence
      "Trackers [are] Blocked"-->
 <!ENTITY contentBlocking.trackingProtection.blocked.label "Blocked">
 <!-- LOCALIZATION NOTE (contentBlocking.trackingProtection.add.label):
      This is displayed as a link to preferences, where the user can add
@@ -959,22 +959,21 @@ you can use these alternative items. Oth
      "Third-Party Cookies [are] Blocked"-->
 <!ENTITY contentBlocking.3rdPartyCookies.blocked.label "Blocked">
 <!-- LOCALIZATION NOTE (contentBlocking.3rdPartyCookies.add.label):
      This is displayed as a link to preferences, where the user can add
      this specific type of content blocking. When this text is shown
      the type of content blocking is currently not enabled. -->
 <!ENTITY contentBlocking.3rdPartyCookies.add.label "Add Blocking…">
 
-<!ENTITY contentBlocking.openBreakageReportView.label "Report Problems">
+<!ENTITY contentBlocking.openBreakageReportView2.label "Report a problem">
 <!ENTITY contentBlocking.breakageReportView.label "Report Problems">
-<!ENTITY contentBlocking.breakageReportView.description "Content blocking can cause problems with some websites. When you report problems, you’ll help make &brandShortName; better for everyone. (This will send a URL as well as information about your privacy and content blocking settings to Mozilla.)">
+<!ENTITY contentBlocking.breakageReportView2.description "Content blocking can cause problems with some websites. When you report problems, you’ll help make &brandShortName; better for everyone. (This will send a URL as well as information about your browser settings to Mozilla.)">
 <!ENTITY contentBlocking.breakageReportView.learnMore "Learn More">
 <!ENTITY contentBlocking.breakageReportView.collection.url.label "URL">
-<!ENTITY contentBlocking.breakageReportView.collection.userAgent.label "&brandShortName; Version Number">
 <!ENTITY contentBlocking.breakageReportView.collection.comments.label "What problems did you have? (Optional)">
 <!ENTITY contentBlocking.breakageReportView.sendReport.label "Send Report">
 <!ENTITY contentBlocking.breakageReportView.cancel.label "Cancel">
 
 <!ENTITY trackingProtection.title "Tracking Protection">
 <!ENTITY trackingProtection.tooltip "Open Tracking Protection Preferences">
 
 <!-- LOCALIZATION NOTE (trackingProtection.unblock3.label, trackingProtection.unblock3.accesskey):
--- a/browser/themes/shared/controlcenter/panel.inc.css
+++ b/browser/themes/shared/controlcenter/panel.inc.css
@@ -557,16 +557,20 @@ description#identity-popup-content-verif
   /* We need to align the action buttons and permission icons with the text.
      This is tricky because the icon height is defined in pixels, while the
      font height can vary with platform and system settings, and at least on
      Windows the default font metrics reserve more extra space for accents.
      This value is a good compromise for different platforms and font sizes. */
   margin-top: -0.1em;
 }
 
+.identity-popup-content-blocking-category-label {
+  max-width: 200px;
+}
+
 .identity-popup-content-blocking-category-label,
 .identity-popup-permission-label {
   margin-inline-start: 1em;
 }
 
 .identity-popup-content-blocking-category-state-label,
 .identity-popup-content-blocking-category-add-blocking,
 .identity-popup-permission-state-label {