Page MenuHomePhabricator

[native] Introduce `ColorSelectorButton` component
ClosedPublic

Authored by abosh on Apr 20 2022, 10:27 AM.
Tags
None
Referenced Files
F3388916: D3790.diff
Fri, Nov 29, 4:37 PM
Unknown Object (File)
Tue, Nov 26, 7:33 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM
Unknown Object (File)
Sun, Nov 3, 4:58 PM

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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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?