Loading browser/base/content/appmenu-viewcache.inc.xhtml +0 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ hidden="true"/> <toolbaritem id="appMenu-fxa-status" class="sync-ui-item" defaultlabel="&fxa.menu.signin.label;" flex="1"> <image id="appMenu-fxa-avatar"/> <toolbarbutton id="appMenu-fxa-label" Loading Loading @@ -764,7 +763,6 @@ align="center" class="subviewbutton" oncommand="gSync.clickFxAMenuHeaderButton(this);"> <image role="presentation" id="fxa-menu-avatar"/> <vbox flex="1"> <label id="fxa-menu-header-title" crop="end" Loading browser/base/content/browser-sync.js +61 −96 Original line number Diff line number Diff line Loading @@ -471,7 +471,7 @@ var gSync = { // Label for the sync buttons. const appMenuLabel = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-label2" : "appMenu-fxa-label" "appMenu-fxa-label2" ); if (!appMenuLabel) { // We are in a window without our elements - just abort now, without Loading @@ -490,7 +490,6 @@ var gSync = { "PanelUI-remotetabs-setupsync" ).hidden = false; if (PanelUI.protonAppMenuEnabled) { const appMenuHeaderTitle = PanelMultiView.getViewNode( document, "appMenu-header-title" Loading @@ -514,7 +513,6 @@ var gSync = { appMenuHeaderText.textContent = this.fluentStrings.formatValueSync( "appmenu-fxa-sync-and-save-data2" ); } for (let topic of this._obs) { Services.obs.addObserver(this, topic, true); Loading Loading @@ -802,7 +800,7 @@ var gSync = { // have UIState know about it. let fxaStatus = document.documentElement.getAttribute("fxastatus"); if (PanelUI.protonAppMenuEnabled && fxaStatus == "not_configured") { if (fxaStatus == "not_configured") { this.openFxAEmailFirstPageFromFxaMenu( PanelMultiView.getViewNode(document, "PanelUI-fxa") ); Loading @@ -813,16 +811,6 @@ var gSync = { if (!gFxaToolbarAccessed) { Services.prefs.setBoolPref("identity.fxaccounts.toolbar.accessed", true); } const fxaSignOutButtonEl = PanelMultiView.getViewNode( document, "PanelUI-fxa-menu-account-signout-button" ); const fxaSignOutSeparator = PanelMultiView.getViewNode( document, "PanelUI-sign-out-separator" ); fxaSignOutButtonEl.hidden = fxaSignOutSeparator.hidden = UIState.get() === UIState.STATUS_NOT_CONFIGURED; this.enableSendTabIfValidTab(); Loading @@ -849,10 +837,6 @@ var gSync = { // state shows an avatar with an email icon, `login-failed` state shows an avatar // with a danger icon and the `verified` state will show the users // custom profile image or a filled avatar. // In the proton app menu, the avatar is not shown. if (PanelUI.protonAppMenuEnabled) { PanelMultiView.getViewNode(document, "fxa-menu-avatar").hidden = true; } let stateValue = "not_configured"; const menuHeaderTitleEl = PanelMultiView.getViewNode( Loading Loading @@ -897,11 +881,9 @@ var gSync = { if (state.status === UIState.STATUS_NOT_CONFIGURED) { mainWindowEl.style.removeProperty("--avatar-image-url"); if (PanelUI.protonAppMenuEnabled) { headerDescription = this.fluentStrings.formatValueSync( "appmenu-fxa-signed-in-label" ); } } else if (state.status === UIState.STATUS_LOGIN_FAILED) { stateValue = "login-failed"; headerTitle = this.fluentStrings.formatValueSync("account-disconnected2"); Loading Loading @@ -1007,13 +989,11 @@ var gSync = { updatePanelPopup(state) { const appMenuStatus = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-status2" : "appMenu-fxa-status" "appMenu-fxa-status2" ); const appMenuLabel = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-label2" : "appMenu-fxa-label" "appMenu-fxa-label2" ); const appMenuAvatar = PanelMultiView.getViewNode( document, Loading @@ -1033,9 +1013,9 @@ var gSync = { ); const fxaPanelView = PanelMultiView.getViewNode(document, "PanelUI-fxa"); let defaultLabel = PanelUI.protonAppMenuEnabled ? this.fluentStrings.formatValueSync("appmenu-fxa-signed-in-label") : appMenuStatus.getAttribute("defaultlabel"); let defaultLabel = this.fluentStrings.formatValueSync( "appmenu-fxa-signed-in-label" ); const status = state.status; // Reset the status bar to its original state. appMenuLabel.setAttribute("label", defaultLabel); Loading @@ -1044,21 +1024,17 @@ var gSync = { appMenuAvatar.style.removeProperty("list-style-image"); if (status == UIState.STATUS_NOT_CONFIGURED) { if (PanelUI.protonAppMenuEnabled) { appMenuHeaderText.hidden = false; appMenuStatus.classList.add("toolbaritem-combined-buttons"); appMenuLabel.classList.remove("subviewbutton-nav"); appMenuHeaderTitle.hidden = true; appMenuHeaderDescription.value = defaultLabel; } return; } appMenuLabel.classList.remove("subviewbutton-nav"); if (PanelUI.protonAppMenuEnabled) { appMenuHeaderText.hidden = true; appMenuStatus.classList.remove("toolbaritem-combined-buttons"); } // At this point we consider sync to be configured (but still can be in an error state). if (status == UIState.STATUS_LOGIN_FAILED) { Loading @@ -1071,7 +1047,6 @@ var gSync = { "account-disconnected2" ); appMenuStatus.setAttribute("tooltiptext", tooltipDescription); if (PanelUI.protonAppMenuEnabled) { appMenuLabel.classList.add("subviewbutton-nav"); appMenuHeaderTitle.hidden = false; appMenuHeaderTitle.value = errorLabel; Loading @@ -1082,9 +1057,6 @@ var gSync = { "aria-labelledby", `${appMenuHeaderTitle.id},${appMenuHeaderDescription.id}` ); } else { appMenuLabel.setAttribute("label", errorLabel); } return; } else if (status == UIState.STATUS_NOT_VERIFIED) { let tooltipDescription = this.fxaStrings.formatStringFromName( Loading @@ -1096,7 +1068,6 @@ var gSync = { "account-finish-account-setup" ); appMenuStatus.setAttribute("tooltiptext", tooltipDescription); if (PanelUI.protonAppMenuEnabled) { appMenuLabel.classList.add("subviewbutton-nav"); appMenuHeaderTitle.hidden = false; appMenuHeaderTitle.value = unverifiedLabel; Loading @@ -1107,9 +1078,6 @@ var gSync = { "aria-labelledby", `${appMenuHeaderTitle.id},${appMenuHeaderDescription.id}` ); } else { appMenuLabel.setAttribute("label", unverifiedLabel); } return; } Loading Loading @@ -1238,10 +1206,7 @@ var gSync = { async openFxAEmailFirstPageFromFxaMenu(panel = undefined) { this.emitFxaToolbarTelemetry("login", panel); let entryPoint = "fxa_discoverability_native"; if ( this.isPanelInsideAppMenu(panel) || (PanelUI.protonAppMenuEnabled && panel) ) { if (panel) { entryPoint = "fxa_app_menu"; } this.openFxAEmailFirstPage(entryPoint); Loading browser/base/content/test/sync/browser_sync.js +1 −4 Original line number Diff line number Diff line Loading @@ -638,10 +638,7 @@ function checkFxAAvatar(fxaStatus) { // Unhide the panel so computed styles can be read document.querySelector("#appMenu-popup").hidden = false; const avatarContainers = [ PanelMultiView.getViewNode(document, "fxa-menu-avatar"), document.getElementById("fxa-avatar-image"), ]; const avatarContainers = [document.getElementById("fxa-avatar-image")]; for (const avatar of avatarContainers) { const avatarURL = getComputedStyle(avatar).listStyleImage; const expected = { Loading browser/components/customizableui/content/panelUI.inc.xhtml +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ flip="slide" position="bottomcenter topright" noautofocus="true"> <panelmultiview id="appMenu-multiView" mainViewId="appMenu-mainView" <panelmultiview id="appMenu-multiView" mainViewId="appMenu-protonMainView" viewCacheId="appMenu-viewCache"> </panelmultiview> </panel> Loading browser/components/customizableui/content/panelUI.js +2 −26 Original line number Diff line number Diff line Loading @@ -95,17 +95,6 @@ const PanelUI = { window.addEventListener("MozDOMFullscreen:Exited", this); } XPCOMUtils.defineLazyPreferenceGetter( this, "protonAppMenuEnabled", "browser.proton.enabled", false ); if (this.protonAppMenuEnabled) { this.multiView.setAttribute("mainViewId", "appMenu-protonMainView"); } window.addEventListener("activate", this); CustomizableUI.addListener(this); Loading Loading @@ -696,14 +685,6 @@ const PanelUI = { } button.classList.add("subviewbutton"); // While we support this panel for both Proton and non-Proton versions // of the AppMenu, we only want to show icons for the non-Proton // version. When Proton ships and we remove the non-Proton variant, // we can remove the subviewbutton-iconic classes. if (!PanelUI.protonAppMenuEnabled) { button.classList.add("subviewbutton-iconic"); } fragment.appendChild(button); } Loading Loading @@ -852,9 +833,7 @@ const PanelUI = { if (!this._mainView) { this._mainView = PanelMultiView.getViewNode( document, this.protonAppMenuEnabled ? "appMenu-protonMainView" : "appMenu-mainView" "appMenu-protonMainView" ); } return this._mainView; Loading @@ -862,12 +841,9 @@ const PanelUI = { get addonNotificationContainer() { if (!this._addonNotificationContainer) { let bannerID = this.protonAppMenuEnabled ? "appMenu-proton-addon-banners" : "appMenu-addon-banners"; this._addonNotificationContainer = PanelMultiView.getViewNode( document, bannerID "appMenu-proton-addon-banners" ); } Loading Loading
browser/base/content/appmenu-viewcache.inc.xhtml +0 −2 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ hidden="true"/> <toolbaritem id="appMenu-fxa-status" class="sync-ui-item" defaultlabel="&fxa.menu.signin.label;" flex="1"> <image id="appMenu-fxa-avatar"/> <toolbarbutton id="appMenu-fxa-label" Loading Loading @@ -764,7 +763,6 @@ align="center" class="subviewbutton" oncommand="gSync.clickFxAMenuHeaderButton(this);"> <image role="presentation" id="fxa-menu-avatar"/> <vbox flex="1"> <label id="fxa-menu-header-title" crop="end" Loading
browser/base/content/browser-sync.js +61 −96 Original line number Diff line number Diff line Loading @@ -471,7 +471,7 @@ var gSync = { // Label for the sync buttons. const appMenuLabel = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-label2" : "appMenu-fxa-label" "appMenu-fxa-label2" ); if (!appMenuLabel) { // We are in a window without our elements - just abort now, without Loading @@ -490,7 +490,6 @@ var gSync = { "PanelUI-remotetabs-setupsync" ).hidden = false; if (PanelUI.protonAppMenuEnabled) { const appMenuHeaderTitle = PanelMultiView.getViewNode( document, "appMenu-header-title" Loading @@ -514,7 +513,6 @@ var gSync = { appMenuHeaderText.textContent = this.fluentStrings.formatValueSync( "appmenu-fxa-sync-and-save-data2" ); } for (let topic of this._obs) { Services.obs.addObserver(this, topic, true); Loading Loading @@ -802,7 +800,7 @@ var gSync = { // have UIState know about it. let fxaStatus = document.documentElement.getAttribute("fxastatus"); if (PanelUI.protonAppMenuEnabled && fxaStatus == "not_configured") { if (fxaStatus == "not_configured") { this.openFxAEmailFirstPageFromFxaMenu( PanelMultiView.getViewNode(document, "PanelUI-fxa") ); Loading @@ -813,16 +811,6 @@ var gSync = { if (!gFxaToolbarAccessed) { Services.prefs.setBoolPref("identity.fxaccounts.toolbar.accessed", true); } const fxaSignOutButtonEl = PanelMultiView.getViewNode( document, "PanelUI-fxa-menu-account-signout-button" ); const fxaSignOutSeparator = PanelMultiView.getViewNode( document, "PanelUI-sign-out-separator" ); fxaSignOutButtonEl.hidden = fxaSignOutSeparator.hidden = UIState.get() === UIState.STATUS_NOT_CONFIGURED; this.enableSendTabIfValidTab(); Loading @@ -849,10 +837,6 @@ var gSync = { // state shows an avatar with an email icon, `login-failed` state shows an avatar // with a danger icon and the `verified` state will show the users // custom profile image or a filled avatar. // In the proton app menu, the avatar is not shown. if (PanelUI.protonAppMenuEnabled) { PanelMultiView.getViewNode(document, "fxa-menu-avatar").hidden = true; } let stateValue = "not_configured"; const menuHeaderTitleEl = PanelMultiView.getViewNode( Loading Loading @@ -897,11 +881,9 @@ var gSync = { if (state.status === UIState.STATUS_NOT_CONFIGURED) { mainWindowEl.style.removeProperty("--avatar-image-url"); if (PanelUI.protonAppMenuEnabled) { headerDescription = this.fluentStrings.formatValueSync( "appmenu-fxa-signed-in-label" ); } } else if (state.status === UIState.STATUS_LOGIN_FAILED) { stateValue = "login-failed"; headerTitle = this.fluentStrings.formatValueSync("account-disconnected2"); Loading Loading @@ -1007,13 +989,11 @@ var gSync = { updatePanelPopup(state) { const appMenuStatus = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-status2" : "appMenu-fxa-status" "appMenu-fxa-status2" ); const appMenuLabel = PanelMultiView.getViewNode( document, PanelUI.protonAppMenuEnabled ? "appMenu-fxa-label2" : "appMenu-fxa-label" "appMenu-fxa-label2" ); const appMenuAvatar = PanelMultiView.getViewNode( document, Loading @@ -1033,9 +1013,9 @@ var gSync = { ); const fxaPanelView = PanelMultiView.getViewNode(document, "PanelUI-fxa"); let defaultLabel = PanelUI.protonAppMenuEnabled ? this.fluentStrings.formatValueSync("appmenu-fxa-signed-in-label") : appMenuStatus.getAttribute("defaultlabel"); let defaultLabel = this.fluentStrings.formatValueSync( "appmenu-fxa-signed-in-label" ); const status = state.status; // Reset the status bar to its original state. appMenuLabel.setAttribute("label", defaultLabel); Loading @@ -1044,21 +1024,17 @@ var gSync = { appMenuAvatar.style.removeProperty("list-style-image"); if (status == UIState.STATUS_NOT_CONFIGURED) { if (PanelUI.protonAppMenuEnabled) { appMenuHeaderText.hidden = false; appMenuStatus.classList.add("toolbaritem-combined-buttons"); appMenuLabel.classList.remove("subviewbutton-nav"); appMenuHeaderTitle.hidden = true; appMenuHeaderDescription.value = defaultLabel; } return; } appMenuLabel.classList.remove("subviewbutton-nav"); if (PanelUI.protonAppMenuEnabled) { appMenuHeaderText.hidden = true; appMenuStatus.classList.remove("toolbaritem-combined-buttons"); } // At this point we consider sync to be configured (but still can be in an error state). if (status == UIState.STATUS_LOGIN_FAILED) { Loading @@ -1071,7 +1047,6 @@ var gSync = { "account-disconnected2" ); appMenuStatus.setAttribute("tooltiptext", tooltipDescription); if (PanelUI.protonAppMenuEnabled) { appMenuLabel.classList.add("subviewbutton-nav"); appMenuHeaderTitle.hidden = false; appMenuHeaderTitle.value = errorLabel; Loading @@ -1082,9 +1057,6 @@ var gSync = { "aria-labelledby", `${appMenuHeaderTitle.id},${appMenuHeaderDescription.id}` ); } else { appMenuLabel.setAttribute("label", errorLabel); } return; } else if (status == UIState.STATUS_NOT_VERIFIED) { let tooltipDescription = this.fxaStrings.formatStringFromName( Loading @@ -1096,7 +1068,6 @@ var gSync = { "account-finish-account-setup" ); appMenuStatus.setAttribute("tooltiptext", tooltipDescription); if (PanelUI.protonAppMenuEnabled) { appMenuLabel.classList.add("subviewbutton-nav"); appMenuHeaderTitle.hidden = false; appMenuHeaderTitle.value = unverifiedLabel; Loading @@ -1107,9 +1078,6 @@ var gSync = { "aria-labelledby", `${appMenuHeaderTitle.id},${appMenuHeaderDescription.id}` ); } else { appMenuLabel.setAttribute("label", unverifiedLabel); } return; } Loading Loading @@ -1238,10 +1206,7 @@ var gSync = { async openFxAEmailFirstPageFromFxaMenu(panel = undefined) { this.emitFxaToolbarTelemetry("login", panel); let entryPoint = "fxa_discoverability_native"; if ( this.isPanelInsideAppMenu(panel) || (PanelUI.protonAppMenuEnabled && panel) ) { if (panel) { entryPoint = "fxa_app_menu"; } this.openFxAEmailFirstPage(entryPoint); Loading
browser/base/content/test/sync/browser_sync.js +1 −4 Original line number Diff line number Diff line Loading @@ -638,10 +638,7 @@ function checkFxAAvatar(fxaStatus) { // Unhide the panel so computed styles can be read document.querySelector("#appMenu-popup").hidden = false; const avatarContainers = [ PanelMultiView.getViewNode(document, "fxa-menu-avatar"), document.getElementById("fxa-avatar-image"), ]; const avatarContainers = [document.getElementById("fxa-avatar-image")]; for (const avatar of avatarContainers) { const avatarURL = getComputedStyle(avatar).listStyleImage; const expected = { Loading
browser/components/customizableui/content/panelUI.inc.xhtml +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ flip="slide" position="bottomcenter topright" noautofocus="true"> <panelmultiview id="appMenu-multiView" mainViewId="appMenu-mainView" <panelmultiview id="appMenu-multiView" mainViewId="appMenu-protonMainView" viewCacheId="appMenu-viewCache"> </panelmultiview> </panel> Loading
browser/components/customizableui/content/panelUI.js +2 −26 Original line number Diff line number Diff line Loading @@ -95,17 +95,6 @@ const PanelUI = { window.addEventListener("MozDOMFullscreen:Exited", this); } XPCOMUtils.defineLazyPreferenceGetter( this, "protonAppMenuEnabled", "browser.proton.enabled", false ); if (this.protonAppMenuEnabled) { this.multiView.setAttribute("mainViewId", "appMenu-protonMainView"); } window.addEventListener("activate", this); CustomizableUI.addListener(this); Loading Loading @@ -696,14 +685,6 @@ const PanelUI = { } button.classList.add("subviewbutton"); // While we support this panel for both Proton and non-Proton versions // of the AppMenu, we only want to show icons for the non-Proton // version. When Proton ships and we remove the non-Proton variant, // we can remove the subviewbutton-iconic classes. if (!PanelUI.protonAppMenuEnabled) { button.classList.add("subviewbutton-iconic"); } fragment.appendChild(button); } Loading Loading @@ -852,9 +833,7 @@ const PanelUI = { if (!this._mainView) { this._mainView = PanelMultiView.getViewNode( document, this.protonAppMenuEnabled ? "appMenu-protonMainView" : "appMenu-mainView" "appMenu-protonMainView" ); } return this._mainView; Loading @@ -862,12 +841,9 @@ const PanelUI = { get addonNotificationContainer() { if (!this._addonNotificationContainer) { let bannerID = this.protonAppMenuEnabled ? "appMenu-proton-addon-banners" : "appMenu-addon-banners"; this._addonNotificationContainer = PanelMultiView.getViewNode( document, bannerID "appMenu-proton-addon-banners" ); } Loading