Page MenuHomePhabricator

[web] Use `tinycolor.equals(a, b)` in `ColorSelectorButton`
ClosedPublic

Authored by atul on Apr 11 2022, 12:10 PM.
Tags
None
Referenced Files
F3489458: D3701.diff
Wed, Dec 18, 12:43 PM
Unknown Object (File)
Tue, Dec 17, 6:57 AM
Unknown Object (File)
Nov 16 2024, 10:22 PM
Unknown Object (File)
Nov 15 2024, 6:08 AM
Unknown Object (File)
Nov 15 2024, 6:08 AM
Unknown Object (File)
Nov 13 2024, 12:48 PM
Unknown Object (File)
Nov 5 2024, 8:44 PM
Unknown Object (File)
Oct 15 2024, 12:09 AM

Details

Summary

Replace .toLowercase() string comparison with tinycolor2.equals() which handles that + # prefix existing/missing + 3 char vs 6 char vs 8 char hex etc. for us. Not that we expect to run into those here, but it seems like a more "robust" way to do color comparison?


Depends on D3700 (I guess)

Test Plan

Things continue to work as expected.

  1. Opened ThreadSettingsModal
  2. Selected a color
  3. Hit save and ensured the thread color was changed to the selected color

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.Apr 11 2022, 12:20 PM
This revision is now accepted and ready to land.Apr 11 2022, 12:42 PM
This revision was landed with ongoing or failed builds.Apr 13 2022, 11:03 AM
This revision was automatically updated to reflect the committed changes.