feat(Slider): add experimental slider - #1683
Conversation
|
Deploy preview for carbon-components-react ready! Built with commit 6d88eed https://deploy-preview-1683--carbon-components-react.netlify.com |
| } | ||
|
|
||
| UNSAFE_componentWillReceiveProps(nextProps) { | ||
| if (!sliderValuePropSync && !isEqual(nextProps, this.props)) { |
There was a problem hiding this comment.
The removal here seems a breaking change, please see: #1370
| <TextInput | ||
| type={inputType} | ||
| id="input-for-slider" | ||
| id={`input-for-slider${id}`} |
There was a problem hiding this comment.
We tend to use ${id} as a prefix instead of a suffix (e.g. https://github.com/IBM/carbon-components-react/blob/v6.39.0/src/components/Select/Select.js#L31) - Wondering if it'd make sense to align the convention.
d09f186 to
37f63fa
Compare
37f63fa to
16cb84a
Compare
c18724d to
aff2cd8
Compare
|
@asudoh probably is not blocked but the topic discussed in #1681 is still something to consider in the future I believe |
|
@asudoh the visual bug we are seeing in the React implementation is caused by the problem addressed in https://github.com/IBM/carbon-components-react/issues/1681 and #1684 Our React so we end up rendering <div class="bx--form-item">
<input>
</div>rather than just <input> |
aff2cd8 to
67f271d
Compare
|
@emyarod As we discussed the slider element order issue is caused by https://github.com/IBM/carbon-components/pull/1315/files#diff-f8f1a0577791a85d255a9cdf4e2f791fR30 - Did you see it differently, or were you talking about another issue? Any more background? |
|
@asudoh from what I can tell, the issue is caused by our https://github.com/IBM/carbon-components-react/blob/master/src/components/Slider/Slider.js#L464 https://github.com/IBM/carbon-components-react/blob/master/src/components/TextInput/TextInput.js#L77 removing this wrapper causes the input box to be positioned correctly I believe this line is also relevant in why a wrapper div would ruin the order of the elements https://github.com/IBM/carbon-components/pull/1315/files#diff-f8f1a0577791a85d255a9cdf4e2f791fR38 |
|
Thank you for the details @emyarod! I think the last link explains the issue the best. That said, when you remove the wrapper div, would you try adding |
67f271d to
bd70265
Compare
|
@asudoh it looks like the new parent node already contains |
|
@emyarod Thank you for taking a look - Further investigation revealed that I was confused From that, I see two approaches to fix the problem:
Thoughts...? |
bd70265 to
39880cf
Compare
|
blocked by carbon-design-system/carbon#1640 |
4184c4e to
9c97e21
Compare
9c97e21 to
6d88eed
Compare
|
updated to include changes from carbon-design-system/carbon#1640 |
|
🎉 This PR is included in version 6.81.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes IBM/carbon-components-react#1682
This PR will add the new experimental slider changes
related https://github.com/IBM/carbon-components-react/issues/1681