Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused colors from palette.json #1546

Open
ptbrowne opened this issue Sep 8, 2020 · 0 comments
Open

Remove unused colors from palette.json #1546

ptbrowne opened this issue Sep 8, 2020 · 0 comments

Comments

@ptbrowne
Copy link
Contributor

ptbrowne commented Sep 8, 2020

At the moment, we generate a lot of utility classes from colors.
I think it'd be better to have fewer colors in what we make
available as utility classes since:

  1. We should use semantic colors instead of absolute colors most of
    the time
  2. It increases the build size

Here are some stats on the usage of utility classes for colors:

libs
  15 u-error
   8 u-weirdGreen
   5 u-coolGrey
   3 u-pomegranate
   2 u-slateGrey
   2 u-primaryColor
   1 u-valid
   1 u-bg-paleGrey
   1 u-bg-black
drive
   4 u-overlay
   3 u-pomegranate
   2 u-error
   1 u-coolGrey
banks
   3 u-valid
   3 u-slateGrey
   3 u-error
   2 u-coolGrey
   1 u-warn
   1 u-bg-chablis
notes
   1 u-charcoalGrey
contacts
   4 u-slateGrey
   4 u-bg-paleGrey
home
   3 u-pomegranate
   1 u-silver
settings
   1 u-lightishPurple
   1 u-dodgerBlue
   1 u-black
for app in libs drive banks notes contacts home settings
  echo $app
  pushd $app
  rg -o --no-filename "u-(bg-)?(black|white|paleGrey|silver|coolGrey|slateGrey|charcoalGrey|overlay|zircon|frenchPass|dodgerBlue|scienceBlue|puertoRico|grannyApple|emerald|malachite|seafoamGreen|brightSun|texasRose|chablis|yourPink|fuchsia|pomegranate|monza|portage|azure|melon|blazeOrange|mango|pumpkinOrange|lavender|darkPeriwinkle|purpley|lightishPurple|barney|weirdGreen|primaryColor|primaryColorLight|primaryContrastTextColor|valid|warn|error|errorBackgroundLight|primaryBackgroundLight|neutralBackground)" | sort | uniq -c | sort -rn
  popd
end

And we should not use the palette from cozy-ui directly:

libs
   3 palette['coolGrey']
   1 palette['white']
   1 palette['slateGrey']
drive
   2 palette['monza']
   2 palette['dodgerBlue']
   1 palette['emerald']
   1 palette['coolGrey']
banks
notes
contacts
   4 palette['coolGrey']
home
   2 palette['monza']
   2 palette['dodgerBlue']
   1 palette['emerald']
settings
   2 palette['emerald']
for app in libs drive banks notes contacts home settings
  echo $app
  pushd $app
  rg -o --no-filename "palette\[.(black|white|paleGrey|silver|coolGrey|slateGrey|charcoalGrey|overlay|zircon|frenchPass|dodgerBlue|scienceBlue|puertoRico|grannyApple|emerald|malachite|seafoamGreen|brightSun|texasRose|chablis|yourPink|fuchsia|pomegranate|monza|portage|azure|melon|blazeOrange|mango|pumpkinOrange|lavender|darkPeriwinkle|purpley|lightishPurple|barney|weirdGreen|primaryColor|primaryColorLight|primaryContrastTextColor|valid|warn|error|errorBackgroundLight|primaryBackgroundLight|neutralBackground).\]" | sort | uniq -c | sort -rn
  popd
end
@ptbrowne ptbrowne added the perf label Sep 22, 2020
@Ldoppea Ldoppea added this to Issues in Issues triage Oct 6, 2021
@Ldoppea Ldoppea moved this from Issues to Old issues, verify if still needed in Issues triage Oct 11, 2021
@JF-Cozy JF-Cozy removed the perf label Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issues triage
Old issues, verify if still needed
Development

No branches or pull requests

2 participants