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

Add layer dialog, duplicated layers #49

Closed
m-kuhn opened this Issue Oct 27, 2017 · 21 comments

Comments

Projects
None yet
8 participants
@m-kuhn
Member

m-kuhn commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@elpaso

elpaso Oct 27, 2017

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:

  • Add
  • Add and close (currently: Ok)
  • Close (currently missing)

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 Oct 27, 2017

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:

  • Add
  • Add and close (currently: Ok)
  • Close (currently missing)

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

This comment has been minimized.

Show comment
Hide comment
@elpaso

elpaso Oct 27, 2017

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

elpaso commented Oct 27, 2017

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

@luipir

This comment has been minimized.

Show comment
Hide comment
@luipir

luipir Oct 27, 2017

+1 to:

  1. reintroduce Cancel/close button
  2. rename Ok button with "add and close"
  3. maintain Add button

luipir commented Oct 27, 2017

+1 to:

  1. reintroduce Cancel/close button
  2. rename Ok button with "add and close"
  3. maintain Add button
@elpaso

This comment has been minimized.

Show comment
Hide comment
@elpaso

elpaso Oct 27, 2017

@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.

elpaso commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@luipir

luipir Oct 27, 2017

@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

luipir commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@SrNetoChan

SrNetoChan Oct 27, 2017

Member

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.

Member

SrNetoChan commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@m-kuhn

m-kuhn Oct 27, 2017

Member

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

  • have "Ok" (Or "Add and Close") and "Close" next to it.
Member

m-kuhn commented Oct 27, 2017

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

  • have "Ok" (Or "Add and Close") and "Close" next to it.
@dakcarto

This comment has been minimized.

Show comment
Hide comment
@dakcarto

dakcarto Oct 27, 2017

Member

@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

Member

dakcarto commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@rduivenvoorde
Collaborator

rduivenvoorde commented Oct 27, 2017

@luipir

This comment has been minimized.

Show comment
Hide comment
@luipir

luipir Oct 27, 2017

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

luipir commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@m-kuhn

m-kuhn Oct 27, 2017

Member

why would you want this?

Member

m-kuhn commented Oct 27, 2017

why would you want this?

@dakcarto

This comment has been minimized.

Show comment
Hide comment
@dakcarto

dakcarto Oct 27, 2017

Member

@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?

Member

dakcarto commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@luipir

luipir Oct 27, 2017

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

luipir commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@m-kuhn

m-kuhn Oct 27, 2017

Member

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.

Member

m-kuhn commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@rduivenvoorde

rduivenvoorde Oct 27, 2017

Collaborator

@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

Collaborator

rduivenvoorde commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@m-kuhn

m-kuhn Oct 27, 2017

Member

@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 :)

Member

m-kuhn commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@DelazJ

DelazJ Oct 27, 2017

Collaborator

@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.

Collaborator

DelazJ commented Oct 27, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@gioman

gioman Oct 27, 2017

+1 to:

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

+1

gioman commented Oct 27, 2017

+1 to:

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

+1

@DelazJ

This comment has been minimized.

Show comment
Hide comment
@DelazJ

DelazJ Oct 27, 2017

Collaborator

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)

Collaborator

DelazJ commented Oct 27, 2017

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

This comment has been minimized.

Show comment
Hide comment
@m-kuhn

m-kuhn Oct 27, 2017

Member

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

Member

m-kuhn commented Oct 27, 2017

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

@DelazJ

This comment has been minimized.

Show comment
Hide comment
@DelazJ

DelazJ Nov 16, 2017

Collaborator

fixed in qgis/QGIS#5616

Collaborator

DelazJ commented Nov 16, 2017

fixed in qgis/QGIS#5616

@DelazJ DelazJ closed this Nov 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment