Bug 966511: Tweak Sync UI, r=ttaubert
authorGavin Sharp <gavin@gavinsharp.com>
Fri, 31 Jan 2014 17:20:21 -0800
changeset 182429 08ef155181f6a1c487db997ce12854678099cf32
parent 182428 a6805f2f89143686778c2834ed8ef40c988c37dc
child 182430 ba728a01b0619eb91681638a0148f32b831d7183
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs966511
milestone29.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 966511: Tweak Sync UI, r=ttaubert Changes: - rename browser-fxaccounts.js "toggle" to onMenuPanelCommand - rename openSignInPage->openSignInAgainPage and change it to point to about:accounts?signin=true - introduce openAccountsPage and change the menu panel "signed in"'s UI to call it - remove period at the end of "Firefox is now syncing" in the success doorhanger - rename syncErrorPanel.title->syncErrorPanel.heading for consistency - remove the "Preferences" button from the "you need to sign in again" doorhanger - "manage"->"change" in the "What would you like to Sync" dialog - change "Unlink Browser" to "Disconnect", in both the prefs button and confirmation dialog title - adjust string in the "Disconnect" confirmation dialog - change "Device"->"computer" in the relink verification dialog - fix success panel heading styling (should be bold)
browser/base/content/aboutaccounts/aboutaccounts.js
browser/base/content/browser-fxaccounts.js
browser/base/content/browser.xul
browser/base/content/sync/customize.xul
browser/components/preferences/sync.js
browser/components/preferences/sync.xul
browser/locales/en-US/chrome/browser/browser.dtd
browser/locales/en-US/chrome/browser/preferences/preferences.properties
browser/locales/en-US/chrome/browser/preferences/sync.dtd
browser/locales/en-US/chrome/browser/syncCustomize.dtd
browser/locales/en-US/chrome/browser/syncSetup.properties
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -53,20 +53,20 @@ function sha256(str) {
   hasher.update(data, data.length);
 
   return hasher.finish(true);
 }
 
 function promptForRelink(acctName) {
   let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
   let continueLabel = sb.GetStringFromName("continue.label");
-  let title = sb.GetStringFromName("relink.verify.title");
-  let description = sb.formatStringFromName("relink.verify.description",
+  let title = sb.GetStringFromName("relinkVerify.title");
+  let description = sb.formatStringFromName("relinkVerify.description",
                                             [acctName], 1);
-  let body = sb.GetStringFromName("relink.verify.heading") +
+  let body = sb.GetStringFromName("relinkVerify.heading") +
              "\n\n" + description;
   let ps = Services.prompt;
   let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) +
                     (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) +
                     ps.BUTTON_POS_1_DEFAULT;
   let pressed = Services.prompt.confirmEx(window, title, body, buttonFlags,
                                      continueLabel, null, null, null,
                                      {});
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -185,22 +185,27 @@ let gFxAccounts = {
       }
     });
   },
 
   toggle: function (event) {
     if (event.originalTarget.hasAttribute("signedin")) {
       this.openPreferences();
     } else {
-      this.openSignInPage();
+      this.openAccountsPage();
     }
 
     PanelUI.hide();
   },
 
   openPreferences: function () {
     openPreferences("paneSync");
   },
 
-  openSignInPage: function () {
+  openAccountsPage: function () {
     switchToTabHavingURI("about:accounts", true);
+  },
+
+  openSignInAgainPage: function () {
+    // FIXME: This should actually show the pre-filled username version of about:accounts?
+    switchToTabHavingURI("about:accounts?signin=true", true);
   }
 };
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -390,17 +390,17 @@
     <!-- Sync Panel -->
     <panel id="sync-start-panel" class="sync-panel" type="arrow" hidden="true"
            noautofocus="true" level="top" onclick="this.hidePopup();"
            flip="slide">
       <hbox class="sync-panel-outer">
         <image class="sync-panel-icon"/>
         <vbox class="sync-panel-inner">
           <description id="sync-start-panel-title"
-                       value="&syncStartPanel.title;"/>
+                       value="&syncStartPanel.heading;"/>
           <description id="sync-start-panel-subtitle">
 #ifdef XP_UNIX
             &syncStartPanel.subTitleUnix;
 #else
             &syncStartPanel.subTitle;
 #endif
           </description>
         </vbox>
