Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: in-app browser #1323

Merged
merged 4 commits into from
Feb 9, 2025
Merged

feat: in-app browser #1323

merged 4 commits into from
Feb 9, 2025

Conversation

GeopJr
Copy link
Owner

@GeopJr GeopJr commented Feb 8, 2025

This is the third GTK browser I've had to write, let's hope it's the last one.

Anyway, in-app browser when enabled. UI switch is missing but Tuba has a dconf entry.

Package maintainers that want this enabled, will have to have webkitgtk available at compile time, just like with clapper, gstreamer, libspelling etc. This is optional, Tuba will work just fine without it.

Screenshot From 2025-02-08 06-43-15

The progress bar turned out better than expected :)

@GeopJr GeopJr merged commit ed6b2bb into main Feb 9, 2025
5 checks passed
@GeopJr GeopJr deleted the feat/in-app-browser branch February 9, 2025 00:47
@GeopJr
Copy link
Owner Author

GeopJr commented Feb 15, 2025

@bragefuglseth quick question, should the headerbar icon that closes the in-app browser be a 'back' button?

image

I'm afraid people will think it goes to the previous browser page and accidentally close it.

The design is inspired by the android webview, which uses an X icon but I'm unsure if that will also be confused for the window close button (however window controls are disabled)

image

At the same time, I feel that the back button aligns more with our hig as it follows the NavigationViews (even though this is not one, but looks like one).

@LukaszH77
Copy link
Contributor

I'm afraid people will think it goes to the previous browser page and accidentally close it.

Well... I know what this button does, and yet I've accidentally closed the built-in browser a few dozen times and had to go back to the page I was on. The power of habit is strong.

@LukaszH77
Copy link
Contributor

LukaszH77 commented Feb 15, 2025

BTW: I think back and forward buttons could be very useful in the in-app browser. On Android they are hidden in the ⋮ menu to keep the UI clean and simple. Can we have something like that in Tuba?

Nvm, I'm dumb.

@GeopJr
Copy link
Owner Author

GeopJr commented Feb 16, 2025

Maybe a dialog would be better UX-wise? 🤔 But then you compromise on brwoser space...

@bragefuglseth
Copy link
Contributor

I think a dialog with a large enough maximum size (potentially no maximum size at all) would work well here, in addition to solving the arrow button problem for free.

@GeopJr
Copy link
Owner Author

GeopJr commented Feb 17, 2025

Thanks!

I don't think there's a way to make it use as much space as possible, though we can listen to the window size, maybe?

The bottom sheet looks nice but I'm still a bit unsure about the floating one

Screenshot From 2025-02-17 00-55-46
Screenshot From 2025-02-17 00-55-28

@bragefuglseth
Copy link
Contributor

I don't think there's a way to make it use as much space as possible, though we can listen to the window size, maybe?

Eh, a large natural size should do the trick. FWIW I think the screenshots look good; the dialog does a better job at reflecting the ephemeral nature of the view than the navigation page did.

@LukaszH77
Copy link
Contributor

I like it. At first, I was worried that it wasn't enough space, but after testing it for a while, I think it's ok.

BTW: Shouldn't this dialogue be closable by pressing Esc?

@GeopJr
Copy link
Owner Author

GeopJr commented Feb 17, 2025

Eh, a large natural size should do the trick

Only thing that worries me about that is that AdwDialogs can become regular modals under some circumstances or when the platform adds supports for it (https://gitlab.gnome.org/GNOME/libadwaita/-/issues/801) and the 1200 default size I've set might be too large then. I'll see if there's a way to check if it's a modal and use the main window's size as the default then.

BTW: Shouldn't this dialogue be closable by pressing Esc?

I disabled it because it will probably not work from browser world (if you are focused in a webpage, that gets control of most keyboard stuff), but I'll test it out and see.

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.

3 participants