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

[BulkActions] Add support for promotedBulkActions with critical tone #11787

Merged
merged 2 commits into from Mar 26, 2024

Conversation

chloerice
Copy link
Member

@chloerice chloerice commented Mar 26, 2024

WHY are these changes introduced?

Promoted BulkActions do not currently support destructive actions, when destructive is true it gets ignored.

WHAT is this pull request doing?

This PR adds support for destructive promotedBulkActions, mapping destructive to the rendered Button's tone when provided.

Before After
Screenshot 2024-03-26 at 10 41 47 AM Screenshot 2024-03-26 at 10 41 24 AM

@chloerice chloerice requested review from hellicarusprime, a team and mrcthms March 26, 2024 14:44
Copy link

@hellicarusprime hellicarusprime left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

💯

@chloerice chloerice merged commit c3aefaf into main Mar 26, 2024
14 checks passed
@chloerice chloerice deleted the critical-promoted-bulk-actions branch March 26, 2024 17:00
sophschneider pushed a commit that referenced this pull request Mar 26, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @shopify/polaris-icons@8.9.0

### Minor Changes

- [#11778](#11778)
[`d689bd8f4`](d689bd8)
Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Added
`PersonSegment` icon

## @shopify/polaris@12.23.0

### Minor Changes

- [#11764](#11764)
[`880f31b44`](880f31b)
Thanks [@itwasmattgregg](https://github.com/itwasmattgregg)! - Added
align property for FooterHelp


- [#11691](#11691)
[`1e613de8b`](1e613de)
Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - - Added
`ThemeProvider` component
- Removed `html` from theme classes to remove global theme constraint
    -   Updated `useTheme` to be context aware of parent themes
    -   Updated `Portal` component to be context aware of parent themes
    -   Initialized a `dark-experimental` theme


- [#11787](#11787)
[`c3aefafe2`](c3aefaf)
Thanks [@chloerice](https://github.com/chloerice)! - Added support for
destructive `promotodBulkActions` to `BulkActions`

### Patch Changes

- Updated dependencies
\[[`1e613de8b`](1e613de),
[`d689bd8f4`](d689bd8)]:
    -   @shopify/polaris-tokens@8.9.0
    -   @shopify/polaris-icons@8.9.0

## @shopify/polaris-tokens@8.9.0

### Minor Changes

- [#11691](#11691)
[`1e613de8b`](1e613de)
Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - - Added
`ThemeProvider` component
- Removed `html` from theme classes to remove global theme constraint
    -   Updated `useTheme` to be context aware of parent themes
    -   Updated `Portal` component to be context aware of parent themes
    -   Initialized a `dark-experimental` theme

## @shopify/polaris-migrator@0.28.3

### Patch Changes

- Updated dependencies
\[[`1e613de8b`](1e613de)]:
    -   @shopify/polaris-tokens@8.9.0
    -   @shopify/stylelint-polaris@15.4.1

## @shopify/stylelint-polaris@15.4.1

### Patch Changes

- Updated dependencies
\[[`1e613de8b`](1e613de)]:
    -   @shopify/polaris-tokens@8.9.0

## polaris-for-vscode@0.9.7

### Patch Changes

- Updated dependencies
\[[`1e613de8b`](1e613de)]:
    -   @shopify/polaris-tokens@8.9.0

## polaris.shopify.com@0.66.2

### Patch Changes

- [#11776](#11776)
[`ca8eb99ea`](ca8eb99)
Thanks [@sarahill](https://github.com/sarahill)! - Updated common action
patterns example

- Updated dependencies
\[[`880f31b44`](880f31b),
[`1e613de8b`](1e613de),
[`d689bd8f4`](d689bd8),
[`c3aefafe2`](c3aefaf)]:
    -   @shopify/polaris@12.23.0
    -   @shopify/polaris-tokens@8.9.0
    -   @shopify/polaris-icons@8.9.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
…ne` (Shopify#11787)

### WHY are these changes introduced?

Promoted `BulkActions` do not currently support destructive actions,
when `destructive` is `true` it gets ignored.

### WHAT is this pull request doing?

This PR adds support for destructive `promotedBulkActions`, mapping
`destructive` to the rendered `Button`'s `tone` when provided.

| Before | After |
|--------|--------|
|![Screenshot 2024-03-26 at 10 41
47 AM](https://github.com/Shopify/polaris/assets/18447883/3e1191f4-276c-4f2d-a622-588e70d0cda0)
| ![Screenshot 2024-03-26 at 10 41
24 AM](https://github.com/Shopify/polaris/assets/18447883/b43b1f97-0cee-4ac0-bb6d-d2893de43a78)|
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.

None yet

4 participants