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.