-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(module:slider): fix slider style + reverse marks if reversed slider #6006
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## master #6006 +/- ##
==========================================
- Coverage 89.95% 89.90% -0.06%
==========================================
Files 465 465
Lines 14044 14063 +19
Branches 2307 2313 +6
==========================================
+ Hits 12633 12643 +10
- Misses 863 871 +8
- Partials 548 549 +1
Continue to review full report at Codecov.
|
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.
LGTM. Better to add some tests. 😄
@wendellhu95 I added some tests, can you review this again? Thanks! |
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.
LGTM and there are even tests now.
@wendellhu95 or @hsuanxyz Is it possible to review this PR again? |
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.
LGTM, @wendellhu95
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.
LGTM~
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently the marks and steps of sliders don't get updated when the slider get reversed. When you reverse a slider with marks, the '0' mark will be under value 100 and the '100' mark will be under value 0. The same thing happens for steps, when you have slider value 50 the '0' step doesn't show as 'active', while the '100' step does.
Issue Number: N/A
What is the new behavior?
Now the marks get built while taking the reversed state of the slider into account. The marks also stay under the right value.
The main issue I wanted to solve here is the styling of the steps. But while testing I saw that the marks didn't do what I was expecting either, so I added the functionality that they stay under the right value. If you think this isn't what the marks should do, please tell me so that I can remove it from this PR.
Does this PR introduce a breaking change?
Other information