Skip to content

Commit 93157bb

Browse files
authored
feat: Always show control center except on empty states, p=#11283, c=common, tabs, workspaces
1 parent b9aa9e3 commit 93157bb

File tree

5 files changed

+27
-17
lines changed

5 files changed

+27
-17
lines changed

src/browser/themes/shared/identity-block/identity-block-css.patch

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
diff --git a/browser/themes/shared/identity-block/identity-block.css b/browser/themes/shared/identity-block/identity-block.css
2-
index d542e962d42b17140888e299ed43a838047ee48c..5e0b72f147687924c48dfed0318f53b765a4d497 100644
2+
index d542e962d42b17140888e299ed43a838047ee48c..806bc4f9d7b7557abf316a84858046e04c4f7ff5 100644
33
--- a/browser/themes/shared/identity-block/identity-block.css
44
+++ b/browser/themes/shared/identity-block/identity-block.css
5+
@@ -7,7 +7,7 @@
6+
#identity-box {
7+
margin-inline-end: var(--identity-box-margin-inline);
8+
9+
- &[pageproxystate="invalid"] {
10+
+ :root[zen-has-empty-tab='true'] & {
11+
pointer-events: none;
12+
-moz-user-focus: ignore;
13+
}
514
@@ -81,13 +81,6 @@
615
}
716
}

src/browser/themes/shared/zen-icons/icons.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,17 @@
504504
}
505505

506506
#identity-permission-box,
507-
#identity-box:not([pageproxystate='invalid']) #identity-icon-box:not([open]),
508-
#identity-box[pageproxystate='invalid'] #zen-site-data-icon-button {
507+
:root:not([zen-has-empty-tab='true'])
508+
#urlbar:not([breakout-extend='true'])
509+
#identity-icon-box:not([open]),
510+
:root[zen-has-empty-tab='true'] #zen-site-data-icon-button,
511+
#urlbar[breakout-extend='true'] #zen-site-data-icon-button {
509512
display: none !important;
510513
}
511514

512515
#zen-site-data-icon-button {
513-
padding: 0 6px;
516+
padding: 0 6px !important;
517+
border-radius: var(--urlbar-icon-border-radius) !important;
514518

515519
& image {
516520
list-style-image: url('permissions.svg');

src/zen/common/styles/zen-omnibox.css

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,16 @@
152152
#navigator-toolbox[zen-has-implicit-hover='true'] &,
153153
&[open],
154154
#urlbar[has-popup-open='true'] &,
155-
#identity-box[pageproxystate='invalid'] & {
155+
:root[zen-has-empty-tab='true'] & {
156156
opacity: 1;
157157
visibility: visible;
158158
}
159159
}
160160
}
161161

162-
:root:not([zen-single-toolbar='true'])
162+
:root:not([zen-single-toolbar='true']):not([zen-has-empty-tab='true'])
163163
#urlbar:not([breakout-extend='true'])
164-
.urlbar-input-container:not([pageproxystate='invalid']) {
164+
.urlbar-input-container {
165165
padding: 2px 3px;
166166
gap: 2px;
167167

@@ -184,8 +184,7 @@
184184
background: transparent !important;
185185
}
186186

187-
:root[zen-single-toolbar='true'],
188-
#urlbar[pageproxystate='invalid'] {
187+
:root:is([zen-single-toolbar='true'], [zen-has-empty-tab='true']) {
189188
#zen-copy-url-button[disabled] {
190189
display: none !important;
191190
}
@@ -313,6 +312,7 @@
313312

314313
:root[zen-single-toolbar='true'] {
315314
--urlbar-icon-border-radius: 8px !important;
315+
--urlbar-inner-border-radius: var(--toolbarbutton-border-radius) !important;
316316

317317
#identity-permission-box > *:not(#zen-site-data-icon-button) {
318318
visibility: collapse;
@@ -322,10 +322,8 @@
322322
display: none;
323323
}
324324

325-
#urlbar:not([breakout-extend='true']) {
326-
#identity-box:not([pageproxystate='invalid']) {
327-
order: 2;
328-
}
325+
&:not([zen-has-empty-tab='true']) #urlbar:not([breakout-extend='true']) #identity-box {
326+
order: 2;
329327
}
330328

331329
#notification-popup-box:not([open]) {

src/zen/tabs/zen-tabs/vertical-tabs.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,8 @@
514514
& #nav-bar {
515515
padding-right: 0;
516516

517-
:root[zen-single-toolbar='true'] & {
518-
&
519-
#urlbar:not([breakout-extend='true']):not([pageproxystate='invalid'])
520-
.urlbar-input-container {
517+
:root[zen-single-toolbar='true']:not([zen-has-empty-tab='true']) & {
518+
& #urlbar:not([breakout-extend='true']) .urlbar-input-container {
521519
padding-left: 8px;
522520
padding-right: 4px;
523521
}

src/zen/workspaces/ZenWorkspaces.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2655,6 +2655,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
26552655
#changeToEmptyTab() {
26562656
const isEmpty = gBrowser.selectedTab.hasAttribute('zen-empty-tab');
26572657
gZenCompactModeManager.sidebar.toggleAttribute('zen-has-empty-tab', isEmpty);
2658+
document.documentElement.setAttribute('zen-has-empty-tab', isEmpty);
26582659
}
26592660

26602661
async onLocationChange(event) {

0 commit comments

Comments
 (0)