Bug 1463545 - Use text-overflow:ellipsis; on <shipping-option>. r=sfoster
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Thu, 20 Sep 2018 21:07:28 +0000
changeset 437507 216c54f4650e
parent 437506 1f44117fee2e
child 437508 2d32f6094cda
push id69702
push usermozilla@noorenberghe.ca
push dateThu, 20 Sep 2018 21:12:27 +0000
treeherderautoland@216c54f4650e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfoster
bugs1463545
milestone64.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 1463545 - Use text-overflow:ellipsis; on <shipping-option>. r=sfoster Depends on D5186 Differential Revision: https://phabricator.services.mozilla.com/D6332
browser/components/payments/res/components/shipping-option.css
browser/components/payments/res/debugging.js
browser/components/payments/test/browser/head.js
--- a/browser/components/payments/res/components/shipping-option.css
+++ b/browser/components/payments/res/components/shipping-option.css
@@ -1,12 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 shipping-option.rich-option {
   display: block;
+  /* Below properties are to support truncating with an ellipsis for long options */
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 
 shipping-option > .label,
 shipping-option > .amount {
   white-space: nowrap;
 }
--- a/browser/components/payments/res/debugging.js
+++ b/browser/components/payments/res/debugging.js
@@ -51,30 +51,31 @@ let REQUEST_1 = {
           currency: "USD",
           value: "5",
         },
       },
     ],
     shippingAddressErrors: {},
     shippingOptions: [
       {
-        id: "123",
-        label: "Fast",
+        id: "std",
+        label: "Standard (3-5 business days)",
         amount: {
           currency: "USD",
           value: 10,
         },
         selected: false,
       },
       {
-        id: "456",
-        label: "Faster (default)",
+        id: "super-slow",
+        // Long to test truncation
+        label: "Ssssssssuuuuuuuuupppppeeeeeeerrrrr sssssllllllloooooowwwwww",
         amount: {
           currency: "USD",
-          value: 20,
+          value: 1.50,
         },
         selected: true,
       },
     ],
     modifiers: null,
     error: "",
   },
   paymentOptions: {
--- a/browser/components/payments/test/browser/head.js
+++ b/browser/components/payments/test/browser/head.js
@@ -339,16 +339,20 @@ add_task(async function setup_head() {
     if (msg.category == "CSP_CSPViolationWithURI" && msg.errorMessage.includes("at inline")) {
       // Ignore unknown CSP error.
       return;
     }
     if (msg.message && msg.message.match(/docShell is null.*BrowserUtils.jsm/)) {
       // Bug 1478142 - Console spam from the Find Toolbar.
       return;
     }
+    if (msg.message && msg.message.match(/PrioEncoder is not defined/)) {
+      // Bug 1492638 - Console spam from TelemetrySession.
+      return;
+    }
     if (msg.errorMessage == "AbortError: The operation was aborted. " &&
         msg.sourceName == "" && msg.lineNumber == 0) {
       return;
     }
     ok(false, msg.message || msg.errorMessage);
   });
   await setupFormAutofillStorage();
   registerCleanupFunction(function cleanup() {