@@ -410,34 +410,25 @@
     <!-- Sync Error Panel -->
     <panel id="sync-error-panel" class="sync-panel" type="arrow" hidden="true"
            noautofocus="true" level="top" onclick="this.hidePopup();"
            flip="slide">
       <hbox class="sync-panel-outer">
         <image class="sync-panel-icon"/>
         <vbox class="sync-panel-inner">
           <description id="sync-error-panel-title"
-                       value="&syncErrorPanel.title;"/>
+                       value="&syncErrorPanel.heading;"/>
           <description id="sync-error-panel-subtitle"
                        value="&syncErrorPanel.subTitle;"/>
           <hbox class="sync-panel-button-box">
-            <button class="sync-panel-button"
-#ifdef XP_UNIX
-                    label="&syncErrorPanel.prefButtonUnix.label;"
-                    accesskey="&syncErrorPanel.prefButtonUnix.accesskey;"
-#else
-                    label="&syncErrorPanel.prefButton.label;"
-                    accesskey="&syncErrorPanel.prefButton.accesskey;"
-#endif
-                    onclick="gFxAccounts.openPreferences();"/>
             <spacer flex="1"/>
             <button class="sync-panel-button"
                     label="&syncErrorPanel.signInButton.label;"
                     accesskey="&syncErrorPanel.signInButton.accesskey;"
-                    onclick="gFxAccounts.openSignInPage();"/>
+                    onclick="gFxAccounts.openSignInAgainPage();"/>
           </hbox>
         </vbox>
       </hbox>
     </panel>
 
     <!-- Bookmarks and history tooltip -->
     <tooltip id="bhTooltip"/>
 
--- a/browser/base/content/sync/customize.xul
+++ b/browser/base/content/sync/customize.xul
@@ -27,19 +27,19 @@
       <preference id="engine.passwords" name="services.sync.engine.passwords" type="bool"/>
       <preference id="engine.addons"    name="services.sync.engine.addons"    type="bool"/>
       <preference id="engine.prefs"     name="services.sync.engine.prefs"     type="bool"/>
     </preferences>
 
     <label id="sync-customize-title" value="&syncCustomize.title;"/>
     <description id="sync-customize-subtitle"
 #ifdef XP_UNIX
-                 value="&syncCustomize.subTitleUnix;"
+                 value="&syncCustomizeUnix.description;"
 #else
-                 value="&syncCustomize.subTitle;"
+                 value="&syncCustomize.description;"
 #endif
                  />
 
     <checkbox label="&engine.bookmarks.label;"
               accesskey="&engine.bookmarks.accesskey;"
               preference="engine.bookmarks"/>
     <checkbox label="&engine.history.label;"
               accesskey="&engine.history.accesskey;"
--- a/browser/components/preferences/sync.js
+++ b/browser/components/preferences/sync.js
@@ -289,27 +289,29 @@ let gSyncPane = {
     this.openContentInBrowser(url);
   },
 
   unlinkFirefoxAccount: function(confirm) {
     if (confirm) {
       // We use a string bundle shared with aboutAccounts.
       let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
       let continueLabel = sb.GetStringFromName("continue.label");
-      let title = sb.GetStringFromName("unlink.verify.title");
-      let body = sb.GetStringFromName("unlink.verify.heading") +
+      let title = sb.GetStringFromName("disconnect.verify.title");
+      let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
+      let brandShortName = brandBundle.GetStringFromName("brandShortName");
+      let body = sb.GetStringFromName("disconnect.verify.heading") +
                  "\n\n" +
-                 sb.GetStringFromName("unlink.verify.description");
+                 sb.formatStringFromName("disconnect.verify.description",
+                                         [brandShortName], 1);
       let ps = Services.prompt;
       let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) +
                         (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) +
                         ps.BUTTON_POS_1_DEFAULT;
       let pressed = Services.prompt.confirmEx(window, title, body, buttonFlags,
-                                         continueLabel, null, null, null,
-                                         {});
+                                              continueLabel, null, null, null, {});
       if (pressed != 0) { // 0 is the "continue" button
         return;
       }
     }
     Components.utils.import('resource://gre/modules/FxAccounts.jsm');
     fxAccounts.signOut().then(() => {
       this.updateWeavePrefs();
     });
--- a/browser/components/preferences/sync.xul
+++ b/browser/components/preferences/sync.xul
@@ -184,17 +184,20 @@
           <p>&determiningStatus.label;</p>
           <spacer flex="1"/>
         </vbox>
 
         <vbox id="noFxaAccount">
           <description>&welcome.description;</description>
           <label class="text-link"
                  onclick="gSyncPane.signIn(); return false;"
