pawelsalawa / sqlitestudio

A free, open source, multi-platform SQLite database manager.
https://sqlitestudio.pl
Other
4.67k stars 571 forks source link

A possible fix for the file dialog issues #5025

Closed tuffnatty closed 3 months ago

tuffnatty commented 3 months ago

This PR adds a runtime option to switch between native and Qt file dialog backends (set to native file dialogs by default). Then, for backends other than Windows and Qt/KDE, user interface before #4300 is restored (with a separate button to create a new database). It's a possible fix for #4796 and many user questions.

Fixes: #4796

pawelsalawa commented 3 months ago

I'm hesitant about it. When there were 2 buttons there were a lot of questions/reports about them, i.e. what's the difference between them or why they cannot add existing database (when they used wrong button and did not understand its role). In most applications file path is browsed by 1 button.

I understand native dialogs have some advantages, yet non-native dialogs do not lead to mistakes, while operation-limited (requiring 2 buttons) native dialogs do confuse people and for that I have history of reports.

Would these problems with non-native dialog on Gnome & Mac still be a case if SQLiteStudio moved to Qt 6.x? Are you able to verify it?

Alternatively, maybe there is a different, better approach to UX design for the database dialog, which will allow native dialogs and still not confuse people. I will meditate on this (...said Yoda).

tuffnatty commented 3 months ago

Well, now with a single button I also see a lot of these questions. I suppose a big part of the confusion with two buttons was caused by ambiguous icon design. Probably if the creation button had a familiar "New"-style (blank page) icon, or, even better, if the buttons had text labels, like Create and Select, it would be more immediately accessible by people like me who have problems differentiating between icons (I feel like this also about SQLiteStudio's toolbars, always having to hover every button and wait for a tooltip to find the needed function) and would always prefer a text menu if they had a choice.

As for the Qt 6 - nothing has changed in this regard, they don't automagically add native file chooser bookmarks to the non-native dialog (and don't export the location list back after it's been modified). You don't even see /Volumes on MacOS, for example, and have to type it manually to choose a file on non-system drive. And there is no readily available code to populate the sidebar with native-dependent locations, although I suspect it may be possible.

tuffnatty commented 3 months ago

How about something like this?

(*) Create a new database
    _________________________ [[New]]
( ) Select an existing database

and

( ) Create a new database
(*) Select an existing database
    _________________________ [[Select]]
pawelsalawa commented 3 months ago

Yeah. I like it more. In that case we could use native dialogs on all platforms, across the board, right? I mean there are no other (than the "two buttons") issues with native dialogs, are there?

tuffnatty commented 3 months ago

Look good to me as well.

tuffnatty commented 3 months ago

So, I have pushed a proof-of concept implementation here. Not quite the same as in the ASCII art above, a bit simpler: Screenshot 2024-08-08 at 12 31 36 What do you think?

pawelsalawa commented 3 months ago

I like it.