-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[Slider] Add new tick visibility modes #2897
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
[Slider] Add new tick visibility modes #2897
Conversation
143cf5b
to
d4290db
Compare
803669f
to
6e0c04b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for making the change!! Sorry that I have been pretty occupied recently and forgot about the change.
No problem. Thanks a lot! |
Sorry for the delay. I'm working on this now. : ) |
I'm running into very weird issues when trying to merge the PR. Somehow the change blocks the argument validation from being done when running unit tests. I don't really have time to debug it yet. If you can help check that on your end it will also be very helpful. |
6e0c04b
to
76eed58
Compare
Checked, fixed, and rebased. |
76eed58
to
c520d86
Compare
Hey thanks for bumping this!! Sorry I missed your fix during my vacation. Sending this for internal review now. |
Hi, during the internal review, people raised that we are not sure what is the use scenario of Do you have an example of that? |
As for me, I don't like the current default behavior either, because in the "dense" case ticks stop pointing to the position you can drag the slider to. |
c520d86
to
86b3079
Compare
86b3079
to
b28f02e
Compare
b28f02e
to
5984d88
Compare
5984d88
to
9059210
Compare
Dan, can you provide some insights here? I think the latest conversation we had regarding this is we probably need designers' opinion. ^^; |
Just in case, I want to make it clear that this PR doesn't change the default behavior of the slider, but only adds two new strategies - |
9059210
to
6eab388
Compare
8785ab7
to
a19c637
Compare
@drchen any update on this? I talked with our designers and they are not keen on adding this change, especially |
If you want, I can delete However, the |
a19c637
to
051dfeb
Compare
051dfeb
to
f3dd354
Compare
Hey, if |
f3dd354
to
82e1130
Compare
Ok, done. P.S. It would also be great if someone would look at my other PRs as well. I realize that adding features is more fun than fixing bugs, refactoring, and reviewing other people's code, but I believe it still needs to be done. |
I'll take a look and try to merge this PR very soon, I know the delay is frustrating but we have a lot of things to consider internally so it's not just clicking the merge button unfortunately... |
Highlights
Slider.getTickVisibilityMode()
,Slider.setTickVisibilityMode(int)
, andapp:tickVisibilityMode
.visibleAll
- All tick marks will be drawn, even if they are spaced too densely and overlap each other.autoLimit
- (Default) All tick marks will be drawn if they are not spaced too densely. Otherwise, the maximum allowed number of tick marks will be drawn.autoHide
- All tick marks will be drawn if they are not spaced too densely. Otherwise, the tick marks will not be drawn.hidden
- Tick marks will not be drawn at all.Slider.setTickVisible(boolean)
is deprecated in favor ofSlider.setTickVisibilityMode(int)
.app:tickVisible
is deprecated in favor ofapp:tickVisibilityMode
.Migration
Slider.setTickVisible(true)
->Slider.setTickVisibilityMode(TICK_VISIBILITY_AUTO_LIMIT)
Slider.setTickVisible(false)
->Slider.setTickVisibilityMode(TICK_VISIBILITY_HIDDEN)
app:tickVisible="true"
->app:tickVisibilityMode="autoLimit"
app:tickVisible="false"
->app:tickVisibilityMode="hidden"