-                 value="&welcome.startButton.label;"/>
+                 value="&welcome.createAccount.label;"/>
+          <label class="text-link"
+                 onclick="gSyncPane.signIn(); return false;"
+                 value="&welcome.signIn.label;"/>
           <spacer flex="1"/>
           <label class="text-link"
                  onclick="gSyncPane.openOldSyncSupportPage(); return false;"
                  value="&welcome.useOldSync.label;"/>
           <spacer flex="10"/>
         </vbox>
 
         <vbox id="hasFxaAccount">
@@ -207,17 +210,17 @@
               <hbox flex="1">
                 <label id="fxaEmailAddress1"/>
                 <label class="text-link"
                        onclick="gSyncPane.manageFirefoxAccount();"
                        value="&manage.label;"/>
                 <spacer flex="1"/>
                 <vbox align="end">
                   <button onclick="gSyncPane.unlinkFirefoxAccount(true);"
-                          label="&unlink.label;" />
+                          label="&disconnect.label;" />
                 </vbox>
               </hbox>
 
               <!-- logged in to an unverified account -->
               <hbox flex="1">
                 <description>
                   &signedInUnverified.beforename.label;
                   <span id="fxaEmailAddress2"></span>
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -93,25 +93,21 @@ These should match what Safari and other
 <!ENTITY fullScreenCmd.label "Full Screen">
 <!ENTITY fullScreenCmd.accesskey "F">
 <!ENTITY fullScreenCmd.macCommandKey "f">
 <!ENTITY showAllTabsCmd.label "Show All Tabs">
 <!ENTITY showAllTabsCmd.accesskey "A">
 
 <!ENTITY fxaSignIn.label "Sign in to &syncBrand.shortName.label;">
 <!ENTITY fxaSignInError.label "Reconnect to &syncBrand.shortName.label;">
-<!ENTITY syncStartPanel.title "&brandShortName; is now syncing.">
+<!ENTITY syncStartPanel.heading "&brandShortName; is now syncing">
 <!ENTITY syncStartPanel.subTitle "You can manage &syncBrand.shortName.label; in Options.">
 <!ENTITY syncStartPanel.subTitleUnix "You can manage &syncBrand.shortName.label; in Preferences.">
-<!ENTITY syncErrorPanel.title "Cannot connect to &syncBrand.shortName.label;">
+<!ENTITY syncErrorPanel.heading "Cannot connect to &syncBrand.shortName.label;">
 <!ENTITY syncErrorPanel.subTitle "Please sign in to resume syncing.">
-<!ENTITY syncErrorPanel.prefButton.label "Options">
-<!ENTITY syncErrorPanel.prefButton.accesskey "O">
-<!ENTITY syncErrorPanel.prefButtonUnix.label "Preferences">
-<!ENTITY syncErrorPanel.prefButtonUnix.accesskey "P">
 <!ENTITY syncErrorPanel.signInButton.label "Sign In">
 <!ENTITY syncErrorPanel.signInButton.accesskey "S">
 
 
 <!ENTITY fullScreenMinimize.tooltip "Minimize">
 <!ENTITY fullScreenRestore.tooltip "Restore">
 <!ENTITY fullScreenClose.tooltip "Close">
 <!ENTITY fullScreenAutohide.label "Hide Toolbars">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -135,9 +135,9 @@ syncUnlinkConfirm.label=Unlink
 featureEnableRequiresRestart=%S must restart to enable this feature.
 featureDisableRequiresRestart=%S must restart to disable this feature.
 shouldRestartTitle=Restart %S
 
 ###Preferences::Sync::Firefox Accounts
 firefoxAccountsVerificationSentTitle=Verification Sent
 # LOCALIZATION NOTE: %S = user's email address.
 firefoxAccountsVerificationSentHeading=A verification link has been sent to %S
-firefoxAccountVerificationSentDescription=Please check your email and click the verification link to begin syncing.
+firefoxAccountVerificationSentDescription=Please check your email and click the link to begin syncing.
--- a/browser/locales/en-US/chrome/browser/preferences/sync.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/sync.dtd
@@ -43,25 +43,27 @@
 <!ENTITY unlinkDevice.label           "Unlink This Device">
 
 <!-- Footer stuff -->
 <!ENTITY prefs.tosLink.label        "Terms of Service">
 <!ENTITY prefs.ppLink.label         "Privacy Policy">
 
 <!-- Firefox Accounts stuff -->
 <!ENTITY fxaPrivacyNotice.link.label "Privacy Notice">
