qgis / qgis3_UIX_discussion

Issue list to sum up and discuss UI/UX related issues
1 stars 2 forks source link

Add layer dialog, duplicated layers #49

Closed m-kuhn closed 6 years ago

m-kuhn commented 6 years ago

Within the new add layer dialog, if a user selects a layer, clicks add to add it and then closes the dialog with Ok, he will have the layer twice in the project. Tested with postgis. Once the layer is added on "Add", once on "Ok".

Either the selection should be cleared when "Add" is clicked. Or "Ok" should do nothing except for closing the dialog.

cc @elpaso

elpaso commented 6 years ago

There has been long a discussion about this (and I'm also not a fan of the current implementation), the "Add" button was added because you might want to add something without closing the window, it is really an "Apply" button, previously there was a [x] "do not close this dialog" in most of the source selects.

What we really want here is:

What is missing is the "Close" button, that would just close the dialog without adding anything, but that was also removed after request of some other user (Mathieu? @rduivenvoorde ? ), you can actually close the dialog with ESC or the X icon.

The only constraint is that some dialogs already have a lot of buttons in the bottom bar, we have not much space for another button without enlarging the dialog.

elpaso commented 6 years ago

Btw, duplicated layers is something that you might intentionally want. We just miss the standard "Close/Cancel" button.

luipir commented 6 years ago

+1 to: 1) reintroduce Cancel/close button 2) rename Ok button with "add and close" 3) maintain Add button

elpaso commented 6 years ago

@luipir that would really waste too much of the already limited horizontal space. What I would not want to do is to add a second row of buttons.

luipir commented 6 years ago

@elpaso just leave the close using the upper right X corner button? reformulating: 1)No close button but close only using widget close 2) rename Ok button with "add and close" 3) maintain Add button

SrNetoChan commented 6 years ago

I agree that, if we really want to maintain the Button to add the selected layer and close the dialog (saving one click), we should rename the "Ok" button to "Add and Close". IMHO it is not intuitive that Ok would add a layer.

But I agree that a Close button is missing. Advanced user will use ESC key, but others, after clicking Add, having to go all the way to the top of the dialog for the X button might feel a bit boring. To not waste too much horizontal space I would be ok if we remove the "OK" button and just add a "Close" button.

m-kuhn commented 6 years ago

What about just unselecting the layers on clicking "Add" + have some kind of visual feedback that "something happened" directly on the dialog?

dakcarto commented 6 years ago

@luipir wrote (extra capitalization by me):

... just leave the close using the upper right X corner button? reformulating: 1) No close button but close only using widget close 2) rename Ok button with "Add and Close" 3) maintain Add button

+1 for this setup

rduivenvoorde commented 6 years ago

Issue about this: https://issues.qgis.org/issues/17292

luipir commented 6 years ago

What about just unselecting the layers on clicking "Add"

@m-kuhn -1 I would/could expect to have the same state selection when reopening the GUI. If no selection state is saved, can be a good feature add

m-kuhn commented 6 years ago

why would you want this?

dakcarto commented 6 years ago

@m-kuhn wrote:

why would you want this?

This is the current functionality. The last selected 'tab' is reselected on reopening of the dialog. This seems like appropriate behavior to me, and should be maintained (assuming this is what @luipir is referring to).

What about just unselecting the layers on clicking "Add" + have some kind of visual feedback that "something happened" directly on the dialog?

Or, do you mean deselect any selected layers within a particular widget, e.g. multiple layers in a PostGIS dialog are deselected once added?

luipir commented 6 years ago

why would you want this? 1) why not? 2) imagine to have a lot of layers in a geopackage, I would espect to reopening with the same view and selection I had in the previous visualization => e.g to select the next in the list

m-kuhn commented 6 years ago

Or, do you mean deselect any selected layers within a particular widget, e.g. multiple layers in a PostGIS dialog are deselected once added?

Exactly, once I added a layer I either want to add another layer (that I forgot before) or close. And for the few times I want to add a layer twice, I can do that with a tiny bit of extra effort.

I cannot see much value in preserving the selection after having the layers added, there's nothing else I can use this selection for AFAIK.

rduivenvoorde commented 6 years ago

@m-kuhn: wait till you work with wfs and wms servers with >300 layers... and have to add some (I do this pretty often) :-) AND do not have an easy search in the old dialog (I know there is in the browser...)

I do not want myself make hated, but should we not make a broader discussion about our Buttons in general: looking into these dialogs every sub type has it's own buttons (some use 'filter' some use 'query', some have Help, other have Test. I know it it historically, but maybe we can rethink this and for example move the 'test/filter/add/add-and-do-this' from the qdialogbuttonbox so that one is ONLY used for closing and help (OK should be reserved for small dialogs which ask for a yes/no question, not for giant dialogs we have)? On thing that bugged me for a long time, is that working in the style dialog to test out some things, clicking the cancel button actually does not cancel anything...

What about

m-kuhn commented 6 years ago

@m-kuhn: wait till you work with wfs and wms servers with >300 layers... and have to add some (I do this pretty often) :-)

I'm not sure I can follow. You do what pretty often? Adding the same layer several times?

AND do not have an easy search in the old dialog (I know there is in the browser...)

Let's keep things well separated, I guess that's another feature request :)

DelazJ commented 6 years ago

@m-kuhn

Exactly, once I added a layer I either want to add another layer (that I forgot before) or close. And for the few times I want to add a layer twice, I can do that with a tiny bit of extra effort.

I cannot see much value in preserving the selection after having the layers added, there's nothing else I can use this selection for AFAIK.

Agreed. Fall in the Add/OK trap many times. And if someone needs to double a particular layer presence, do not forget that we still have a duplicate layer button in the Layers panel.

@rduivenvoorde If I'm not wrong, this Datasource Manager is a first sketch of a global and ongoing work for the "One button to rule them all". I don't say that we shouldn't discuss and fix what needs to be but it's expected to not be as clean as the final draw would be.

gioman commented 6 years ago

+1 to:

reintroduce Cancel/close button rename Ok button with "add and close" maintain Add button

+1

DelazJ commented 6 years ago

reintroduce Cancel/close button rename Ok button with "add and close" maintain Add button

If lack of place is the issue at the bottom of this dialog, i'm afraid that this proposal doesn't solve it because of more buttons and more letters. And for reference "add and close" becomes "Ajouter et fermer" in french: a bit longer (unless we have two rows of buttons - ugly imho)

m-kuhn commented 6 years ago

Can I reraise the question for the usecase to keep entries selected after adding them? I think I am missing something obvious.

DelazJ commented 6 years ago

fixed in https://github.com/qgis/QGIS/pull/5616