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

Add core component changes for modern v5.x colors #4915

Merged
merged 42 commits into from
Sep 24, 2021

Conversation

johnly13
Copy link
Contributor

@johnly13 johnly13 commented Sep 16, 2021

Changes proposed in this pull request:

  • Add style/color changes for core components using new v5.x colors
  • Write simple test app
  • Verify last remaining components
    • Checkbox
    • Radio
    • Slider
    • Switch
    • Tooltip

Not done in this PR (punting for future PRs)

  • Add styling updates for other component packages (datetime, select, table)
  • Clean up packages/core/src/blueprint-modern.scss - break Sass code out into individual files based on component

Reviewers should focus on:

Screenshot

@johnly13
Copy link
Contributor Author

I thought about if these changes should live in @bluieprintjs/colors/lib/css/colors.css instead, but I don't think that'll work since the colors would need to be imported before the components in packages/core, meaning that the style changes would be overwritten when importing the components.

I could instead set the variables I need to set in @blueprintjs/colors/lib/css/colors.css and then have a separate file (e.g. $blueprintjs/colors/lib/css/modern-colors-components.css) with all of the component changes, which I can import after importing the components in @blueprintjs/core.

@blueprint-bot
Copy link

Fix compile issues

Previews: documentation | landing | table

@blueprint-bot
Copy link

Add testing app to test component changes

Previews: documentation | landing | table

}

// Contrast for icons
.#{$ns}-icon:not([class*="#{$ns}-intent-"]) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default the non-intent colors use $pt-text-color instead of $pt-icon-color (i.e. $pt-text-color-muted) and likewise for dark mode, because they were being imported from body:
Screen Shot 2021-09-21 at 15 33 25

I've overwritten the color here so that we don't just default to the default text colors/to match the colors that are in the proposed designs, but I'm not sure if this will break anything down the line. I.e., if we're breaking icon color inheritance somewhere else

Copy link
Contributor

Choose a reason for hiding this comment

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

Icons are supposed to inherit text color in this way, so yeah, I think this could break something further up the application stack.

What was the goal of setting this particular line with color? Where do we see it in effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was originally to fix the info icon for callouts, dialogs, and toasts. I was able to fix these in each of those components so this is no longer necessary

Screen Shot 2021-09-23 at 14 17 07

Screen Shot 2021-09-23 at 14 16 57

Screen Shot 2021-09-23 at 14 16 35

Screen Shot 2021-09-23 at 14 18 15

@blueprint-bot
Copy link

Tweak examples and fix slider styles

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Fix checkbox/radio styles

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Add disabled component examples and fix switch styles

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Fix disabled button styles

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Fix icon colors for toast

Previews: documentation | landing | table | demo

@blueprint-bot
Copy link

Fix tooltip example

Previews: documentation | landing | table | modern colors demo

@blueprint-bot
Copy link

Remove unnecessary dependency

Previews: documentation | landing | table | modern colors demo

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

overall looks pretty good

packages/demo-app/package.json Outdated Show resolved Hide resolved
packages/demo-app/src/styles/_examples.scss Show resolved Hide resolved
packages/core/src/blueprint-modern.scss Outdated Show resolved Hide resolved
}

// Contrast for icons
.#{$ns}-icon:not([class*="#{$ns}-intent-"]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Icons are supposed to inherit text color in this way, so yeah, I think this could break something further up the application stack.

What was the goal of setting this particular line with color? Where do we see it in effect?

packages/core/src/blueprint-modern.scss Outdated Show resolved Hide resolved
packages/core/src/blueprint-modern.scss Outdated Show resolved Hide resolved
packages/core/src/blueprint-modern.scss Show resolved Hide resolved
packages/core/src/blueprint-modern.scss Show resolved Hide resolved
@aycai
Copy link
Contributor

aycai commented Sep 23, 2021

Some dots on the last demo link above:

  • Checkbox and radio: in dark mode has an inner border on static and hover modes, I believe should be an outer border (like active state and selected states)
  • Editable text: disabled text should use disable styling that matches disable text elsewhere
  • HTML table: dark mode hover state might look like it's using the old blue? I could be wrong here (couldn't catch it in the inspector)
  • Input: dark mode intent borders should be using $color4
  • Tag: dark mode hover state on solid backgrounds changes the text color to a gray
  • Tree: dark mode selected state for intent icon doesn't appear to change (right now blends into the selected BG)

@blueprint-bot
Copy link

Fix for comments

Previews: documentation | landing | table | modern colors demo

@johnly13
Copy link
Contributor Author

@aycai addressed your design comments. Only thing that I didn't directly touch was your comment about the HTML table - the blue text I used there is just hard coded, since we don't have any default intent colors for Text.

@aycai
Copy link
Contributor

aycai commented Sep 23, 2021

Ahh shoot I misspoke re: html table dark mode - I was looking at the background color for the hover state that looked closer to the previous gray in hue. Sorry about that!

@blueprint-bot
Copy link

Address design comments

Previews: documentation | landing | table | modern colors demo

@aycai
Copy link
Contributor

aycai commented Sep 23, 2021

Final nit on tree: not sure how icon color is defined in that context but it should be $color5 for dark mode, looks like it's $color2 (which is the color for light mode) in the test app.

Otherwise updates look good!

@johnly13
Copy link
Contributor Author

@aycai fixed!

@blueprint-bot
Copy link

Fix dark mode icons for trees

Previews: documentation | landing | table | modern colors demo

@adidahiya adidahiya merged commit 1de7170 into develop Sep 24, 2021
@adidahiya adidahiya deleted the johnlee/modern-colors-component-changes branch September 24, 2021 03:55
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.

4 participants