Skip to content

Commit

Permalink
autohiding nav-bar: Replace :has(> [role="group"][panelopen])
Browse files Browse the repository at this point in the history
Let's instead use :has(> [panelopen]:not(#ask-chat-shortcuts)) which
allows a lot more of the panels to keep nav-bar visible
  • Loading branch information
MrOtherGuy committed Dec 7, 2024
1 parent 902bbd4 commit fec968c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chrome/autohide_bookmarks_and_main_toolbars.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ See the above repository for updates as well as full license text. */
transform-origin: 0px calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2);
transform: rotateX(89.5deg);
}
#mainPopupSet:has(> [role="group"][panelopen]) ~ toolbox #urlbar[popover],
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ toolbox #urlbar[popover],
#navigator-toolbox:is(:hover,:focus-within) #urlbar[popover],
#urlbar-container > #urlbar[popover]:is([focused],[open]){
opacity: 1;
Expand Down Expand Up @@ -100,7 +100,7 @@ See the above repository for updates as well as full license text. */
.tabbrowser-tab[selected]{ z-index: 3 !important; }

/* Show when cursor is over main menu popup - this requires :has selector support */
#mainPopupSet:has(> [role="group"][panelopen]) ~ toolbox > .browser-toolbar{
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ toolbox > .browser-toolbar{
transition-delay: 100ms !important;
transform: rotateX(0);
}
Expand Down
4 changes: 2 additions & 2 deletions chrome/autohide_main_toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ See the above repository for updates as well as full license text. */
transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay);
transform: translateY(var(--uc-navbar-transform));
}
#mainPopupSet:has(> [role="group"][panelopen]) ~ toolbox #urlbar[popover],
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ toolbox #urlbar[popover],
.browser-titlebar:is(:hover,:focus-within) ~ #nav-bar #urlbar[popover],
#nav-bar:is(:hover,:focus-within) #urlbar[popover],
#urlbar-container > #urlbar[popover]:is([focused],[open]){
Expand All @@ -70,7 +70,7 @@ See the above repository for updates as well as full license text. */
transition-duration: 100ms; /* Faster when focused */
}
/* This ruleset is separate, because not having :has support breaks other selectors as well */
#mainPopupSet:has(> [role="group"][panelopen]) ~ #navigator-toolbox > .browser-toolbar{
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ #navigator-toolbox > .browser-toolbar{
transition-delay: 33ms !important;
transform: translateY(0);
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions chrome/autohide_toolbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ See the above repository for updates as well as full license text. */
transform-origin: 0px calc(0px - var(--tab-min-height) - var(--tab-block-margin) * 2);
transform: rotateX(89.9deg);
}
#mainPopupSet:has(> [role="group"][panelopen]) ~ toolbox #urlbar[popover],
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ toolbox #urlbar[popover],
#navigator-toolbox:is(:hover,:focus-within) #urlbar[popover],
#urlbar-container > #urlbar[popover]:is([focused],[open]){
pointer-events: auto;
opacity: 1;
transition-delay: 33ms;
transform: rotateX(0deg);
}
#mainPopupSet:has(> [role="group"][panelopen]) ~ toolbox,
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts)) ~ toolbox,
#navigator-toolbox:has(#urlbar:is([open],[focus-within])),
#navigator-toolbox:hover,
#navigator-toolbox:focus-within{
Expand Down

8 comments on commit fec968c

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes the tab bar tooltip/thumbnail glitchy.

@MrOtherGuy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which style? Or is it all of them? And glitchy how exactly? I'm not seeing any glitchy behavior with tab previews.

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024-12-09.01-23-58.mp4

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autohide_main_toolbar.css

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just created a new profile to test it by itself and it works fine by itself. But combined with my additions in userChrome, it's causing that problem. Not sure what it is. I'll let you know when I figure it out.

@MrOtherGuy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright cool, I was able to reproduce the issue, although it doesn't seem to happen all the time. But after excluding the tab preview panel from keeping toolbars visible I couldn't experience the problem at all so that's probably a good sign.

Update the style and check if the issues seems fixed.

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it happens when there are a lot of tabs that extend way past the viewport. The time it happens is when you're on tabs that are at the end.

@soul4kills
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works good now. Thank you.

Please sign in to comment.