-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[IndexTable][ResourceList] Set SelectAllActions sticky bottom offset based on closest scrollable ancestor #11570
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…based on closest scrollable ancestor
a45ae9d to
6f883d1
Compare
Member
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @chloerice! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/polaris-migrator@0.0.0-snapshot-release-20240208025651yarn add @shopify/polaris@0.0.0-snapshot-release-20240208025651yarn add @shopify/polaris-tokens@0.0.0-snapshot-release-20240208025651yarn add @shopify/stylelint-polaris@0.0.0-snapshot-release-20240208025651 |
mrcthms
approved these changes
Feb 8, 2024
Contributor
mrcthms
left a comment
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.
This is v. nice, thank you!
boyutf
approved these changes
Feb 8, 2024
Merged
sam-b-rose
pushed a commit
that referenced
this pull request
Feb 9, 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@12.15.0 ### Minor Changes - [#11552](#11552) [`04e462816`](04e4628) Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Applied native mobile styles to Button component for the light-mobile theme ### Patch Changes - [#11570](#11570) [`e7f1961e1`](e7f1961) Thanks [@chloerice](https://github.com/chloerice)! - Fixed the position of `SelectAllActions` when inside of an offset scrollable container - Updated dependencies \[[`04e462816`](04e4628)]: - @shopify/polaris-tokens@8.8.0 ## @shopify/polaris-tokens@8.8.0 ### Minor Changes - [#11552](#11552) [`04e462816`](04e4628) Thanks [@sam-b-rose](https://github.com/sam-b-rose)! - Applied native mobile styles to Button component for the light-mobile theme ## @shopify/polaris-migrator@0.27.4 ### Patch Changes - Updated dependencies \[[`04e462816`](04e4628)]: - @shopify/polaris-tokens@8.8.0 - @shopify/stylelint-polaris@15.2.2 ## @shopify/stylelint-polaris@15.2.2 ### Patch Changes - Updated dependencies \[[`04e462816`](04e4628)]: - @shopify/polaris-tokens@8.8.0 ## polaris-for-vscode@0.9.6 ### Patch Changes - Updated dependencies \[[`04e462816`](04e4628)]: - @shopify/polaris-tokens@8.8.0 ## polaris.shopify.com@0.62.8 ### Patch Changes - Updated dependencies \[[`04e462816`](04e4628), [`e7f1961e1`](e7f1961)]: - @shopify/polaris@12.15.0 - @shopify/polaris-tokens@8.8.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
…based on closest scrollable ancestor (Shopify#11570) ### WHY are these changes introduced? The BulkActions and SelectAllActions UI recently changed so that SelectAllActions renders below the IndexTable and ResourceList and sticks as you scroll. This breaks when IndexTable or ResourceList are within a Modal, because the SelectAllActions are position `fixed` with no offset. ### WHAT is this pull request doing? This PR adds a bottom offset to the SelectAllActions based on its containing scrollable ancestor's vertical offset. The `useIsSelectAllActionsSticky` returns the bottom offset that should be set on the wrapper containing SelectAllActions if it's sticky. |Storybook| Before | After | |--------|--------|--------| |[IndexTable in Modal](https://5d559397bae39100201eedc1-pmcjcttzvh.chromatic.com/?path=/story/all-components-indextable--within-a-modal)| | | |[ResourceList in Modal](https://5d559397bae39100201eedc1-pmcjcttzvh.chromatic.com/?path=/story/all-components-resourcelist--within-a-modal) ||| ### 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 - [ ] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [ ] 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
The BulkActions and SelectAllActions UI recently changed so that SelectAllActions renders below the IndexTable and ResourceList and sticks as you scroll. This breaks when IndexTable or ResourceList are within a Modal, because the SelectAllActions are position
fixedwith no offset.WHAT is this pull request doing?
This PR adds a bottom offset to the SelectAllActions based on its containing scrollable ancestor's vertical offset. The
useIsSelectAllActionsStickyreturns the bottom offset that should be set on the wrapper containing SelectAllActions if it's sticky.How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.mdwith documentation changes