Bug 1388422 - Remove all traces of the Customize Mode tip panel that no longer applies. r?Gijs
MozReview-Commit-ID: IffDnXEqooR
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -216,19 +216,16 @@ pref("browser.eme.ui.enabled", false);
pref("browser.uitour.enabled", true);
pref("browser.uitour.loglevel", "Error");
pref("browser.uitour.requireSecure", true);
pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/");
pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/");
// How long to show a Hearbeat survey (two hours, in seconds)
pref("browser.uitour.surveyDuration", 7200);
-pref("browser.customizemode.tip0.shown", false);
-pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize");
-
pref("keyword.enabled", true);
pref("browser.fixup.domainwhitelist.localhost", true);
pref("general.useragent.locale", "@AB_CD@");
pref("general.skins.selectedSkin", "classic/1.0");
pref("general.smoothScroll", true);
#ifdef UNIX_BUT_NOT_MAC
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -99,17 +99,16 @@ function CustomizeMode(aWindow) {
this.areas = new Set();
// There are two palettes - there's the palette that can be overlayed with
// toolbar items in browser.xul. This is invisible, and never seen by the
// user. Then there's the visible palette, which gets populated and displayed
// to the user when in customizing mode.
this.visiblePalette = this.document.getElementById(kPaletteId);
this.paletteEmptyNotice = this.document.getElementById("customization-empty");
- this.tipPanel = this.document.getElementById("customization-tipPanel");
if (Services.prefs.getCharPref("general.skins.selectedSkin") != "classic/1.0") {
let lwthemeButton = this.document.getElementById("customization-lwtheme-button");
lwthemeButton.setAttribute("hidden", "true");
}
if (AppConstants.CAN_DRAW_IN_TITLEBAR) {
this._updateTitlebarCheckbox();
this._updateDragSpaceCheckbox();
Services.prefs.addObserver(kDrawInTitlebarPref, this);
@@ -387,18 +386,16 @@ CustomizeMode.prototype = {
}
if (this.resetting) {
log.debug("Attempted to exit while we're resetting. " +
"We'll exit after resetting has finished.");
return;
}
- this.hideTip();
-
this._handler.isExitingCustomizeMode = true;
this._removeExtraToolbarsIfEmpty();
this._teardownDownloadAutoHideToggle();
CustomizableUI.removeListener(this);
@@ -544,54 +541,16 @@ CustomizeMode.prototype = {
let deck = this.document.getElementById("tab-view-deck");
let toolboxRect = this.window.gNavToolbox.getBoundingClientRect();
let height = toolboxRect.bottom;
deck.style.setProperty("--toolbox-rect-height", `${height}`);
deck.style.setProperty("--toolbox-rect-height-with-unit", `${height}px`);
},
- maybeShowTip(aAnchor) {
- const kShownPref = "browser.customizemode.tip0.shown";
- let shown = Services.prefs.getBoolPref(kShownPref, false);
- if (shown)
- return;
-
- let anchorNode = aAnchor || this.document.getElementById("customization-panelHolder");
- let messageNode = this.tipPanel.querySelector(".customization-tipPanel-contentMessage");
- if (!messageNode.childElementCount) {
- // Put the tip contents in the popup.
- let bundle = this.document.getElementById("bundle_browser");
- const kLabelClass = "customization-tipPanel-link";
- // eslint-disable-next-line no-unsanitized/property
- messageNode.innerHTML = bundle.getFormattedString("customizeTips.tip0", [
- "<label class=\"customization-tipPanel-em\" value=\"" +
- bundle.getString("customizeTips.tip0.hint") + "\"/>",
- this.document.getElementById("bundle_brand").getString("brandShortName"),
- "<label class=\"" + kLabelClass + " text-link\" value=\"" +
- bundle.getString("customizeTips.tip0.learnMore") + "\"/>"
- ]);
-
- messageNode.querySelector("." + kLabelClass).addEventListener("click", () => {
- let url = Services.urlFormatter.formatURLPref("browser.customizemode.tip0.learnMoreUrl");
- let browser = this.browser;
- browser.selectedTab = browser.addTab(url);
- this.hideTip();
- });
- }
-
- this.tipPanel.hidden = false;
- this.tipPanel.openPopup(anchorNode);
- Services.prefs.setBoolPref(kShownPref, true);
- },
-
- hideTip() {
- this.tipPanel.hidePopup();
- },
-
_getCustomizableChildForNode(aNode) {
// NB: adjusted from _getCustomizableParent to keep that method fast
// (it's used during drags), and avoid multiple DOM loops
let areas = CustomizableUI.areas;
// Caching this length is important because otherwise we'll also iterate
// over items we add to the end from within the loop.
let numberOfAreas = areas.length;
for (let i = 0; i < numberOfAreas; i++) {
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -374,35 +374,16 @@
<menuseparator/>
<menuitem command="cmd_CustomizeToolbars"
class="viewCustomizeToolbar"
accesskey="&viewCustomizeToolbar.accesskey;"
label="&viewCustomizeToolbar.label;"/>
</menupopup>
</panel>
-<panel id="customization-tipPanel"
- type="arrow"
- flip="none"
- side="left"
- position="leftcenter topright"
- noautohide="true"
- hidden="true">
- <hbox class="customization-tipPanel-wrapper">
- <vbox class="customization-tipPanel-infoBox"/>
- <vbox class="customization-tipPanel-content" flex="1">
- <description class="customization-tipPanel-contentMessage"/>
- <image class="customization-tipPanel-contentImage"/>
- </vbox>
- <vbox pack="start" align="end" class="customization-tipPanel-closeBox">
- <toolbarbutton oncommand="gCustomizeMode.hideTip()" class="close-icon"/>
- </vbox>
- </hbox>
-</panel>
-
<panel id="panic-button-success-notification"
type="arrow"
position="bottomcenter topright"
hidden="true"
role="alert"
orient="vertical">
<hbox id="panic-button-success-header">
<image id="panic-button-success-icon" alt=""/>
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1682,17 +1682,17 @@ BrowserGlue.prototype = {
return;
this._openPreferences("sync", { origin: "doorhanger" });
}
this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
},
// eslint-disable-next-line complexity
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 54;
+ const UI_VERSION = 55;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
if (Services.prefs.prefHasUserValue("browser.migration.version")) {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} else {
// This is a new profile, nothing to migrate.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2082,16 +2082,20 @@ BrowserGlue.prototype = {
// Migrate browser.onboarding.hidden to browser.onboarding.state.
if (Services.prefs.prefHasUserValue("browser.onboarding.hidden")) {
let state = Services.prefs.getBoolPref("browser.onboarding.hidden") ? "watermark" : "default";
Services.prefs.setStringPref("browser.onboarding.state", state);
Services.prefs.clearUserPref("browser.onboarding.hidden");
}
}
+ if (currentUIVersion < 55) {
+ Services.prefs.clearUserPref("browser.customizemode.tip0.shown");
+ }
+
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
_checkForDefaultBrowser() {
// Perform default browser checking.
if (!ShellService) {
return;
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -763,23 +763,16 @@ slowStartup.helpButton.accesskey = L
slowStartup.disableNotificationButton.label = Don’t Tell Me Again
slowStartup.disableNotificationButton.accesskey = A
# LOCALIZATION NOTE - %S is brandShortName
flashHang.message = %S changed some Adobe Flash settings to improve performance.
flashHang.helpButton.label = Learn More…
flashHang.helpButton.accesskey = L
-# LOCALIZATION NOTE(customizeTips.tip0): %1$S will be replaced with the text defined
-# in customizeTips.tip0.hint, %2$S will be replaced with brandShortName, %3$S will
-# be replaced with a hyperlink containing the text defined in customizeTips.tip0.learnMore.
-customizeTips.tip0 = %1$S: You can customize %2$S to work the way you do. Simply drag any of the above to the menu or toolbar. %3$S about customizing %2$S.
-customizeTips.tip0.hint = Hint
-customizeTips.tip0.learnMore = Learn more
-
# LOCALIZATION NOTE (customizeMode.tabTitle): %S is brandShortName
customizeMode.tabTitle = Customize %S
# LOCALIZATION NOTE (appMenuRemoteTabs.mobilePromo.text2):
# %1$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.android and the link will be to
# https://www.mozilla.org/firefox/android/.
# %2$S will be replaced with a link, the text of which is
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -1077,24 +1077,16 @@ notification[value="translation"] {
* labels during the customize mode transition. Subpixel anti-aliasing
* on Windows with Direct2D layers acceleration is particularly slow to
* paint, so this hack is how we sidestep that performance bottleneck.
*/
#main-window:-moz-any([customize-entering],[customize-exiting]) label {
transform: perspective(0.01px);
}
-#customization-tipPanel > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="left"] {
- margin-right: -2px;
-}
-
-#customization-tipPanel > .panel-arrowcontainer > .panel-arrowbox > .panel-arrow[side="right"] {
- margin-left: -2px;
-}
-
/* End customization mode */
/* Private browsing indicators */
/**
* Currently, we have two places where we put private browsing indicators on
* Windows. When tabsintitlebar is enabled, we draw the indicator in the titlebar.
* When tabsintitlebar is disabled, we draw the indicator at the end of the