-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[IndexFilters] Add Edit Columns optional button #10580
[IndexFilters] Add Edit Columns optional button #10580
Conversation
17c512d
to
10cb148
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.
Thanks for taking this on! Would it also be possible to generate a new story for the Polaris site? Would be nice for folks to be able to discover this new functionality without having to go into the source code.
polaris-react/src/components/IndexFilters/IndexFilters.stories.tsx
Outdated
Show resolved
Hide resolved
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.
Thanks for contributing @sirgalleto, works great! Suggested an update to some naming for extra clarity. Just need to add your example to a new .md
file in polaris.shopify.com/pages/examples
👀
polaris-react/src/components/IndexFilters/components/EditColumnsButton/EditColumnsButton.tsx
Outdated
Show resolved
Hide resolved
polaris-react/src/components/IndexFilters/tests/IndexFilters.test.tsx
Outdated
Show resolved
Hide resolved
c495732
to
b459f2e
Compare
Nice work on this @sirgalleto! ✨ Just a note that in the Figma file & the original issue, the edit columns button is displayed in between the sort & filter button: ![]() |
b459f2e
to
7357a31
Compare
Ohh my bad @sjreive, it's on the correct order now :D |
7357a31
to
6a57e54
Compare
…r it when editing column
Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com> Co-authored-by: Marc Thomas <marc.thomas@shopify.com>
062c7b1
to
038fc83
Compare
038fc83
to
a38202c
Compare
Is this ready for a final review or are you continuing to iterate on anything? |
@mattkubej It should be ready for a final review |
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.
LGTM
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.
Be sure to add the example metadata to the top of polaris.shopify.com/content/tables/index-table.md
or the example won't show up.
@chloerice working ✨ thanks for the 👁️ ![]() |
I'm impressed of how slow are this translations 🫠 |
This reverts commit 9fdd52a.
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
Revert for making #10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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 --------- Co-authored-by: Chloe Rice <chloerice@users.noreply.github.com> Co-authored-by: Marc Thomas <marc.thomas@shopify.com> Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
Revert for making Shopify#10580 part of v12.x.x ### WHY are these changes introduced? Closes https://github.com/Shopify/core-issues/issues/60374 We believe giving users more visibility to the move column actions will enhance their experience. ### 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> --> 1. Create an `EditColumnsButton` that handles the markup for the edit column action. 2. Add a new property to `<IndexFilters/>` called `showEditColumns`, that when is true, renders the `<EditColumnsButton/>` 3. Add storybook and test implementations. https://github.com/Shopify/polaris/assets/5873627/5368e55f-839d-48eb-9362-dbe7d0e1a098 **Updated order or buttons:**  <!-- ℹ️ 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) 1. Run storybook. 2. Go to IndexFilters > With Edit Columns Button. 3. Play with the new button ✨ <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
WHY are these changes introduced?
Closes https://github.com/Shopify/temp-project-mover-Archetypically-20250409144733/issues/71
We believe giving users more visibility to the move column actions will enhance their experience.
WHAT is this pull request doing?
EditColumnsButton
that handles the markup for the edit column action.<IndexFilters/>
calledshowEditColumns
, that when is true, renders the<EditColumnsButton/>
Screen.Recording.2023-09-19.at.18.28.18.mov
Updated order or buttons:
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx
:🎩 checklist
README.md
with documentation changes