Skip to content

Conversation

@tvst
Copy link
Contributor

@tvst tvst commented Mar 6, 2021

I did a design pass on our themes, and in the process of cleaning up our colors Abhi and I realized that it would be better if we replaced secondaryColor with a set of calculated colors. So what this PR does is:

  1. Tweaks a bunch of colors. See the checked-off items on this page for a subset of the changes.
  2. Removes secondaryColor.
  3. Cleans up the settings dialog a little bit. It didn't do much to the theme editor, though. I believe Abhi is going to sync with Vincent on additional improvements there.

You can see the end results here

NOTE:

  1. This PR has no tests!!! It's a "design PR", only meant to show what things are supposed to look like. It's possible it needs to be completely reworked by some engineer. Don't actually merge this! 😆 (Edit: Vincent is taking this on!)
  2. See /src/theme/utils.ts line 292. I left a question in there about what variable names we should use.

@tvst tvst requested review from a team and vdonato March 6, 2021 01:09
Copy link
Collaborator

@vdonato vdonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to merge this into the theming branch rather than theming-v0.4, which is a cut branch for that beta release.

This LGTM once the snapshots are updated and tests are fixed to remove references to secondaryColor. Happy to take over this PR and push it past the finish line if you'd like.

Note that there may be a ton more snapshots to update after the current theming branch is merged into this one as karrie recently changed a lot of existing e2e tests to take snapshots in both light and dark mode.

Comment on lines -820 to -825
_create_option(
"theme.secondaryColor",
description="""
Used to style secondary interface elements. It provides more ways to
accent and distinguish your app. Having it is optional.
""",
Copy link
Collaborator

@vdonato vdonato Mar 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We'll also want to get rid of the secondary_color proto field in NewReport.proto

Comment on lines +292 to +301
// XXX Are these supposed to be semantic names? Or color names?

fadedText10: transparentize(genericColors.bodyText, 0.9), // Mostly used for 1px lines.
fadedText40: transparentize(genericColors.bodyText, 0.6), // Backgrounds.
fadedText60: transparentize(genericColors.bodyText, 0.4), // Secondary text.

darkenedBgMix15: hasLightBg ? darken(bgMix, 0.075) : lighten(bgMix, 0.15), // Widget details, focus.
darkenedBgMix60: hasLightBg ? darken(bgMix, 0.3) : lighten(bgMix, 0.6), // Icons.

lightenedBg05: lighten(genericColors.bgColor, 0.025), // Button, checkbox, radio background.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The object returned here ends up containing both since genericColors gets copied into it via the spread operator above (and genericColors itself contains all of the color primitives from primitives/colors.ts), but I believe everything defined at this point is a semantic name.

How all of these colors are organized unfortunately needs to be reworked pretty badly as it seems like the exact meanings of things started getting more and more muddled as development went on,

@tvst tvst changed the title Theming design pass [Design PR - not for merging] Theming design pass Mar 10, 2021
@vdonato
Copy link
Collaborator

vdonato commented Mar 11, 2021

Going to close this one as all of the changes made here now live in #2921

@vdonato vdonato closed this Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants