Commit 1434579b authored by Kelly Cochrane's avatar Kelly Cochrane
Browse files

Bug 1926979 - Hide the 'pre-tabs' .titlebar-spacer and decrease window minimum...

Bug 1926979 - Hide the 'pre-tabs' .titlebar-spacer and decrease window minimum width when vertical tabs are enabled r=desktop-theme-reviewers,tabbrowser-reviewers,sidebar-reviewers,dao,sclements

Differential Revision: https://phabricator.services.mozilla.com/D229689
parent fb6ac1a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -298,6 +298,7 @@ export const CustomizableWidgets = [
      if (lazy.sidebarRevampEnabled) {
        const { SidebarController } = aNode.ownerGlobal;
        SidebarController.updateToolbarButton(aNode);
        aNode.setAttribute("overflows", "false");
      } else {
        // Add an observer so the button is checked while the sidebar is open
        let doc = aNode.ownerDocument;
+4 −11
Original line number Diff line number Diff line
@@ -315,10 +315,6 @@ add_task(async function construct_widget() {

add_task(async function insertBeforeFirstItemInOverflow() {
  originalWindowWidth = window.outerWidth;
  let sidebarRevampEnabled = Services.prefs.getBoolPref(
    "sidebar.revamp",
    false
  );
  ok(
    !navbar.hasAttribute("overflowing"),
    "Should start insertBeforeFirstItemInOverflow with a non-overflowing toolbar."
@@ -328,6 +324,9 @@ add_task(async function insertBeforeFirstItemInOverflow() {
    "Should start insertBeforeFirstItemInOverflow in default state."
  );

  // Remove sidebar button if present
  CustomizableUI.removeWidgetFromArea("sidebar-button");

  CustomizableUI.addWidgetToArea(
    kLibraryButton,
    "nav-bar",
@@ -358,16 +357,10 @@ add_task(async function insertBeforeFirstItemInOverflow() {
  );
  window.resizeBy(resizeWidthToMakeLibraryLast, 0);
  await TestUtils.waitForCondition(() => {
    if (!sidebarRevampEnabled) {
    return (
      libraryButton.getAttribute("overflowedItem") == "true" &&
      !libraryButton.previousElementSibling
    );
    }
    return (
      libraryButton.getAttribute("overflowedItem") == "true" &&
      libraryButton.previousElementSibling?.id === "sidebar-button"
    );
  });

  let testBtnSpec = { id: kTestBtn4, label: "Overflowable widget test" };
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ function getExpectedElements(win, tabstripOrientation = "horizontal") {
  if (win.TabsInTitlebar.enabled) {
    selectors.push("#nav-bar .titlebar-buttonbox-container");
    if (sizeMode == "normal") {
      selectors.push("#nav-bar .titlebar-spacer");
      selectors.push("#nav-bar .titlebar-spacer[type='post-tabs']");
    }
  }
  return selectors;
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ body {

    /* stylelint-disable-next-line media-query-no-invalid */
    @media (-moz-bool-pref: "sidebar.verticalTabs") {
      min-width: 800px;
      min-width: 732px;

      @media (-moz-platform: macos) {
        min-width: 670px;
+7 −0
Original line number Diff line number Diff line
@@ -1326,6 +1326,13 @@
  }
}

/* stylelint-disable-next-line media-query-no-invalid */
@media (-moz-bool-pref: "sidebar.verticalTabs") {
  .titlebar-spacer[type="pre-tabs"] {
    display: none;
  }
}

/* Firefox View button and menu item */

#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon {