Page MenuHomePhabricator

[web] Introduce `ColorSelectorButton` component with basic styling
ClosedPublic

Authored by atul on Apr 7 2022, 3:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:07 AM
Unknown Object (File)
Sun, Dec 29, 9:06 AM
Unknown Object (File)
Sun, Dec 29, 9:04 AM

Details

Summary

Introduce ColorSelectorButton component with basic styling.

Note: The actual functionality will be introduced in subsequent diffs.

Test Plan

Looks as expected (each of the colored circles is a ColorSelectorButton):

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Apr 7 2022, 3:05 PM

use --shades-black-80 instead of #404040

The color picker looks cool!
Suggested some small fixes

web/modals/threads/color-selector-button.css
4 ↗(On Diff #11205)

It probably doesn't matter much, but I suppose border-radius could be 50% (or 24px here), to create a circle? (and in line 21 as well)

14 ↗(On Diff #11205)

I think, we decided not to use color variables directly, but create additional color variables for every component in theme.css:

/* Never use color values defined here directly in CSS. Add color variables to "Color Theme" below

web/modals/threads/color-selector-button.react.js
15–16 ↗(On Diff #11205)

We can use simplified syntax

This revision now requires changes to proceed.Apr 8 2022, 2:50 AM
atul marked 3 inline comments as done.Apr 8 2022, 10:00 AM

address feedback from @def-au1t

Add me back if you need me

jacek added inline comments.
web/theme.css
141 ↗(On Diff #11249)

I think, we should keep naming convention:

Add a color value to the theme below, and then use it in your CSS.
naming convention:

  • bg: background.
  • fg: foreground.
  • color: text-color
This revision is now accepted and ready to land.Apr 10 2022, 11:16 PM
atul marked an inline comment as done.Apr 11 2022, 8:59 AM
atul added inline comments.
web/theme.css
141 ↗(On Diff #11249)

ah thanks for catching that, updated this diff with changes

This revision was automatically updated to reflect the committed changes.
atul marked an inline comment as done.