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

Slider 'enableShadow' prop and ColorPicker - minor UI changes #2934

Merged
merged 4 commits into from Feb 5, 2024

Conversation

Inbal-Tish
Copy link
Collaborator

@Inbal-Tish Inbal-Tish commented Feb 4, 2024

Description

Slider - add 'enableShadow' prop
GradientSlider - display color only changes on hue change
ColorPicker - minor UI changes
Slider - bug fix - invoke onChange only when user move slider

Changelog

Slider - add 'enableShadow' prop
GradientSlider - display color only changes on hue change
ColorPicker - minor UI changes
Slider - bug fix - invoke onChange only when user move slider

Additional info

MADS-3847

Copy link
Collaborator

@ethanshar ethanshar left a comment

Choose a reason for hiding this comment

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

Wrote small comments.
Anyway approved.

Btw, I pushed a small change in the screen name

Comment on lines +93 to +95
borderBottomWidth: 0.5,
borderBottomColor: Colors.$outlineDisabled,
borderTopWidth: 0.5,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider using StyleSheet.hairlineWidth for the thin border..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice!

const [color, setColor] = useState(Colors.getHSL(propsColors));

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove extra space

@@ -94,25 +94,31 @@ const GradientSlider = (props: Props) => {
return color || sliderContext.value;
}, [color, sliderContext.value]);

const renderDefaultGradient = useCallback(() => {
const getHueColor = useCallback(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It feels like this should be a memoize value more than a callback.. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Good idea

@Inbal-Tish Inbal-Tish merged commit ef7e387 into master Feb 5, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the feat/Slider_changes branch February 5, 2024 08:51
@Inbal-Tish Inbal-Tish added this to the Quality milestone Feb 5, 2024
Inbal-Tish added a commit that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants