-
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
[BulkActions] Add theming to BulkAction and remove custom ButtonGroup from ResourceList #2467
Conversation
💦 Potential splash zone of changes introduced to
DetailsAll files potentially affected (total: 4)📄
|
337cccd
to
12714f4
Compare
1085809
to
7aec9fb
Compare
|
||
// We need the first item of button group on small screen to fill the space | ||
// stylelint-disable selector-max-specificity, selector-max-class | ||
@include breakpoint-before(resource-list(breakpoint-small)) { |
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.
Our fullWidth
makes every button equal width. On a small screen, bulk actions require only the checkable button to extend the full width.
We toyed with the idea of adding a prop to ButtonGroup which was confusing and this being the only use case where we have seen this we decided to move forward with this approach. We added a test to ensure that if ever there's mark-up change, this will be flagged.
This is the trade-off of being able the use ButtonGroup
and allowing us to remove quite a bit of custom components.
34ca7a1
to
d5085d9
Compare
fixing failing tests. |
d5085d9
to
27fa0e6
Compare
The code cov is complaining about |
We have been adding tests if using the features hook |
@@ -6,23 +6,6 @@ $bulk-actions-button-stacking-order: ( | |||
); | |||
$bulk-actions-offset-slide-in-start: rem(-40px); | |||
|
|||
.Button { | |||
@include text-style-button; | |||
@include button-base; |
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.
❤️
&:focus { | ||
z-index: 1; | ||
} | ||
} |
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.
🔥
@include recolor-icon(color('ink', 'lightest')); | ||
} | ||
} | ||
|
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.
❤️
Your Noticing that the checkable button icon is colored as a normal icon. That makes sense since we don't have indigo in the pallet any longer, but it makes it invisible in dark mode since the |
f19301c
to
415610e
Compare
415610e
to
dcf878b
Compare
Yes it did unlock quite a bit. It's also allowing to remove ToggleButton in web and all the custom stuff associated with the RTE toolbar. You are right, the checkbox will get branded automatically when we apply the branding. This is ready for review 🙏 |
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.
Nice work!
WHY are these changes introduced?
partly addresses: https://github.com/Shopify/polaris-ux/issues/360 and https://github.com/Shopify/polaris-ux/issues/361
While applying the design language to ButtonGroup, we were able to change how ButtonGroups work. This allowed us to refactor the ResourceList BulkActions and remove the custom components.
WHAT is this pull request doing?
How to 🎩
To 🎩 ensure BulkActions are working as expected in Storybook. Including small screen, and select mode.
Also use yarn
build-consumer web
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes