Skip to content

feat(api/ui): api support for showing / hiding the native tab bar#156

Merged
RobertCraigie merged 13 commits intoglide-browser:mainfrom
integeresting:feat/feat/hide-native-tab-bar
Dec 23, 2025
Merged

feat(api/ui): api support for showing / hiding the native tab bar#156
RobertCraigie merged 13 commits intoglide-browser:mainfrom
integeresting:feat/feat/hide-native-tab-bar

Conversation

@integeresting
Copy link
Copy Markdown
Contributor

closes #18

Basically just did the things written in the issue.
Chose hide over true since I found some interesting options like autohide when I looked through the CSS hacks.

Included the CSS in a separate file, since it is pretty long. I kept the source references which should make it MPL 2.0 compliant.

Quick demo:

glide-tabs-demo.mp4

Also included a small description and some sanity tests.

I also have a similar setup for the nav bar / main toolbar, which I did not include but I find very handy (I use librewolf without any bars).

Demo for that:

glide-navbar-demo.mp4

Copy link
Copy Markdown
Member

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

This is so cool!!!!!! Thank you for working on this :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it'd be slightly better to instead include the .css files directly in the browser build, as updating any of them is as simple as a cp or a curl -o from the firefox-csshacks repository.

That does complicate the internal setters somewhat though as I'm not aware of a synchronous equivalent to ChromeUtils.importESModule() for .css / arbitrary text files.

So if we can't find a builtin way to do that, we'd need to add that internal API somehow, or make the set native_tabs() function asynchronous and use the fetch_resource() helper, which maybe is fine? I'm not sure, it definitely feels weird.

Any thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updating them might not be that simple, since some have multiple use cases and require tweaks depending on what you want to achieve (see autohide for vertical tabs). So there might be a patching step there.

It would ofc be nicer to have the CSS in proper files. Could they be linked to with style tags when bundled in?

From the user perspective I would also feel weird if the "hide some toolbar" option had a micro package manager integrated. 😄

@integeresting
Copy link
Copy Markdown
Contributor Author

Great feedback, tysm! :)

Copy link
Copy Markdown
Member

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

Looks great, thank you! Some minor comments

@RobertCraigie
Copy link
Copy Markdown
Member

Wait actually it looks like autohide doesn't work for me on macOS, it's just always hidden...

Screen.Recording.2025-12-20.at.8.24.02.pm.mov

I suspect this is a bug with firefox-csshacks though so... I think we can just document that autiohide doesn't work on macOS for now

@integeresting
Copy link
Copy Markdown
Contributor Author

Shame, can't have nice things. I'll include a warning.

@RobertCraigie RobertCraigie force-pushed the feat/feat/hide-native-tab-bar branch from 01b30fc to 20924d2 Compare December 23, 2025 22:54
@RobertCraigie
Copy link
Copy Markdown
Member

RobertCraigie commented Dec 23, 2025

I had a last minute realisation that this should really be glide.o.native_tabs as it just makes sense to put it there as it is an "option"; it also means it could just work in other cases, e.g. glide.bo.native_tabs which is nice.

I pushed an extra commit making that change so you don't have to deal with the thrash :)

Unfortunately glide.bo.native_tabs = "hide"; doesn't quite work right now as glide.bo doesn't call our custom setter, but thats a more general issue we can fix in a follow-on.

Thanks again!

@RobertCraigie RobertCraigie merged commit d21c872 into glide-browser:main Dec 23, 2025
3 checks passed
@integeresting integeresting deleted the feat/feat/hide-native-tab-bar branch December 24, 2025 01:59
@integeresting
Copy link
Copy Markdown
Contributor Author

Sounds good! Really appreciate the help
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for hiding the native tab bar

2 participants