-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Filters] consolidate se23 logic and styles #10178
Conversation
background: var(--p-color-bg-subdued); | ||
|
||
#{$se23} & { | ||
background: var(--p-color-bg-secondary-experimental); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a remnant from the subdued > secondary token migration.
On one hand, I think the intention here is to apply secondary-experimental
instead of subdued
.
On the other hand, the active background color is noticeably different to the default background color feels good (even if it is a bug)
Not a designer though, so defering to @sarahill or @bernardojoaogarcia to weigh in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong Bernardo, I also don't have the required skills to assess this properly. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that @bernardoamc, not sure how you got tagged instead 🙏
This UI test change appears to be another case of $se23 styles (unintentionally) taking precedence over relevant non se23 styles. In this case disabled background and border styles were being overridden by base $se23 background and border styles. I'm unclear as to whether or not this is intentional though (or desired), deferring to designers again 🙏 @bernardojoaogarcia @sarahill |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the prod states of the "Add filter" button are messed up, according to Figma the default state is supposed to be white
![Screenshot 2023-08-23 at 11 35 15 AM](https://private-user-images.githubusercontent.com/20652326/262722540-8e1c3199-8a7f-425d-9e95-f4004fcb2357.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3ODM3NTMsIm5iZiI6MTcyMTc4MzQ1MywicGF0aCI6Ii8yMDY1MjMyNi8yNjI3MjI1NDAtOGUxYzMxOTktOGE3Zi00MjVkLTllOTUtZjQwMDRmY2IyMzU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI0VDAxMTA1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyYTFmYTRkMDkxNTFkNmMxNGVmYjRiZjcwZTg1MmE5NWQzNjY1ODJkMDVjOWFkYzI5YTMwMDQ1ZTFjM2MwMzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.V4xgey8XP649ZvK27T5R-XUpsAbiIu6lRzU2Y-qiYB4)
Also I think the old disabled "Add filter" state with the dotted line is correct
Made a small comment about the "Clear all" button spacing changing
@@ -247,32 +227,22 @@ | |||
} | |||
|
|||
.ClearAll { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, there is a difference in spacing for the clear all button in this PR vs. prod. See the IndexTable with filtering story
Before | After |
---|---|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sophschneider this looks to be a result of this change to button variants. I've changed this to monochromePlain
which should be the variant
value equivalent of the previous configuration plain
and monochrome
I would defer to Figma for the accurate design. There wasn't a disabled state in there so I added that for reference. https://www.figma.com/file/jLLkmo9r28hiqPvf4s90E4/Polaris-Gen-3-Components-%5Balpha%5D?type=design&node-id=68605-33198&mode=design&t=0nWQL7LChp2Emwu6-4 |
370669a
to
3278bde
Compare
@@ -414,7 +393,7 @@ export function Filters({ | |||
size="micro" | |||
onClick={handleClearAllFilters} | |||
removeUnderline | |||
variant="tertiary" | |||
variant="monochromePlain" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously this was monoChrome=true
and plain=true
, the equivalent variant value should be monochromePlain
not tertiary
.
background: var(--p-color-bg-subdued); | ||
border-radius: var(--p-border-radius-6); | ||
border: var(--p-color-border-subdued) dashed var(--p-border-width-1); | ||
background: var(--p-color-bg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to color-bg token instead to match Figma
border-color: var(--p-color-border-hover); | ||
} | ||
|
||
&[aria-disabled='true'] { | ||
background: var(--p-color-bg-disabled); | ||
border-color: var(--p-color-border-disabled); | ||
background: var(--p-color-bg-transparent-disabled-experimental); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to match Figma
&.disabledFilterButton { | ||
background: var(--p-color-bg-disabled); | ||
background: var(--p-color-bg-transparent-disabled-experimental); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to match Figma.
But also, will remove these entirely in a subsequent PR, since disabled FilterPills are no longer rendered
background: var(--p-color-bg-disabled); | ||
border-color: var(--p-color-border-disabled); | ||
background: var(--p-color-bg-transparent-disabled-experimental); | ||
border-color: transparent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No border in Figma, setting to transparent
to avoid layout shift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks a lot better, thanks for fixing this!!
I noticed a few more discrepancies between figma and the current state but since that isn't related to consolidating the se23 logic I tracked the discrepancies in a separate issue that we can address in a follow up PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
* next: (87 commits) [ButtonGroup] Removed `segmented` boolean prop and replaced with `variant` (#9997) [LegacyTabs] Consolidate se23 styles and logic (#10231) [v12] Update changesets (#10232) [LegacyFilters] Consolidate se23 styles and logic (#10217) [Banner] Change status prop to tone (#10206) Replace icon highlight color in box stories (#10226) [TopBar] Consolidate se23 styles and logic (#10221) [Filters] consolidate se23 logic and styles (#10178) [Icon] Update props (#10220) [ButtonGroup] Update variant plain prop name (#10222) [Button] Remove connectedDisclosure (#10182) [LegacyCard] Consolidate se23 styles and logic (#10207) [Navigation] Consolidate se23 logic and styles (#10213) [Frame][ContextualSaveBar] Consolidate se23 styles and logic (#10196) [OptionList] consolidate se23 styles and logic (#10177) [Page] Consolidate se23 styles and logic (#10187) [DataTable] Consolidate conditional logic (#10169) [Thumbnail] Consolidate conditional logic (#10171) [ResourceItem] Consolidate conditional logic (#10172) [FullscreenBar] Consolidate conditional logic (#10173) ...
* next: (87 commits) [ButtonGroup] Removed `segmented` boolean prop and replaced with `variant` (#9997) [LegacyTabs] Consolidate se23 styles and logic (#10231) [v12] Update changesets (#10232) [LegacyFilters] Consolidate se23 styles and logic (#10217) [Banner] Change status prop to tone (#10206) Replace icon highlight color in box stories (#10226) [TopBar] Consolidate se23 styles and logic (#10221) [Filters] consolidate se23 logic and styles (#10178) [Icon] Update props (#10220) [ButtonGroup] Update variant plain prop name (#10222) [Button] Remove connectedDisclosure (#10182) [LegacyCard] Consolidate se23 styles and logic (#10207) [Navigation] Consolidate se23 logic and styles (#10213) [Frame][ContextualSaveBar] Consolidate se23 styles and logic (#10196) [OptionList] consolidate se23 styles and logic (#10177) [Page] Consolidate se23 styles and logic (#10187) [DataTable] Consolidate conditional logic (#10169) [Thumbnail] Consolidate conditional logic (#10171) [ResourceItem] Consolidate conditional logic (#10172) [FullscreenBar] Consolidate conditional logic (#10173) ...
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> Fixes #9934 <!-- Context about the problem that’s being addressed. --> - consolidate se23 logic - consolidate se23 styles - [Storybook](https://5d559397bae39100201eedc1-avqvvftkub.chromatic.com/?path=/story/all-components-filters--with-a-resource-list) - [Prod storybook](https://storybook.polaris.shopify.com/?path=/story/all-components-filters--with-a-resource-list&globals=polarisSummerEditions2023:true) - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
<!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes Shopify#9934 <!-- Context about the problem that’s being addressed. --> ### WHAT is this pull request doing? - consolidate se23 logic - consolidate se23 styles ### How to 🎩 - [Storybook](https://5d559397bae39100201eedc1-avqvvftkub.chromatic.com/?path=/story/all-components-filters--with-a-resource-list) - [Prod storybook](https://storybook.polaris.shopify.com/?path=/story/all-components-filters--with-a-resource-list&globals=polarisSummerEditions2023:true) ### 🎩 checklist - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
WHY are these changes introduced?
Fixes #9934
WHAT is this pull request doing?
How to 🎩
🎩 checklist
README.md
with documentation changes