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

Simplify default UI? #2307

Open
dmalan opened this issue Jun 26, 2020 · 37 comments
Open

Simplify default UI? #2307

dmalan opened this issue Jun 26, 2020 · 37 comments
Labels
enhancement Feature requests. gui

Comments

@dmalan
Copy link

dmalan commented Jun 26, 2020

Describe the new feature

Per #2306, we use DB Browser to introduce students to SQL in classes. (Thank you for a wonderful teaching tool!) By default, on macOS, at least, quite a few panels are open by default, none of which are strictly necessary to start creating tables or exploring existing tables:

Screen Shot 2020-06-25 at 9 17 52 AM

And I fear they tend to make the tool seem more complex at first glance than it need be, at least for less experienced users (students, in our case). When teaching with DB Browser, for instance, I close all of those additional panels so that students can focus on core features like Database Structure, Browse Data, and Execute SQL:

Screen Shot 2020-06-26 at 1 10 28 PM

As via these settings:

Screen Shot 2020-06-25 at 9 17 48 AM

While DB Browser's audience is surely broader than ours, might it be compelling to disable some/all of those extra panels by default for new installations, so as to onboard new users a bit more simply? I'm sure a tradeoff might be that some users might not discover those more powerful features, so we do realize our use case is narrower!

@scottfurry
Copy link
Contributor

My impression is that the immediate needs could be addressed by having an "education" default settings profile. The unneeded tabs/settings could be disabled in a redistributable DB4S settings file that IT department/maintainer can install with the program on student workstations. If there are aspects of DB4S that are not controllable via settings, we can re-visit the matter and try to work towards an accommodation or long-term solution.

@chrisjlocke
Copy link
Member