-<!ENTITY determiningStatus.label    "Determining your Firefox Account status…">
+<!ENTITY determiningStatus.label     "Determining your Firefox Account status…">
 <!ENTITY signedInUnverified.beforename.label "">
 <!ENTITY signedInUnverified.aftername.label "is not verified.">
 
 <!ENTITY signedInLoginFailure.beforename.label "Please sign in to reconnect">
 <!ENTITY signedInLoginFailure.aftername.label "">
 
 <!ENTITY notSignedIn.label           "You are not signed in.">
 <!ENTITY signIn.label                "Sign in">
 <!ENTITY manage.label                "Manage">
-<!ENTITY unlink.label                "Unlink this Browser…">
+<!ENTITY disconnect.label            "Disconnect…">
 <!ENTITY verify.label                "Verify Email">
 <!ENTITY forget.label                "Forget this Email">
 
 <!ENTITY welcome.description "Access your tabs, bookmarks, passwords and more wherever you use &brandShortName;.">
-<!ENTITY welcome.startButton.label "Sign in or Create an Account">
+<!ENTITY welcome.signIn.label "Sign In">
+<!ENTITY welcome.createAccount.label "Create Account">
+
 <!ENTITY welcome.useOldSync.label "Using an older version of Sync?">
--- a/browser/locales/en-US/chrome/browser/syncCustomize.dtd
+++ b/browser/locales/en-US/chrome/browser/syncCustomize.dtd
@@ -1,18 +1,18 @@
 <!-- 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/. -->
 
 <!ENTITY syncCustomize.dialog.title       "Sync Selection">
 <!ENTITY syncCustomize.acceptButton.label "Start">
 
 <!ENTITY syncCustomize.title              "What would you like to sync?">
-<!ENTITY syncCustomize.subTitle           "You can manage this selection in Options.">
-<!ENTITY syncCustomize.subTitleUnix       "You can manage this selection in Preferences.">
+<!ENTITY syncCustomize.description        "You can change this selection in Options.">
+<!ENTITY syncCustomizeUnix.description    "You can change this selection in Preferences.">
 
 <!--
   These engine names are the same as in browser/preferences/sync.dtd except
   for the last two that are marked as being specific to Desktop browsers.
 -->
 <!ENTITY engine.bookmarks.label           "Bookmarks">
 <!ENTITY engine.bookmarks.accesskey       "m">
 <!ENTITY engine.history.label             "History">
--- a/browser/locales/en-US/chrome/browser/syncSetup.properties
+++ b/browser/locales/en-US/chrome/browser/syncSetup.properties
@@ -47,19 +47,20 @@ wipeClient.change2.label = Firefox Sync 
 wipeRemote.change2.label = Firefox Sync will now replace all of the browser data in your Sync account with the data on this device.
 existingAccount.change.label = You can change this preference by selecting Sync Options below.
 
 # Several other strings are used (via Weave.Status.login), but they come from
 #  /services/sync
 
 # Firefox Accounts based setup.
 continue.label = Continue
-unlink.verify.title = Unlink Browser
-unlink.verify.heading = Are you sure?
-unlink.verify.description = This browser will stop syncing with your other computers, but won't delete any of your local browsing data.
+disconnect.verify.title = Disconnect
+disconnect.verify.heading = Are you sure?
+# LOCALIZATION NOTE (disconnect.verify.description): %S will be replaced with
+# brandShortName
+disconnect.verify.description = %S will stop syncing with your account, but won’t delete any of your browsing data on this computer.
 
-relink.verify.title = Merge Warning
-relink.verify.heading = Are you sure you want to sign in to Sync?
-# LOCALIZATION NOTE (relink.verify.description): Email address of a user previously signed into sync.
-relink.verify.description = A different user was previously signed in to Sync on this device. Signing in will merge this browser's bookmarks, passwords and other settings with %S
-
+relinkVerify.title = Merge Warning
+relinkVerify.heading = Are you sure you want to sign in to Sync?
+# LOCALIZATION NOTE (relinkVerify.description): Email address of a user previously signed into sync.
+relinkVerify.description = A different user was previously signed in to Sync on this computer. Signing in will merge this browser’s bookmarks, passwords and other settings with %S
 
 manage.pageTitle = Manage Sync