Page MenuHomePhabricator

[web] Create `ColorSelectorButton`s in `ColorSelector` iteratively to reduce repetition
ClosedPublic

Authored by atul on Apr 11 2022, 1:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 3:05 PM
Unknown Object (File)
Mon, Nov 11, 1:35 AM
Unknown Object (File)
Fri, Nov 8, 10:42 PM
Unknown Object (File)
Fri, Nov 8, 10:42 PM
Unknown Object (File)
Tue, Nov 5, 8:44 PM
Unknown Object (File)
Oct 16 2024, 11:26 PM
Unknown Object (File)
Oct 14 2024, 1:17 AM
Unknown Object (File)
Oct 14 2024, 1:17 AM

Details

Summary

Instead of copy/pasting this 10 times, we can easily create ColorSelectorButtons iteratively thanks to the flex-wrap layout.


Depends on D3703

Test Plan

Things continue to look/behave as expected:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 11 2022, 1:51 PM
Harbormaster failed remote builds in B8096: Diff 11323!
atul requested review of this revision.Apr 11 2022, 1:56 PM

Do we have a plan for threads that have legacy colors (arbitrary)?

This revision is now accepted and ready to land.Apr 12 2022, 3:39 AM

Do we have a plan for threads that have legacy colors (arbitrary)?

Yeah the plan is:

  1. Redesign the existing color picker component in native
  2. Write a DB migration that "snaps" thread colors to the closest "selectedThreadColor" (probably using tinycolor)
  3. Modify code on the server to similarly "snap" thread colors to closest "selectedThreadColor" to handle users who may be on old clients (with the old color picker)