react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

Infra/color picker to reanimated

Open nitzanyiz opened this issue 1 year ago • 0 comments

Description

ColorPicker Notes:

  1. ColorPickerDialog changed to use a SharedValue color and pass it to the ColorPickerContext.
  2. ColorPickerHeader changed to take validity from ColorPickerContext.
  3. ColorPickerSliders changed to use initialColor as the color from the ColorPickerContext - NEED TO SOMEHOW USE THE STATEFUL COLOR SO IT WOULD CHANGE THE INITIAL VALUE OF THE SLIDERS LOCATION.
  4. ColorPickerPresenter - Added worklet functions.
  5. ColorPickerPreview - Added conditional rendering of the TextInput so it would be reactive when the users wants to change the value manually.
  6. AnimatedGradient - A gradient component that its color is a sharedvalue.
  7. GradientSlider - change to conditionally render an animated gradient if is in the context of the colorpicker - MIGHT WANT TO CHANGE THAT IT WOULD ACCEPT A SHAREDVALUE COLOR WITHOUT THE CONTEXT OF THE CONTEXT.
  8. Slider - Added prop to know if the handlers are worklet function so it wont have to run them on the JS thread.

// TODO:

  1. When changing the color manually from the textinput the hue slider doesn't change - bug comes from hslToHex function.
  2. Make sliders change the initial value thumb location when the color is change manually.

Changelog

None

Additional info

None

nitzanyiz avatar Feb 20 '24 08:02 nitzanyiz