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

Move classify related wigdets in dialogs #4660

Closed
wants to merge 7 commits into from

Conversation

SrNetoChan
Copy link
Member

Description

Moves Classify related widgets next to the Color Ramp.

IMHO, classify has nothing to do with the Add, Remove, load... buttons. and it's totally related to the Mode and classes widgets, so it should be in the same line. Assuming that the user's workflow steps will be: set the mode; choose the number of classes; and hit Classify; I decided for the right side.

Besides, these three widgets are also related to the color ramp, so I move them next to it. I would have preferred to keep the three widgets below the color ramp selector (excluding the label) but in Docker mode, it would be too large.

I also prefer that the Add, Remove, etc... buttons are as close as possible to the tree widget they are related to. and this way they are.

Changes Clip out of range values text

The text "Clip out of range values" sounded unclear to me, as for me clipping is associated to cut off a part. I propose change it to "Hide out of range values". Alternatively it could be "Don't show out of range values"

Screenshots

Current state

image

image

Proposal

screenshot from 2017-06-01 00-06-47

screenshot from 2017-06-01 00-07-21

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and containt sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

@nyalldawson
Copy link
Collaborator

The text "Clip out of range values" sounded unclear to me, as for me clipping is associated to cut off a part. I propose change it to "Hide out of range values". Alternatively it could be "Don't show out of range values"

+1. I've always found this setting confusing. Perhaps adding a detailed tooltip explaining exactly what it does would also help?

@SrNetoChan
Copy link
Member Author

+1. I've always found this setting confusing. Perhaps adding a detailed tooltip explaining exactly what it does would also help?

@nyalldawson the tooltip is there already. It was how I was able to understand what that was for.

Tooltip: If checked, any pixels with a value out of range will not be rendered

@nirvn
Copy link
Contributor

nirvn commented Jun 1, 2017

@SrNetoChan , good initiative. If you do that, IMHO, you'll also have to update the vector's graduated and categorized renderer to insure our UI is consistent there (i.e., both graduated & categorized renderers have the [ classify ] button below the list widget).

Also, we shouldn't put mode, classes, and the classify button on the same line, it'll hurt users who like to have a narrow style dock panel. You could either have classification mode on its own line, and classes + classify on a row below it, or possibly put the classes spinbox or classify button on the label unit prefix row (the latter would save vertical space, but may not be the greatest regroupment of widgets 😄 )

@nirvn
Copy link
Contributor

nirvn commented Jun 1, 2017

