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

Graduated classification w. fixed interval: fix or mitigate UX issue #51714

Conversation

elpaso
Copy link
Contributor

@elpaso elpaso commented Feb 2, 2023

Fix #51687 by using a timer to detect end of typing in the interval spinbox.

Fix qgis#51687 by using a timer to detect end oftyping in the interval
spinbox.
@elpaso elpaso added GUI/UX Related to QGIS application GUI or User Experience Bug Either a bug report, or a bug fix. Let's hope for the latter! labels Feb 2, 2023
@github-actions github-actions bot added this to the 3.30.0 milestone Feb 2, 2023
@nyalldawson
Copy link
Collaborator

@elpaso I've proposed an alternative fix here which avoids the timer logic (and also avoids the overhead of the unwanted changed/widget update cycle) here #51720

Keen on your thoughts as to which is preferable

@elpaso
Copy link
Contributor Author

elpaso commented Feb 3, 2023

@nyalldawson I tested your PR and it doesn't seem to fix the issue. I still get continuous updates while typing.

@nicogodet
Copy link
Member

I downloaded Nyall's mingw build and give it a try on Monday

@nyalldawson
Copy link
Collaborator

@elpaso

What am I missing? here's what I see with my branch:

Peek.2023-02-06.10-56.mp4

@nicogodet
Copy link
Member

Yeah I confirm that Nyall's PR fixes the issue
Animation4

The handle of . , for the displayed value in spinbox is delayed which solves the described issue while we still get continuous update of graduated classes

@elpaso
Copy link
Contributor Author

elpaso commented Feb 6, 2023

I tested your branch with the world layer and a costly expression which involves $area, this takes a decent amount of time to calculate when the fixed interval is small.

In that case, when you type the first digit it starts calculating and freezes the GUI even if you type fast.
I cannot see another solution than a timer to guess the "end of typing" event.

Also, the original bug of misinterpretation of decimals was due to non-english locale with comma separator for decimals.

But if you feel ok with this solution I have no objections.

@nicogodet
Copy link
Member

I agree that the freezing UI is a bit annoying but personally, I prefer this rather than misinterpretation of decimals.
Maybe a mix of your PR ?

@elpaso
Copy link
Contributor Author

elpaso commented Feb 6, 2023

I agree that the freezing UI is a bit annoying but personally, I prefer this rather than misinterpretation of decimals. Maybe a mix of your PR ?

Wasn't the misinterpretation of decimals fixed (or mitigated) by my PR too?

But yes, I also though of merging the two approaches.

@nicogodet
Copy link
Member

Wasn't the misinterpretation of decimals fixed (or mitigated) by my PR too?

Not fully fixed if you stop typing and timer triggers the update
Animation5

@nyalldawson
Copy link
Collaborator

I also think we'll need both for the best experience 👍

@elpaso
Copy link
Contributor Author

elpaso commented Feb 6, 2023

@nyalldawson I'll cherry-pick your commit and re-test the merge if that's ok with you.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 21, 2023
@elpaso elpaso removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Feb 21, 2023
@elpaso
Copy link
Contributor Author

elpaso commented Feb 21, 2023

@nyalldawson what do we do with this (and yours #51720 PR) ?

Summarizing:

I honestly don't care who is right but this seems a big waste of time, should we merge both?

@nyalldawson
Copy link
Collaborator

I definitely think both should be merged. I'd like to see us take more caution in future of unnecessary immediate responses to keystrokes, just like you've done here, so this PR is very welcome. But the other one is also desirable because it will fix the case when a user "pauses" mid-way through entering a new value.

So let's merge this, then I'll get mine ready to merge too.

@nyalldawson nyalldawson merged commit 857cefa into qgis:master Feb 23, 2023
@elpaso elpaso deleted the bugfix-gh51687-classification-graduated-interval-ux-issue branch February 23, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GUI/UX Related to QGIS application GUI or User Experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird interval QgsDoubleSpinbox behavior in graduated symbology with fixed interval
3 participants