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
F3494139: D3701.id11443.diff
Thu, Dec 19, 4:25 AM
F3494138: D3701.id11442.diff
Thu, Dec 19, 4:25 AM
F3494137: D3701.id11373.diff
Thu, Dec 19, 4:25 AM
F3494136: D3701.id11315.diff
Thu, Dec 19, 4:25 AM
F3494108: D3701.id.diff
Thu, Dec 19, 4:24 AM
F3494085: D3701.diff
Thu, Dec 19, 4:21 AM
F3490505: D3701.id11442.diff
Wed, Dec 18, 4:28 PM
F3490393: D3701.id11315.diff
Wed, Dec 18, 4:08 PM

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
Lint Not Applicable
Unit
Tests Not Applicable

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.