-
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] Update BulkActions and add in SelectAllActions #7833
Conversation
size-limit report π¦
|
/snapit |
π«°β¨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20221202143827 yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221202143827 yarn add @shopify/polaris@0.0.0-snapshot-release-20221202143827 |
fd1e208
to
852b5ef
Compare
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.
Approving previously reverted PR
/snapit |
π«°β¨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20221205155950 yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20221205155950 yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221205155950 yarn add @shopify/polaris@0.0.0-snapshot-release-20221205155950 yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20221205155950 |
/snapit |
π«°β¨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20221205181116 yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20221205181116 yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221205181116 yarn add @shopify/polaris@0.0.0-snapshot-release-20221205181116 yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20221205181116 |
/snapit |
π«°β¨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/plugin-polaris@0.0.0-snapshot-release-20221205192832 yarn add @shopify/polaris-icons@0.0.0-snapshot-release-20221205192832 yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20221205192832 yarn add @shopify/polaris@0.0.0-snapshot-release-20221205192832 yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20221205192832 |
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/stylelint-polaris@5.0.0 ### Major Changes - [#7691](#7691) [`38b2a00a6`](38b2a00) Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Stylelint Polaris v5 release ## @shopify/polaris-icons@6.7.0 ### Minor Changes - [#7816](#7816) [`afe77e584`](afe77e5) Thanks [@allyshiasewdat](https://github.com/allyshiasewdat)! - Add returns major icon ## @shopify/polaris-migrator@0.10.0 ### Minor Changes - [#7726](#7726) [`22c4107b3`](22c4107) Thanks [@qt314](https://github.com/qt314)! - Added migration to insert disable comments for @shopify/stylelint-polaris ### Patch Changes - [#7836](#7836) [`77736370e`](7773637) Thanks [@qt314](https://github.com/qt314)! - Decouple polaris migrator test from stylelint config so it's easier to maintain - Updated dependencies \[[`38b2a00a6`](38b2a00)]: - @shopify/stylelint-polaris@5.0.0 ## @shopify/polaris@10.14.0 ### Minor Changes - [#7833](#7833) [`e47595193`](e475951) Thanks [@mrcthms](https://github.com/mrcthms)! - Separated BulkActions and SelectAllActions for new sticky bulk actions experience - [#7812](#7812) [`e51d2c2d2`](e51d2c2) Thanks [@chazdean](https://github.com/chazdean)! - Created `Divider` component with guidance and examples ### Patch Changes - [#7763](#7763) [`28529baaf`](28529ba) Thanks [@n-filatov](https://github.com/n-filatov)! - Update the Toast component to a more compact layout - Updated dependencies \[[`afe77e584`](afe77e5)]: - @shopify/polaris-icons@6.7.0 ## @shopify/plugin-polaris@0.0.19 ### Patch Changes - Updated dependencies \[[`22c4107b3`](22c4107), [`77736370e`](7773637)]: - @shopify/polaris-migrator@0.10.0 ## polaris.shopify.com@0.27.0 ### Minor Changes - [#7812](#7812) [`e51d2c2d2`](e51d2c2) Thanks [@chazdean](https://github.com/chazdean)! - Created `Divider` component with guidance and examples ### Patch Changes - Updated dependencies \[[`afe77e584`](afe77e5), [`e47595193`](e475951), [`28529baaf`](28529ba), [`e51d2c2d2`](e51d2c2)]: - @shopify/polaris-icons@6.7.0 - @shopify/polaris@10.14.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
In #7833, small-screen/mobile support was removed when `selectable=true` or `condensed=true`, but styles weren't cleaned up.
In #7833, small-screen/mobile support was removed when `selectable=true` or `condensed=true`, but styles weren't cleaned up.
In #7833, small-screen/mobile support was removed when `selectable=true` or `condensed=true`, but styles weren't cleaned up.
β¦#7833) It's the revert of the revert π« ### WHY are these changes introduced? Fixes https://github.com/Shopify/web/issues/74192 Spin link in situ: https://admin.web.discounts-update-save-as.marc-thomas.eu.spin.dev/store/shop1/orders?inContextTimeframe=none ### WHAT is this pull request doing? #### Before <img width="2440" alt="Screenshot 2022-09-28 at 11 42 54" src="https://user-images.githubusercontent.com/2562596/192759539-4fece161-5bef-44ed-961f-4a342f495c69.png"> <img width="2440" alt="Screenshot 2022-09-28 at 11 42 28" src="https://user-images.githubusercontent.com/2562596/192759582-834b2d6a-f0e2-4d07-803f-4be435559495.png"> #### After <img width="2440" alt="Screenshot 2022-09-28 at 11 42 39" src="https://user-images.githubusercontent.com/2562596/192761041-9b38059f-3b80-4a8e-8261-633589098bb4.png"> <img width="2440" alt="Screenshot 2022-09-28 at 11 42 43" src="https://user-images.githubusercontent.com/2562596/192761078-f7fe25e1-4181-49ab-8545-c6e923917d2c.png"> <img width="2440" alt="Screenshot 2022-09-28 at 11 43 00" src="https://user-images.githubusercontent.com/2562596/192761112-bca384f4-ec7f-435c-80a7-b96f2ef7cbb8.png"> <img width="2440" alt="Screenshot 2022-09-28 at 11 43 03" src="https://user-images.githubusercontent.com/2562596/192761145-e6feb191-0430-420c-a77f-9dac004a418a.png"> This PR updates the BulkActions component, used on the IndexTable and ResourceList components, as well as moving some functionality from BulkActions into the new SelectAllActions component. This is to support the [Unified Index Filtering and Search](https://minerva.shopifycloud.com/auth/minerva?request=2905eaf2-0cf1-493c-b6d3-82e6385d6352&rd=https://vault.shopify.io%2Fprojects%2F24858) project. This PR introduces a new UX pattern for the BulkActions component. It has been separated from the `Select X` actions β which is now the `SelectAllActions` component, and the `BulkActions` component gets rendered afterward in the DOM. Components that consume the BulkActions use the new `useIsBulkActionSticky` hook to determine whether the BulkActions component should be `position: fixed` or `position: absolute` with a calculated top position. We have had to do this rather than use a regular `position: sticky` on the BulkActions element, as the keyboard focus order needs to be logically preserved, and moving the BulkActions component under the table/resource list HTML in the DOM would provide a bad experience for users navigating via keyboard. The IndexTable and ResourceList components have been updated with this new component. The `CheckableButton` component has been simplified, as a lot of the logic required in the existing implementation is no longer needed. As part of this work, small-screen BulkActions and SelectAllActions support has been removed, as we are removing bulk action and select functionality for small screens, as an intentional decision as part of the Unified Index Filtering and Search project. <!-- βΉοΈ Delete the following for small / trivial changes --> ### How to π© π₯ [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development) π [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) π [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) <!-- Give as much information as needed to experiment with the component in the playground. --> <details> <summary>Copy-paste this code in <code>playground/Playground.tsx</code>:</summary> ```jsx import React from 'react'; import {Page} from '../src'; export function Playground() { return ( <Page title="Playground"> {/* Add the code you want to test in here */} </Page> ); } ``` </details> ### π© checklist - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [x] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [x] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
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/stylelint-polaris@5.0.0 ### Major Changes - [Shopify#7691](Shopify#7691) [`38b2a00a6`](Shopify@38b2a00) Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Stylelint Polaris v5 release ## @shopify/polaris-icons@6.7.0 ### Minor Changes - [Shopify#7816](Shopify#7816) [`afe77e584`](Shopify@afe77e5) Thanks [@allyshiasewdat](https://github.com/allyshiasewdat)! - Add returns major icon ## @shopify/polaris-migrator@0.10.0 ### Minor Changes - [Shopify#7726](Shopify#7726) [`22c4107b3`](Shopify@22c4107) Thanks [@qt314](https://github.com/qt314)! - Added migration to insert disable comments for @shopify/stylelint-polaris ### Patch Changes - [Shopify#7836](Shopify#7836) [`77736370e`](Shopify@7773637) Thanks [@qt314](https://github.com/qt314)! - Decouple polaris migrator test from stylelint config so it's easier to maintain - Updated dependencies \[[`38b2a00a6`](Shopify@38b2a00)]: - @shopify/stylelint-polaris@5.0.0 ## @shopify/polaris@10.14.0 ### Minor Changes - [Shopify#7833](Shopify#7833) [`e47595193`](Shopify@e475951) Thanks [@mrcthms](https://github.com/mrcthms)! - Separated BulkActions and SelectAllActions for new sticky bulk actions experience - [Shopify#7812](Shopify#7812) [`e51d2c2d2`](Shopify@e51d2c2) Thanks [@chazdean](https://github.com/chazdean)! - Created `Divider` component with guidance and examples ### Patch Changes - [Shopify#7763](Shopify#7763) [`28529baaf`](Shopify@28529ba) Thanks [@n-filatov](https://github.com/n-filatov)! - Update the Toast component to a more compact layout - Updated dependencies \[[`afe77e584`](Shopify@afe77e5)]: - @shopify/polaris-icons@6.7.0 ## @shopify/plugin-polaris@0.0.19 ### Patch Changes - Updated dependencies \[[`22c4107b3`](Shopify@22c4107), [`77736370e`](Shopify@7773637)]: - @shopify/polaris-migrator@0.10.0 ## polaris.shopify.com@0.27.0 ### Minor Changes - [Shopify#7812](Shopify#7812) [`e51d2c2d2`](Shopify@e51d2c2) Thanks [@chazdean](https://github.com/chazdean)! - Created `Divider` component with guidance and examples ### Patch Changes - Updated dependencies \[[`afe77e584`](Shopify@afe77e5), [`e47595193`](Shopify@e475951), [`28529baaf`](Shopify@28529ba), [`e51d2c2d2`](Shopify@e51d2c2)]: - @shopify/polaris-icons@6.7.0 - @shopify/polaris@10.14.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
It's the revert of the revert π«
WHY are these changes introduced?
Fixes https://github.com/Shopify/web/issues/74192
Spin link in situ: https://admin.web.discounts-update-save-as.marc-thomas.eu.spin.dev/store/shop1/orders?inContextTimeframe=none
WHAT is this pull request doing?
Before
After
This PR updates the BulkActions component, used on the IndexTable and ResourceList components, as well as moving some functionality from BulkActions into the new SelectAllActions component. This is to support the Unified Index Filtering and Search project.
This PR introduces a new UX pattern for the BulkActions component. It has been separated from the
Select X
actions β which is now theSelectAllActions
component, and theBulkActions
component gets rendered afterward in the DOM.Components that consume the BulkActions use the new
useIsBulkActionSticky
hook to determine whether the BulkActions component should beposition: fixed
orposition: absolute
with a calculated top position. We have had to do this rather than use a regularposition: sticky
on the BulkActions element, as the keyboard focus order needs to be logically preserved, and moving the BulkActions component under the table/resource list HTML in the DOM would provide a bad experience for users navigating via keyboard.The IndexTable and ResourceList components have been updated with this new component.
The
CheckableButton
component has been simplified, as a lot of the logic required in the existing implementation is no longer needed.As part of this work, small-screen BulkActions and SelectAllActions support has been removed, as we are removing bulk action and select functionality for small screens, as an intentional decision as part of the Unified Index Filtering and Search project.
How to π©
π₯ Local development instructions
π General tophatting guidelines
π Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:π© checklist
README.md
with documentation changes