xplorer2 (file manager - https://www.zabkat.com/) has the concept of 'layouts' and when first installed, you specify if you want 'beginner' or the 'advanced' layout by default. This at least turns off the numerous panes by default, allowing you to paddle in the shallow end rather than drown in icons... ;)

image

We could have numerous pre-built profiles with various configurations, but also standalone files (.pro files? 😉 ) allowing easy sharing of profiles. We are looking into supporting multiple dock windows (to view tables at once, etc) so once that has been fleshed out, this would be a good way of showing that off - "here's a layout you can apply to have three tables browsing at the same time....." etc.

This is just a suggestion and would take time to implement, but think it would be a good balance between hiding unnecessary dock windows to not scare off beginners, but also allow the advanced features (remote, etc) to be shown when required - a flick of changing a profile.

@chrisjlocke
Copy link
Member

chrisjlocke commented Jul 7, 2020

GitHub desktop has a side panel offering a tutorial. Seems a nice idea.

image

When you expand a section, it explains what to do with additional links. We could give some details, and link off to the Wiki, for example.

image

Would be easy to lob this sort of thing in a 'tutorial.db' database so easily updatable.

@justinclift
Copy link
Member

Good thinking @chrisjlocke.

Any interest in taking it on as a project, to kick start your C++ skill development? 😁

@chrisjlocke
Copy link
Member

😁 Could be an interesting one!

@mgrojo
Copy link
Member

mgrojo commented Jul 26, 2020

Saving and loading layouts would be useful, but I'm thinking in a simpler approach, which is straightforward to implement. I would provide a "Simplify Window Layout" menu entry bound to Shift+Alt+0 in addition to the current Reset Window Layout, under a Window Layout, submenu of the View menu. That would hide all the Dock Widgets and the "Edit Pragmas" tab.

Additionally, I think it will be useful to add some entries to move the Dock Widgets to the top, left side and bottom, so it is easy to try other window layouts without having to drag and drop all the Dock Widgets. By the way, @justinclift, @chrisjlocke, how should we refer to these "Dock Widgets" in the GUI? I was thinking in menu entries like: "Docks at Bottom", "Docks at Left Side"... but I'm not sure, whether it's correct or understandable for the user.

@mgrojo mgrojo added enhancement Feature requests. gui labels Jul 26, 2020
@chrisjlocke
Copy link
Member

What do we call them

I have no idea. Looking at Visual Studio, it refers to Windows, Explorers, Views and Lists, but that's whats /inside/ the dock panels. Hovering over the minimize icon, it refers to Window.

image

image

So they're all Windows, but just 'docked' as a status - so not 'docks' as items. I think we can call them whatever the fun we want. ;)

@scottfurry
Copy link
Contributor

I vote for Platypi and Quokkas

@dmalan
Copy link
Author

dmalan commented Jul 26, 2020

My impression is that the immediate needs could be addressed by having an "education" default settings profile. The unneeded tabs/settings could be disabled in a redistributable DB4S settings file that IT department/maintainer can install with the program on student workstations. If there are aspects of DB4S that are not controllable via settings, we can re-visit the matter and try to work towards an accommodation or long-term solution.

Hi @scottfurry,

Ah, interesting. So in our case, we actually have students installing DB Browser on their own Macs and PCs, so I suspect it might add a non-trivial hurdle for some students if they additionally need to move a settings file into place. Is it perhaps documented where the settings files live on macOS, Windows, and Linux so I could take a look?

@chrisjlocke's proposed layouts would be handy, though simply being able to hide all the widgets easily, per @mgrojo's proposal, would suffice for our particular use case!

@scottfurry
Copy link
Contributor

I agree that the UI can be a bit cumbersome to use. Even just opening a local database to peek "under-the-hood" at the data can be disconcerting if not using DB4S day-in-day-out.

I like @chrisjlocke 's idea.
If we have "fans" and a "user base", we should look after the needs as best as possible.

mgrojo added a commit that referenced this issue Jul 26, 2020
A new predefined simplified layout has been added with the only the basic
functions: schema, browsing and SQL execution. Ideal for courses.

Also added options for moving all the docked windows to the bottom, left
side or top (for the right, the default can be restored with Reset Window
Layout as before).

See issue #2307
@mgrojo
Copy link
Member

mgrojo commented Jul 26, 2020

I've just committed the changes for the new Simplify Window Layout and the dock options, which I've named "Dock Windows at Bottom", etc. The saving and loading of the layout can be added in addition to this, if someone wants to contribute the implementation.

@dmalan Could you give it a try using tomorrow's nightly build?

@justinclift
Copy link
Member

justinclift commented Jul 26, 2020

The nightly builds have just been rebuilt, including the above new predefined settings change.

eg, they're ready for testing

@chrisjlocke
Copy link
Member

I've just committed the changes for the new Simplify Window Layout and the dock options

What am I looking for? I can't see anything on the view menu, or anything different...

image

@justinclift
Copy link
Member

justinclift commented Jul 27, 2020

Hmmm, looking at 72ecf14, there should be new menu options:

  • Simplify Window Layout
  • Dock Windows at Bottom
  • Dock Windows at Left Side
  • Dock Windows at Top

Just compiled the new code locally on my Linux desktop and tried it. For me they're showing up:

2020-07-27-New_window_layout_options

@justinclift
Copy link
Member

justinclift commented Jul 27, 2020

Looking at the Windows build VM, it seems to have built from the correct things, and latest commit.

Not sure why the new options aren't showing there. I've kicked off a new Win64 build now, just to see if something changes...

@chrisjlocke
Copy link
Member

I did only look at the 32-bit version, but the 64-bit version has the same menu.

image

Weird...

@scottfurry
Copy link
Contributor

NewWindowLayout_2020Jul27
I'm getting the new menu shown. However, IMHO, functionality needs some work. There's options for Left, Top, and Bottom. No "Right" (for us Left-handed, multi-monitor types). Reset works "as advertised", but I have to play with the others using an opened database to appreciate what exactly is being altered here. (More than the cursory check I just did).

@chrisjlocke
Copy link
Member

No "Right" (for us Left-handed, multi-monitor types).

Right is the default, or 'reset windows layout'. Guess it could be labelled 'Dock Windows at Right Side (Default)'

@scottfurry
Copy link
Contributor

Again, only did a cursory run through to make sure I was getting the menu with latest pull from git.

@justinclift
Copy link
Member

k, this is the window output log from the new Win64 build run above. Captured doing "Select All", then "Copy" after the main compile piece was finished, while the SQLCipher build was in progress.

Anyone see any smoking guns?

2020-07-27-new_window_layout_options_build_select_all.txt

@scottfurry
Copy link
Contributor

scottfurry commented Jul 27, 2020

Other than being in a detached head?
There's some warnings in there about QScintilla build.
Also some noise about QT qobjectdefs_impl.h
There's also some noise about macro redefinitions - probably need better pragma statements or improved header ordering to sort that out.

Other than that? Nothing really jumps out as a "smoking gun".
Might be prudent to do a fresh rebuild (CMake wasn't re-run because of timestamp)

git clean -dfx
git reset --hard HEAD

@mgrojo
Copy link
Member

mgrojo commented Jul 27, 2020

Right is the default, or 'reset windows layout'. Guess it could be labelled 'Dock Windows at Right Side (Default)'

In fact, 'Dock Windows at ...' moves the visible docked windows to the corresponding side, but does not change the visibility of the windows, so a 'Dock Windows at Right Side' might make sense, but I decided not to added it, because it would be "almost" redundant with the Reset option. Nevertheless, I'm open to suggestions.

@justinclift
Copy link
Member

Might be prudent to do a fresh rebuild

Good idea. 😄

Just did that that specifically, and have triggered the build script to run again (Win64 version only).

@justinclift
Copy link
Member

@scottfurry Looks like that was the problem. The new rebuilt Win64 nightly build (online now) is showing the new options.

Just started the Win32 build manually, so an updated version of that will be online in ~1/2 hour or so too.

@scottfurry
Copy link
Contributor

That can be an issue every now and again with CMake. No guarantees if build files are regenerated.
I'm a huge fan of commands give earlier plus CMake commands:

cmake -H. -Bbuild_directory

Out-of-source builds can be our friend.

@justinclift
Copy link
Member

@scottfurry Agreed. 😄

@chrisjlocke The Win32 nightlies have just been rebuilt and are online. They're showing the new menu options now too.

@chrisjlocke
Copy link
Member

Thanks so much all for digging into this. 🍰

@dmalan
Copy link
Author

dmalan commented Jul 27, 2020

@dmalan Could you give it a try using tomorrow's nightly build?

Works great on macOS, @mgrojo! Thanks so much.

@sky5walk
Copy link

Any chance scripting or custom skins can be implemented in the new UI?
These could be saved in a sqbpro file per logged user.
Meaning, if I share a sqbpro file with another user, I do not want to overwrite their custom view and font selections.
The project file should support multiple users' unique settings.
This is to avoid yet another setup file to manage.

@chrisjlocke
Copy link
Member

Views would be application based though, not project based. If I had a particular view, I'd want that 'global', and I may not save a database as a project. They'd have to be separate files. Maybe.

@justinclift
Copy link
Member

@sky5walk If we can figure out a sane approach for people to use, then sure. 😄

@sky5walk
Copy link

There are arguments for a single file vs multiple.
If you store projects in a git,fossil,etc repo, every user's theme changes would trigger a new commit.
If you separate theming into separate file, it could go on an ignore list.
But, many teams standardize font sizes and tab widths and colors on purpose.
A single file is less complex.

@chrisjlocke
Copy link
Member

But, many teams standardize font sizes and tab widths

OK, somehow (?) we have to work out the userbase of DB4S. Is it home usage (like me) just fiddling and tinkering, or is it in teams, using Gits, repos, fossils, badgers, oscars, penguins, etc. OK, made the last ones up.
Maybe we even need to work out who uses project files? Again, I don't - just open (many different) databases, amend or tinker, then save and close. Usage stats of our users would be interesting. Maybe. Who knows. Maybe I'm over-analysing...

@sky5walk
Copy link

My understanding of the project file's utility is to store SQL queries and the loaded database.
I was hoping it could expand to include plot settings and skins and attached databases.
The plot tool needs more customization before it can become usable.
If we also get schema entity relationship graphics, the project file could store the page view settings.

@justinclift
Copy link
Member

I've seen some programs take a two pronged approach to loading settings:

  1. Load custom settings from a "system wide" location
    • These are applied first
  2. Then look for custom settings in a "per user" location
    • Settings found here override whatever was loaded in (1)

That lets orgs/teams/groups/etc apply their own default settings for everyone. Individual users can still tweak things for their own requirements on top of that though.

Maybe that would work for us?

mgrojo added a commit that referenced this issue Aug 22, 2020
A new predefined simplified layout has been added with the only the basic
functions: schema, browsing and SQL execution. Ideal for courses.

Also added options for moving all the docked windows to the bottom, left
side or top (for the right, the default can be restored with Reset Window
Layout as before).

See issue #2307

# Conflicts:
#	src/MainWindow.cpp
#	src/MainWindow.h
@c-boeckler
Copy link
Contributor

I tried out 3.12.1 rc1 and found tiny inconsistencies:

  1. If I click on "Simplify Window Layout" it does what it is supposed to and the GUI status is correctly reflected in the View menu:
    grafik
    But after clicking on "Reset Window Layout" and on "Simplify Window Layout" again it looks like this:
    grafik
    although the "Edit Pragmas" tab is actually not visible in the UI.

  2. After hiding all Toolbars the View menu looks like this:
    grafik
    If you then click on "Reset Window Layout" all Toolbars show up in the UI but not in the View menu:
    grafik

@lucydodo
Copy link
Member

lucydodo commented Oct 9, 2020

@c-boeckler Thanks for report a bug. I have succeeded in reproduction the bug and will fix it ASAP. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests. gui
Projects
None yet
Development

No branches or pull requests

8 participants