Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IndexFilters] Use context provider for IndexFilters mode state (#10490)
### WHY are these changes introduced? Linked to Shopify/web#96682 We want to perform actions in other components whenever we enter the non-default mode of the IndexFilters. This currently is limited to disabling the actions in the `Page` component, but could be extended in the future. ### WHAT is this pull request doing? Adding a new context manager, `IndexFiltersManager`, which allows both the IndexFilters component to use the `mode`, but also allows other components, within Polaris and also within consumers of Polaris, to react to the changes of the `mode`. <!-- ℹ️ 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) - Spinstance: https://admin.web.if-disable-buttons.marc-thomas.eu.spin.dev/store/shop1/orders?inContextTimeframe=none - Storybook: https://5d559397bae39100201eedc1-objwwxomnz.chromatic.com/?path=/story/all-components-indexfilters--wrapped-in-a-page ### 🎩 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
- Loading branch information