-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs] Change the range slider example to be visible and workable as expected #30432
Conversation
ArseniyX
commented
Dec 28, 2021
•
edited
Loading
edited
- I have followed (at least) the PR section of the contributing guide.
Preview of Preview of |
@@ -14,13 +14,13 @@ export default function RangeSlider() { | |||
}; | |||
|
|||
return ( | |||
<Box sx={{ width: 300 }}> | |||
<Box sx={{ width: 300, mt: 4 }}> |
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.
Can you explain why you added this? This makes the component a bit off the center.
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.
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.
Inside codesandbox, yes, but it looks fine on docs page. This changes places the demo example on docs page off the center. We want to keep consistency between examples, so I'd leave it as it is for now.
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.
Inside codesandbox, yes, but it looks fine on docs page. This changes places the demo example on docs page off the center. We want to keep consistency between examples, so I'd leave it as it is for now.
I understand your point of view, but as for me functionality is much more important than design. It may be possible to add 'mt: "10%"' or 'mt: "5%"' instead?
@ArseniyX Hi, thanks for opening the PR. I don't clearly understand the scope of this PR though. It seems that you are trying to display "°C " together. I agree with that fix. Can you elaborate on your title ("to be visible and workable as expected")? |
<Slider | ||
getAriaLabel={() => 'Temperature range'} | ||
value={value} | ||
onChange={handleChange} | ||
valueLabelDisplay="auto" | ||
getAriaValueText={valuetext} |
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.
Why are you deleting this?
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.
Why are you deleting this?
getAriaValueText not adds the '°C' in the end, but with 'valueLabelFormat' its work as expected
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.
getAriaValueText
and valueLabelFormat
are not the same though. You can keep getAriaValueText
while adding valueLabelFormat
.
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.
getAriaValueText
andvalueLabelFormat
are not the same though. You can keepgetAriaValueText
while addingvalueLabelFormat
.
yes, perhaps you are right
👋 The migration PR has been merged. Please follow these steps to make sure that the contents are all updated. (Sorry for the inconvenience)
If you are struggle with the steps above, feel free to tag @siriwatknp |
This is not going in a direction we want to. I am closing it. Thanks for the work. |