Sidebar open/close on hover
Hey @Vlad, I appreciate your dedication to wanting to build a browser that can feel like it's native. However, I'd still put in a vote for this option. While Edge's implementation may not follow Apple's HIG guildlines, as an end user, I have to say that auto-showing tab names is extremely useful.
This implementation is largely what determines what browser I use. I'm coming from Edge because it's gotten unacceptably slow, sometimes requiring 30 seconds or more just to load a webpage, amongst massive amounts of lag.
I think an option would be amazing. I don't like the double click to expand feature as much. While it might be faster if you're extremely precise about it, it's actually pretty difficult to mouse over that 20 pixels of space and double click it, and then mouse over the new area and click it again—especially if you're quickly trying to find a specific tab and open it.
Both Arc Browser and Zen Browser have a feature where you can have the sidebar automatically hide and show upon hovering the left edge of the browser. This helps free up horizontal space when the sidebar is not in use, and makes vertical tabs far more worthwhile since they do not compromise the amount of available horizontal space you get.
I've made an implementation of this that injects into the app via dylib, but I'd need to disable SIP to use it due to the way WebKit entitlements work.
My implementation adds an NSTrackingArea that covers the entire BrowserWindow object. Whenever the user hovers over the left edge of the tracking area (with about 5px of additional pixels), it calls the private Objective-C _uncollapseWithOverlayArrangedView:animated:
method on Orion.SplitView
, note that the first argument is the _NSSplitViewItemViewWrapper
that contains the sidebar, and the second argument is a BOOL (@(YES)
should suffice). This method overlays the sidebar on top of the browser while also animating it. The tracking area checks for when the mouse cursor leaves the sidebar, and when it does it calls _collapseArrangedView:animated:
on Orion.SplitView
, which, again, takes the _NSSplitViewItemViewWrapper
as the first argument, and a boolean as the second.
I do not know what controls the animation however I can note that the animation permanently changes to the existing slide animation after toggling the sidebar with the existing button, so you can likely just call whatever you use to change the animation in that method at BrowserWindow initialization.
These private methods have been in macOS for over 10 years now and I do not expect them to change.
A demo video (not edited, just my implementation) is provided with this post:
This pattern is fairly common in most browsers that have vertical tabs these days, and rightfully so. Tabs are usually not information that needs to be seen at all times, and adding this allows the user to focus on the content more than anything else. I currently do not use vertical tabs in Orion because of how much space it takes up, however adding this would make it my default mode of browsing.
The tricky part with this feature is knowing when to collapse the sidebar. Some apps handle this poorly, where they collapse the sidebar as soon as the mouse leaves the open sidebar. Toonlink’s demo looks good, but doesn’t take into consideration how this works when the window isn’t full-screen.
The way I’ve implement this on websites and custom apps with sidebars is if the pointer passes through the left side of the window and out of the pane, the sidebar opens and doesn’t collapse until the pointer is back in a non-sidebar part of the window. This saves the user from having to carefully keep the pointer inside of the sidebar area to keep it open.
I haven't seen this on the release candidate build yet, unless there is a setting I need to turn on?
Oh wow, is this really going to be implemented?? I can't wait! Hopefully soon on RC!
laiz I really appreciate this! I cannot overstate how this is important feature to me. I like Vertical Tabs because I have LOTS of tabs opened at once and in horizontal view, you cant see anything.
The downside of vertical tabs is that it takes too much real estate of the web view. Chromium-based browsed have had this auto show/close for some time hence why I used those browsers (brave, arc).
So this feature means a return to Orion for me! And if it really it smoothes out everything, it will ve a good time to purchase that lifetime license. I had some issues where Orion RC was freezing often when coming from suspended state (when I wake up Macbook), but cant reproduce steps. Nevertheless, this thread is about tabs and I am happy for the feature!
- Edited
This will entail modifying the display of vertical tabs to automaticallly collapse as they do in Zen Browser, only when hovering over the left side of the screen then they should appear to leave more space for browsing without the vertical tabs showing all the time
Collapsible vertical tabs can provide a more clean experience and less clutter as Zen Browser does. When hovering over the left side of the screen the vertical tabs show with only a thin bar showing only the icons. This is extremely useful when having multiple tabs and helps to concentrate on one page at a time.
Please add a way to disable the auto-hide feature on the sidebar. When browsing pages that already have a sidebar navigation, the sidebar keeps jumping in the way (Version 0.99.131.2-rc (WebKit 621.1.2.111.4)).
love to see progress on this, it already feels so much nicer to use orion with the sliding sidebar in the latest rc, the design and ux can be iterated on, but this is so nice, huge thanks!
- Edited
No change ever makes everyone happy, it would seem! But further down, I'd love a way to disable the auto-hiding feature (as I currently don't use the sidebar at all).