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

Adds TreeView component color primitives #354

Merged
merged 6 commits into from
Sep 21, 2022
Merged

Conversation

mperrotti
Copy link
Contributor

We were using actionListItem.default.hoverBg for both the chevron hover background color and the node hover background color. This was a problem because that color has no transparency, so they were indistinguishable when stacked on top of eachother.

I opted for adding TreeView-specific primitives instead of global primitives. I don't see another use case for stacked hover colors. We can reconsider adding a global primitives when/if that case comes up.

Before
Screen Shot 2022-09-21 at 11 43 39 AM

After
Screen Shot 2022-09-21 at 11 43 59 AM

@mperrotti mperrotti requested a review from a team as a code owner September 21, 2022 15:44
@mperrotti mperrotti requested review from a team, simurai and pksjce September 21, 2022 15:44
@changeset-bot
Copy link

changeset-bot bot commented Sep 21, 2022

🦋 Changeset detected

Latest commit: 1368162

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/primitives Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2022

Variables changed
--- base/dist/scss/colors/_dark.scss	2022-09-21 17:17:40.694778180 +0000
+++ dist/scss/colors/_dark.scss	2022-09-21 17:17:27.046886574 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7681;
+    --color-tree-view-item-chevron-hover-bg: rgba(177,186,196,0.12);
     --color-fg-default: #c9d1d9;
--- base/dist/scss/colors/_dark_colorblind.scss	2022-09-21 17:17:40.714777960 +0000
+++ dist/scss/colors/_dark_colorblind.scss	2022-09-21 17:17:27.062886313 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7681;
+    --color-tree-view-item-chevron-hover-bg: rgba(177,186,196,0.12);
     --color-fg-default: #c9d1d9;
--- base/dist/scss/colors/_dark_dimmed.scss	2022-09-21 17:17:40.706778048 +0000
+++ dist/scss/colors/_dark_dimmed.scss	2022-09-21 17:17:27.054886444 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #636e7b;
+    --color-tree-view-item-chevron-hover-bg: rgba(144,157,171,0.12);
     --color-fg-default: #adbac7;
--- base/dist/scss/colors/_dark_high_contrast.scss	2022-09-21 17:17:40.710778004 +0000
+++ dist/scss/colors/_dark_high_contrast.scss	2022-09-21 17:17:27.058886378 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #9ea7b3;
+    --color-tree-view-item-chevron-hover-bg: #525964;
     --color-fg-default: #f0f3f6;
--- base/dist/scss/colors/_dark_tritanopia.scss	2022-09-21 17:17:40.718777916 +0000
+++ dist/scss/colors/_dark_tritanopia.scss	2022-09-21 17:17:27.066886248 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7681;
+    --color-tree-view-item-chevron-hover-bg: rgba(177,186,196,0.12);
     --color-fg-default: #c9d1d9;
--- base/dist/scss/colors/_light.scss	2022-09-21 17:17:40.666778489 +0000
+++ dist/scss/colors/_light.scss	2022-09-21 17:17:27.018887030 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7781;
+    --color-tree-view-item-chevron-hover-bg: rgba(208,215,222,0.32);
     --color-fg-default: #24292f;
--- base/dist/scss/colors/_light_colorblind.scss	2022-09-21 17:17:40.682778313 +0000
+++ dist/scss/colors/_light_colorblind.scss	2022-09-21 17:17:27.038886704 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7781;
+    --color-tree-view-item-chevron-hover-bg: rgba(208,215,222,0.32);
     --color-fg-default: #24292f;
--- base/dist/scss/colors/_light_high_contrast.scss	2022-09-21 17:17:40.678778357 +0000
+++ dist/scss/colors/_light_high_contrast.scss	2022-09-21 17:17:27.030886835 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #66707b;
+    --color-tree-view-item-chevron-hover-bg: #ced5dc;
     --color-fg-default: #0e1116;
--- base/dist/scss/colors/_light_tritanopia.scss	2022-09-21 17:17:40.690778224 +0000
+++ dist/scss/colors/_light_tritanopia.scss	2022-09-21 17:17:27.042886639 +0000
@@ -284,2 +284,3 @@
     --color-segmented-control-button-selected-border: #6e7781;
+    --color-tree-view-item-chevron-hover-bg: rgba(208,215,222,0.32);
     --color-fg-default: #24292f;

@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2022

🟢 No design token changes found

@mperrotti mperrotti temporarily deployed to github-pages September 21, 2022 15:48 Inactive
@mperrotti mperrotti temporarily deployed to github-pages September 21, 2022 17:13 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

🚀

@mperrotti mperrotti temporarily deployed to github-pages September 21, 2022 17:19 Inactive
@mperrotti mperrotti merged commit 3b28659 into main Sep 21, 2022
@mperrotti mperrotti deleted the mp/treeview-primitives branch September 21, 2022 17:48
@primer-css primer-css mentioned this pull request Sep 21, 2022
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