-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[IndexTable] Add custom paginated select all text #11785
Conversation
/snapit |
🫰✨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/polaris-icons@0.0.0-snapshot-20240326113348 yarn add @shopify/polaris-migrator@0.0.0-snapshot-20240326113348 yarn add @shopify/polaris@0.0.0-snapshot-20240326113348 yarn add @shopify/polaris-tokens@0.0.0-snapshot-20240326113348 yarn add @shopify/stylelint-polaris@0.0.0-snapshot-20240326113348 |
24601a9
to
cc7e40c
Compare
/snapit |
🫰✨ Thanks @mrcthms! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/polaris-migrator": "0.0.0-snapshot-20240403092813"
"@shopify/polaris": "0.0.0-snapshot-20240403092813" |
emptyState?: React.ReactNode; | ||
sort?: React.ReactNode; | ||
paginatedSelectAllActionText?: string; | ||
defaultPaginatedSelectAllText?: string; |
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.
Is there a reason why this should be prefixed with "default" and not just be paginatedSelectAllText
?
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.
@chloerice Yeah, it probably could/should! We get paginatedSelectAllText
from the useIndexValue() hook and in this PR we name our variable with the default prefix to avoid a name clash when we call the hook. But I think we can reassign the paginatedSelectAllText
from within the component itself to keep the prop API cleaner.
Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
386abe1
to
66d6923
Compare
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.10.0 ### Minor Changes - [#11816](#11816) [`4b730c84d`](4b730c8) Thanks [@dGoligorsky](https://github.com/dGoligorsky)! - Added some icons for image editing ### Patch Changes - [#11825](#11825) [`fd5b31d59`](fd5b31d) Thanks [@ryanwilsonperkin](https://github.com/ryanwilsonperkin)! - Add missing peer dependency on React ## @shopify/polaris@12.26.0 ### Minor Changes - [#11785](#11785) [`2a2f635ba`](2a2f635) Thanks [@mrcthms](https://github.com/mrcthms)! - Added the `defaultPaginatedSelectAllText` prop to `IndexTable` to support customizing the label of the checkbox in the header that selects all rows across pages when the table `hasMoreItems` ### Patch Changes - [#11833](#11833) [`810532c58`](810532c) Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Revert responsive text style updates - [#11810](#11810) [`66dc0392a`](66dc039) Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed Shift + click selection of `IndexTable.Row` not working in Firefox - [#11811](#11811) [`9aea67322`](9aea673) Thanks [@lgriffee](https://github.com/lgriffee)! - Undeprecated `heading2xl` variant in `Text` component - [#11817](#11817) [`936765c92`](936765c) Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - [IndexTable] Initially hide the scrollbar and update scrollbar padding - [#11819](#11819) [`35eb10c4f`](35eb10c) Thanks [@kyledurand](https://github.com/kyledurand)! - Added multi select functionality to AlphaPicker - Updated dependencies \[[`fd5b31d59`](fd5b31d), [`4b730c84d`](4b730c8)]: - @shopify/polaris-icons@8.10.0 ## @shopify/polaris-migrator@0.28.6 ### Patch Changes - [#11813](#11813) [`c49809998`](c498099) Thanks [@lgriffee](https://github.com/lgriffee)! - Removed `Text` `heading2xl` and associated tokens from v14 font migration ## polaris.shopify.com@0.67.2 ### Patch Changes - [#11796](#11796) [`c8dc01330`](c8dc013) Thanks [@sarahill](https://github.com/sarahill)! - Updated common action pattern guidance - [#11811](#11811) [`9aea67322`](9aea673) Thanks [@lgriffee](https://github.com/lgriffee)! - Undeprecated `heading2xl` variant in `Text` component - Updated dependencies \[[`fd5b31d59`](fd5b31d), [`810532c58`](810532c), [`66dc0392a`](66dc039), [`9aea67322`](9aea673), [`4b730c84d`](4b730c8), [`2a2f635ba`](2a2f635), [`936765c92`](936765c), [`35eb10c4f`](35eb10c)]: - @shopify/polaris-icons@8.10.0 - @shopify/polaris@12.26.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### WHY are these changes introduced? Addresses Shopify/web#122239 We need to update the IndexTable to be able to pass a custom `paginatedSelectAllText` string, like we do `paginatedSelectAllActionText` string. The prop added to the `IndexTable` is `defaultPaginatedSelectAllText`. <img width="1739" alt="Screenshot 2024-04-03 at 10 25 44" src="https://github.com/Shopify/polaris/assets/2562596/d8a92876-6861-4134-af85-c7e065ad8be0"> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [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) ### 🎩 checklist - [x] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [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 --------- Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com>
WHY are these changes introduced?
Addresses https://github.com/Shopify/web/issues/122239
We need to update the IndexTable to be able to pass a custom
paginatedSelectAllText
string, like we dopaginatedSelectAllActionText
string. The prop added to theIndexTable
isdefaultPaginatedSelectAllText
.How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.md
with documentation changes