Page MenuHomePhabricator

[native] Introduce `ColorSelectorButton` component
ClosedPublic

Authored by abosh on Apr 20 2022, 10:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 7:46 PM
Unknown Object (File)
Wed, Dec 11, 8:21 PM
Unknown Object (File)
Mon, Dec 2, 6:11 AM
Unknown Object (File)
Sat, Nov 30, 3:53 AM
Unknown Object (File)
Sat, Nov 30, 3:00 AM
Unknown Object (File)
Sat, Nov 30, 1:52 AM
Unknown Object (File)
Sat, Nov 30, 1:18 AM
Unknown Object (File)
Sat, Nov 30, 1:18 AM

Details

Summary

First step in redesigning the ColorPicker component on native to match the ColorSelector component on web introduced by @atul.

ColorSelectorButton is a new component that will work with ColorSelector to replace ColorPicker on native.

See the full plan for the ColorPicker redesign in this Linear issue.

Test Plan

Tested on iOS 15.4 and works as expected:

Screen Shot 2022-04-20 at 10.27.59 AM.png (1×1 px, 593 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

abosh added 1 blocking reviewer(s): atul.
abosh edited the summary of this revision. (Show Details)
abosh retitled this revision from [native] Redesign `native` `ColorPicker` component to [native] Introduce `ColorSelector` component.Apr 20 2022, 10:35 AM
abosh edited the summary of this revision. (Show Details)

Modify this diff to only include ColorSelectorButton.

abosh retitled this revision from [native] Introduce `ColorSelector` component to [native] Introduce `ColorSelectorButton` component.Apr 20 2022, 4:50 PM
abosh edited the summary of this revision. (Show Details)

Memoized the backgroundColor style attribute for ColorSelectorButton.

This comment was removed by abosh.

Updated memoization to memoize array passed into style prop for the View in ColorSelectorButton.

In general we should avoid treating a diff as a scratchpad / space for iteration. If you put up a diff and realize that some changes are needed before it can be reviewed, you should remove it from your reviewer's queue using the "Plan Changes" action, and try to avoid updating it again until it's really ready for review. (If you end up needing to update it, but it's still not ready for review after the update, then you should hit "Plan Changes" again)

This revision is now accepted and ready to land.Apr 24 2022, 2:18 PM
native/components/color-selector-button.react.js
21 ↗(On Diff #11689)

I think this can be 20?