-
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
[ActionList][Item] Allow indentation to be applied to individual items #9820
Conversation
/snapit |
🫰✨ Thanks @zakwarsame! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
e83fa5e
to
d9ccc2e
Compare
/snapit |
🫰✨ Thanks @zakwarsame! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
padding={polarisSummerEditions2023 ? '1_5-experimental' : '2'} | ||
{...(hasMultipleSections && {paddingBlockStart: '0'})} | ||
{...(sectionRole && {role: sectionRole})} | ||
tabIndex={!hasMultipleSections ? -1 : undefined} | ||
> | ||
{actionMarkup} | ||
{polarisSummerEditions2023 ? ( | ||
<VerticalStack gap="1">{actionMarkup}</VerticalStack> |
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.
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 approach looks excellent! Very composable and simple API for toggling the indentation style.
The examples in the spin link look good. I just noticed one spacing issue where the selected Store has a different horizontal margin than the other items. Though I'm not sure if that is an issue within Polaris or in the consumer implementation
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.
👏
Hey @zakwarsame, not sure if these items are relevant to this specific PR (apologies if they aren't!), but I noticed three things:
|
Co-authored-by: Sam Rose <[email protected]>
/snapit |
🫰✨ Thanks @zakwarsame! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
🫰✨ Thanks @zakwarsame! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
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 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/[email protected] ### Minor Changes - [#9820](#9820) [`5fe84e33b`](5fe84e3) Thanks [@zakwarsame](https://github.com/zakwarsame)! - Added a `variant` prop to ActionList for applying avatar size and left indentation space and border to items ### Patch Changes - [#9773](#9773) [`a5f68c9a5`](a5f68c9) Thanks [@jesstelford](https://github.com/jesstelford)! - [Scrollable] shadow overlays scrollable content correctly. - [#9764](#9764) [`d3315de2e`](d3315de) Thanks [@andy-schneidr](https://github.com/andy-schneidr)! - Wrap SkeletonBodyText lines in a div (width 100%) - [#9831](#9831) [`078bddad1`](078bdda) Thanks [@zakwarsame](https://github.com/zakwarsame)! - Updated the user menu's avatar to include `name` - [#9828](#9828) [`80c87bb1a`](80c87bb) Thanks [@felipeleusin](https://github.com/felipeleusin)! - [Frame] Applies margin to Content when using sidebar ## @shopify/[email protected] ## [email protected] ### Patch Changes - Updated dependencies \[[`5fe84e33b`](5fe84e3), [`a5f68c9a5`](a5f68c9), [`d3315de2e`](d3315de), [`078bddad1`](078bdda), [`80c87bb1a`](80c87bb)]: - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Shopify#9820) <!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes #0000 <!-- link to issue if one exists --> Fixes https://github.com/Shopify/polaris-summer-editions/issues/785 Fixes https://github.com/Shopify/core-workflows/issues/1029 Fixes https://github.com/Shopify/polaris-summer-editions/issues/789 <!-- Context about the problem that’s being addressed. --> <details> <summary> Expand to see specifications/designs for this PR: </summary> ![image](https://github.com/Shopify/polaris/assets/42528878/752f0a05-ffad-4361-b84e-db96cdf8ec84) </details> ### WHAT is this pull request doing? <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </details> --> <!-- ℹ️ Delete the following for small / trivial changes --> - This PR takes an alternative approach to [this PR](Shopify#9771) - It adds a new prop to `ActionList`'s `Item` component called `indent`. This prop adds some space and a border to the left of the individual items. - Given that the indentation only applies to `Plus` stores in the original design, we can simply specify the prop in the consumer. ### How to 🎩 Non-Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop1 Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop2 Ensure the user menu matches the designs ### 🎩 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) ~- [ ] 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: Sam Rose <[email protected]>
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/[email protected] ### Minor Changes - [Shopify#9820](Shopify#9820) [`5fe84e33b`](Shopify@5fe84e3) Thanks [@zakwarsame](https://github.com/zakwarsame)! - Added a `variant` prop to ActionList for applying avatar size and left indentation space and border to items ### Patch Changes - [Shopify#9773](Shopify#9773) [`a5f68c9a5`](Shopify@a5f68c9) Thanks [@jesstelford](https://github.com/jesstelford)! - [Scrollable] shadow overlays scrollable content correctly. - [Shopify#9764](Shopify#9764) [`d3315de2e`](Shopify@d3315de) Thanks [@andy-schneidr](https://github.com/andy-schneidr)! - Wrap SkeletonBodyText lines in a div (width 100%) - [Shopify#9831](Shopify#9831) [`078bddad1`](Shopify@078bdda) Thanks [@zakwarsame](https://github.com/zakwarsame)! - Updated the user menu's avatar to include `name` - [Shopify#9828](Shopify#9828) [`80c87bb1a`](Shopify@80c87bb) Thanks [@felipeleusin](https://github.com/felipeleusin)! - [Frame] Applies margin to Content when using sidebar ## @shopify/[email protected] ## [email protected] ### Patch Changes - Updated dependencies \[[`5fe84e33b`](Shopify@5fe84e3), [`a5f68c9a5`](Shopify@a5f68c9), [`d3315de2e`](Shopify@d3315de), [`078bddad1`](Shopify@078bdda), [`80c87bb1a`](Shopify@80c87bb)]: - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Shopify#9820) <!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ### WHY are these changes introduced? Fixes #0000 <!-- link to issue if one exists --> Fixes Shopify/archive-polaris-backlog-2024#785 Fixes Shopify/core-workflows#1029 Fixes Shopify/archive-polaris-backlog-2024#789 <!-- Context about the problem that’s being addressed. --> <details> <summary> Expand to see specifications/designs for this PR: </summary> ![image](https://github.com/Shopify/polaris/assets/42528878/752f0a05-ffad-4361-b84e-db96cdf8ec84) </details> ### WHAT is this pull request doing? <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </details> --> <!-- ℹ️ Delete the following for small / trivial changes --> - This PR takes an alternative approach to [this PR](Shopify#9771) - It adds a new prop to `ActionList`'s `Item` component called `indent`. This prop adds some space and a border to the left of the individual items. - Given that the indentation only applies to `Plus` stores in the original design, we can simply specify the prop in the consumer. ### How to 🎩 Non-Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop1 Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop2 Ensure the user menu matches the designs ### 🎩 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) ~- [ ] 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: Sam Rose <[email protected]>
WHY are these changes introduced?
Fixes #0000
Fixes https://github.com/Shopify/polaris-summer-editions/issues/785
Fixes https://github.com/Shopify/core-workflows/issues/1029
Fixes https://github.com/Shopify/polaris-summer-editions/issues/789
Expand to see specifications/designs for this PR:
WHAT is this pull request doing?
ActionList
'sItem
component calledindent
. This prop adds some space and a border to the left of the individual items.Plus
stores in the original design, we can simply specify the prop in the consumer.How to 🎩
Non-Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop1
Plus: https://admin.web.mn.zakaria-warsame.us.spin.dev/store/shop2
Ensure the user menu matches the designs
🎩 checklist
- [ ] Updated the component'sREADME.md
with documentation changes