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

fix(slider): set null check for value in slider #16157

Merged
merged 12 commits into from
Apr 25, 2024

Conversation

aninaantony
Copy link
Contributor

Closes #16141

Handling null check for value when the slider has a negative minimum value

Changelog

New

  • {{new thing}}

Changed

Added null check for value when the slider has a negative minimum value

Removed

  • {{removed thing}}

Testing / Reviewing

Slider component - value when slider has negative minimum value

Copy link
Contributor

github-actions bot commented Apr 10, 2024

DCO Assistant Lite bot All contributors have signed the DCO.

@aninaantony
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@aninaantony
Copy link
Contributor Author

recheck

@tay1orjones
Copy link
Member

tay1orjones commented Apr 10, 2024

From the linked issue #16141:

There are other parts of this file where value && is used to check the value which probably need reviewing too as they will all fail when the value is 0, which is a valid value and should be treated as such.

Did you find this to be the case? What's the best way to test this and validate that it is fixed?

@aninaantony
Copy link
Contributor Author

From the linked issue #16141:

There are other parts of this file where value && is used to check the value which probably need reviewing too as they will all fail when the value is 0, which is a valid value and should be treated as such.

Did you find this to be the case? What's the best way to test this and validate that it is fixed?

As mentioned in the bug, within the storybook playground, when I gave a negative minimum value (-100) and the slider value as 0, the slider was positioned towards the left side, as illustrated below.
image

However, with the fix mentioned , the value 0 is now correctly positioned as shown below.
image

@tay1orjones tay1orjones requested review from tw15egan and removed request for andreancardona April 15, 2024 16:31
Copy link

netlify bot commented Apr 23, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 6a1ae59
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/662a806828784c000884b1dc
😎 Deploy Preview https://deploy-preview-16157--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

Merged via the queue into carbon-design-system:main with commit 342e7f3 Apr 25, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Slider component does not handle "0" value correctly when the slider has a negative minimum value
3 participants