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

Consider changing default int spinbox step size to 1 #667

Open
jni opened this issue Sep 1, 2024 · 5 comments
Open

Consider changing default int spinbox step size to 1 #667

jni opened this issue Sep 1, 2024 · 5 comments

Comments

@jni
Copy link
Contributor

jni commented Sep 1, 2024

It is nicely documented that the default step size for the spin box is adaptive:

step (float, default: Undefined ) – The step size for incrementing the value, by default adaptive step is used

However when I just had a widget annotated as int recently I thought I was going crazy when all of a sudden the + would skip 10 numbers. Would it be possible/desirable to change the default to 1 when the data type is int? (For floats, indeed, the situation is more ambiguous.)

@tlambert03
Copy link
Member

i'll leave it up to you and @Czaki to decide that. I believe he was the one who proposed using adaptive step as default in #403. i'm fine without whatever you guys want

@Czaki
Copy link
Contributor

Czaki commented Sep 9, 2024

My experience is that when you operate with a big value it is more common that you want to change using bigger steep.

For example, if you have a threshold value of 8000, it is more common to change it to 8500 than to 8002.
Of course, if you try to select a socket number, it may be confusing.

But still for me, when a user creates a function widget, the expected step should be dynamic.

@jni
Copy link
Contributor Author

jni commented Sep 10, 2024

@Czaki but things like magnitude (thresholds) are usually represented as floats rather than ints, no? In many cases, ints are IDs/categories, and then skipping them makes no sense. (This was the case in the widget I was trying to make for inspecting track IDs. The same would be true for Labels, point IDs...)

I think there is something fundamentally different about how the spinbox should treat ints (where there is a natural step) and floats (which are continuous).

@Czaki
Copy link
Contributor

Czaki commented Sep 10, 2024

@Czaki but things like magnitude (thresholds) are usually represented as floats rather than ints, no? In many cases, ints are IDs/categories, and then skipping them makes no sense. (This was the case in the widget I was trying to make for inspecting track IDs. The same would be true for Labels, point IDs...)

I meet people, who works mainly on uint16 data and are using int as a threshold annotation.

But In general, I agree with you that we may suggest using float in such situations (in documentation). We may also keep an option to enable adaptive steep using proper annotation.

@kephale
Copy link

kephale commented Sep 13, 2024

For int my expectation is +/- 1 for buttons, unless the specific widget has different settings. I think folks will still want to be able to have their int's use an adaptive step size, but I don't expect adaptive step sizes to be the default.

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

No branches or pull requests

4 participants