Re the width issue, also keep in mind that labels are localized into other languages and might be longer than the width in English (hence why I'm reluctant to have three options on one row).

@nyalldawson
Copy link
Collaborator

Also keep in mind that the paletted/unique renderer has a similar button, which will also need to be moved.

@SrNetoChan
Copy link
Member Author

@nirvn thanks for your inputs. I will change the other dialogs to make them consistent.

But before I do it, I would like to present some alternatives so that you guys could give me your opinion.

Alternative 1. Everything under Color ramp

image

This is my favorite. It still allows to make very narrow dialog in docker mode, and it is clear that all widgets belong to the same functionality.

Alternative 2. This tries to make the widget more in line with the rest the dialog

image

Alternative 3. Same as before, also including the classes

image

**Very weird composition as you predicted ** :-P

image

@SrNetoChan SrNetoChan changed the title Improvements to singleband pseudocolor dialog Improvements to classify related wigdets in dialogs Jul 24, 2017
@SrNetoChan SrNetoChan changed the title Improvements to classify related wigdets in dialogs Move classify related wigdets in dialogs Jul 24, 2017
@SrNetoChan
Copy link
Member Author

SrNetoChan commented Jul 24, 2017

I changed all dialogs with classify. @nirvn @nyalldawson let me know what you think.

I am still not sure about indenting the the widgets or not.

Singleband pseudocolor
(master | proposal)

image

Graduated by size
(master | proposal)

image

Graduated by color
(master | proposal)

image

Categorized
(master | proposal)

image

@nyalldawson
Copy link
Collaborator

I'm not convinced on the indented widgets either - seems like a lot of wasted space to me, in dialogs which need to be very space efficient to work well in dock mode.

Can you make sure that any change you make to the vector categorized widget is propagated to the unique/paletted raster widget too? That's been designed to mimic the same functionality as the categorized renderer so it'd be good to keep the widgets with similar UI.

@SrNetoChan
Copy link
Member Author

SrNetoChan commented Jul 25, 2017

@nyalldawson,

Can you make sure that any change you make to the vector categorized widget is propagated to the unique/paletted raster widget too? That's been designed to mimic the same functionality as the categorized renderer so it'd be good to keep the widgets with similar UI.

For categorized vectors (and all the others), we use a "Classify" button to populate all missing values. Would you oppose to use the same name in the raster palleted/unique one? I know it's not exactly the same, but it would add consistency to the dialogs, and the tooltip explains everything quite well.

Besides, would it be ok to change the "load from layer" text by an icon? In single band pseudocolor, we use this icon and tooltip to do a similar operation.

image

@SrNetoChan
Copy link
Member Author

I removed indentation for "mode". Meanwhile I realized that "Classify" button makes sense to be near the "add" and "remove buttons" as it as kinda the same functionality (it's an "add all values" button).

I also added some tooltips to the buttons.

image

image

image

I plan to propose some changes to the unique/paletted raster widgets to be more in line with these dialog, but I will prepare another PR for that.

@SrNetoChan
Copy link
Member Author

@nyalldawson @nirvn I know you guys are pretty busy trying to submit your own work before the feature freeze, but If you have a couple of minutes to look into this, I would appreciate it. thanks!

although I am not sure what is travis compaining about.

@SrNetoChan
Copy link
Member Author

@nyalldawson @nirvn All tests are now passing. Can any of you review this please?

Thanks!

@SrNetoChan
Copy link
Member Author

@nyalldawson @nirvn Do you guys think this PR is an interesting change? or should we just close it? Thanks!

@nyalldawson
Copy link
Collaborator

I think we should move forward with this. @SrNetoChan Can you summarise the current situation? Does this PR still apply?

@SrNetoChan
Copy link
Member Author

@nyalldawson I think it does. It's has been a long time since I have touched this. I will pull the recent master and see how it looks. Since we are already in feature freeze, I will also implement the palleted unique values dialog.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 5, 2018

Since we are already in feature freeze, I will also implement the palleted unique values dialog.

@SrNetoChan does this target 3.4 in this case and is not a simple UI fix that would make sense for 3.2 already?

@SrNetoChan
Copy link
Member Author

@nyalldawson @m-kuhn to summarize the situation of the pull request. The PR tries to improve the UX when using the vector categorized, graduated renderer dialogs, and the raster singleband pseudocolor, (and eventually palleted colors).

The changes are only at the UI level. Besides adding or improving some of the tooltips, the interpolation mode has been move from below the "values/class/range list" to near the interpolation method. At some point I was also proposing to move the classify button above, but I think it is in the right place.

Vector graduated by color

image

Vector gradauted by size

image

Raster singleband pseudocolor

image

Finally, I have changed the palleted/unique values widget to be more in line with the vector categorized and gradutaed widgets.

image

With that in mind, I wonder if all the buttons (reload from band, load from file, save to file) in the singleband widget shouldn't move to an "Advanced" dropdown menu as well. But this is not implemented.

image

@m-kuhn
Copy link
Member

m-kuhn commented Jun 10, 2018

What do you think about putting the classification parameters into a "Classify" group box, together with the "Classify" button? I think they contextually belong together and should somehow be separated from the rest of the configuration options.

@SrNetoChan
Copy link
Member Author

@m-kuhn I am not sure about that. They do belong together, but they are also related to the Values table. Isolating them in a group may be more confusing.

At some point I did join all the widgets in the same place, but then I came to the conclusion that the Classify button belongs to the button area. After all, the classify button is a "Add all values" or a "reload values from data" button.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 14, 2018

Do these fields change anything as long as the classify button is not clicked?

@SrNetoChan
Copy link
Member Author

@m-kuhn I don't think so. But I would need to test.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 15, 2018

For me, if widgets and a button are so closely tied together in their functionality, it makes sense to put them next to each other and away from other configuration elements.

In the current proposal I get the feeling that "Mode: Equal Interval" is a configuration option just like "Size: from 1 to 2 mm".

@m-kuhn
Copy link
Member

m-kuhn commented Jun 15, 2018

My favorite would probably be to put them where they were before at the bottom, put the Classify button next to the widgets (on the right), relabel it as "Reclassify" to make it clear it will delete current classes (it does IIRC) and maybe put it in a group box with the label "Reclassify".

@SrNetoChan
Copy link
Member Author

SrNetoChan commented Jun 15, 2018

In the current proposal I get the feeling that "Mode: Equal Interval" is a configuration option just like "Size: from 1 to 2 mm".

But that's the thing. The mode is related to the size interval (if one choose size as the Method), the coloramp (if method is color), the interpolation, and even the legend. It's when you click classify that all those options are put in use to fill the table.

My favorite would probably be to put them where they were before at the bottom, put the Classify button next to the widgets (on the right), relabel it as "Reclassify" to make it clear it will delete current classes (it does IIRC) and maybe put it in a group box with the label "Reclassify".

We would need to put everything inside that Reclassify group, because all those options are only used when you click the classify button (except for the column name in vector layer that you must set anyway).

If others prefer, I would not mind moving the classify button to the top of the table again (one of the earlier proposals). That would put everything together and might avoid people hitting the classify button by mistake. But putting it all in a group is a bit of overkill to me.

About the reclassify text, if my skill was good enough I would change it after the first use from "Classify" to "Reclassify". I think I can try that.

@m-kuhn
Copy link
Member

m-kuhn commented Jun 15, 2018

If others prefer, I would not mind moving the classify button to the top of the table again (one of the earlier proposals). That would put everything together and might avoid people hitting the classify button by mistake. But putting it all in a group is a bit of overkill to me.

About the reclassify text, if my skill was good enough I would change it after the first use from "Classify" to "Reclassify". I think I can try that.

For me this sounds like a good proposal, pinging @nirvn for his always useful inputs conerning UX

@nyalldawson nyalldawson added the UX label Jun 17, 2018
@nyalldawson
Copy link
Collaborator

We would need to put everything inside that Reclassify group, because all those options are only used when you click the classify button (except for the column name in vector layer that you must set anyway).

That's not strictly true - changing the color ramp takes affect immediately without requiring reclassification

@nyalldawson
Copy link
Collaborator

Ping @probot

@PeterPetrik
Copy link
Contributor

I tried to extract color ramp editor to separate widget in the PR: #7313 to be used for styling contours in mesh layers. It looks like we should cooperate these two initiatives?

@SrNetoChan
Copy link
Member Author

@PeterPetrik Do you agree about moving the classify button up as well?

@PeterPetrik
Copy link
Contributor

@SrNetoChan I do not have a preference, just I wanted to note that I extracted color ramp shader widget https://github.com/PeterPetrik/QGIS/blob/mesh_layer_styling_gui/src/gui/raster/qgscolorrampshaderwidget.h in the PR and as long as it is usable for both mesh and raster layers it is ok for me.

Also to note, I did not used it back in raster layer styling yet, since it is not merged and I wanted to do it in 2 steps. But I noticed this PR and it looks like it should be coordinated :)

@stale
Copy link

stale bot commented Jul 12, 2018

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 12, 2018
@SrNetoChan
Copy link
Member Author

SrNetoChan commented Jul 12, 2018 via email

@stale stale bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 12, 2018
@stale
Copy link

stale bot commented Jul 26, 2018

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 26, 2018
@stale
Copy link

stale bot commented Aug 2, 2018

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@stale stale bot closed this Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Uh oh! Seems this work is abandoned, and the PR is about to close.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants