GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
503 stars 55 forks source link

[Bug]: Offline dialog pops up randomly over other apps #969

Closed bertob closed 3 weeks ago

bertob commented 1 month ago

Describe the bug

I noticed that I sometimes get this dialog when unlocking the session, totally out of nowhere over other, unrelated apps. First I thought it was a system thing, but it seems like it's a non-modal dialog from Tuba:

image

Modal-ness aside, I feel like a dialog is the wrong pattern for this, I'd use a banner instead, like e.g. Fractal does.

Steps To Reproduce

  1. Open the app
  2. Suspend computer
  3. Wake it back up
  4. Unlock
  5. There's this dialog, because the network has not connected yet

Logs and/or Screenshots

No response

Instance Backend

Mastodon

Operating System

Fedora 40

Package

Flatpak

Troubleshooting information

No response

Additional Context

No response

GeopJr commented 1 month ago

It should be a modal but I think I also need to present the main window since it can show up without user interaction (so it shows up behind it).

I feel like a dialog is the wrong pattern for this, I'd use a banner instead, like e.g. Fractal does.

Not opposed to it but my thought process was that since nothing works without an internet connection (except than whatever timeline was open), users shouldn't interact with Tuba at all.

If it becomes a banner instead, what would happen when a user opens settings for example? Settings do network requests both when you open the window and when you close it (to save the server-side related ones). Allowing the user to change those while offline, might lead to them not being synced or be wrong.

edit:

Same question for composing new posts etc

bertob commented 1 month ago

Not opposed to it but my thought process was that since nothing works without an internet connection (except than whatever timeline was open), users shouldn't interact with Tuba at all.

I think it depends on the feature. I definitely should be possible to browse the posts you have locally, and maybe composing posts and saving them to publish later could be an option. But of course, other options probably don't make sense, so maybe the relevant buttons/menu items should be disabled?

GeopJr commented 3 weeks ago

image

Should it be on the sidebar or the view? And is 'Offline' enough? Or should it be 'No Internet Connection'?

If it's on the view, it has to be on every view, even new and old ones. But it's visible when the sidebar is collapsed.

If it's on the sidebar, it's in a single consistent place. But it's not visible when it's collapsed.

bertob commented 3 weeks ago

Fractal only does it on the sidebar, so maybe that's good enough as a start? Alternatively we could also add it on all views, but not sure if that gets too annoying...