-
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
[TopBar] grid alignment and center search #9765
Conversation
/snapit |
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
ddc37ac
to
f3653a7
Compare
/snapit |
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
bb56785
to
f84237c
Compare
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
/snapit |
🫰✨ Thanks @mattkubej! 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] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] yarn add @shopify/[email protected] |
f84237c
to
07e9ac0
Compare
/snapit |
🫰✨ Thanks @mattkubej! Your snapshots have been published to npm. Test the snapshots by updating your yarn add @shopify/[email protected] yarn add @shopify/[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 - [#9777](#9777) [`8228de0f6`](8228de0) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Added social media icons ## @shopify/[email protected] ### Minor Changes - [#9761](#9761) [`ce3e516a2`](ce3e516) Thanks [@aveline](https://github.com/aveline)! - Added `readOnly` prop to `Labelled` component - [#9770](#9770) [`571acc166`](571acc1) Thanks [@zaquille-oneil](https://github.com/zaquille-oneil)! - Updating TextField to support ArrowUp and ArrowDown keypresses for "integer" type ### Patch Changes - [#9765](#9765) [`541e5920b`](541e592) Thanks [@mattkubej](https://github.com/mattkubej)! - [TopBar] convert to grid and center align search field - Updated dependencies \[[`8228de0f6`](8228de0)]: - @shopify/[email protected] ## @shopify/[email protected] ## [email protected] ### Patch Changes - Updated dependencies \[[`ce3e516a2`](ce3e516), [`8228de0f6`](8228de0), [`571acc166`](571acc1), [`541e5920b`](541e592)]: - @shopify/[email protected] - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### WHY are these changes introduced? Updates the `TopBar` component, so that the search field sits center of the viewport with large screens. It becomes slightly offset and expands to fill its column at smaller viewports. Note: after additional review there are adjustments within this PR that are not represented within the illustrated specification. Those adjustments are listed below. - Without editions, the search field will have a max-width of 580px - With editions, the search field will have a max-width of 480px - Search field remains centered, but collapses to account for left and right content - At medium breakpoint and above, 24px gap between columns - Below medium breakpoint, 4px gap between columns <details> <summary>Specifications</summary> ![image](https://github.com/Shopify/polaris/assets/86790511/b7423c80-a9ca-4989-84e8-2997835ed9ed) </details> ### WHAT is this pull request doing? Switches the `TopBar` to a grid layout, which adjusts the column configuration based on breakpoint. Additionally, the `TopBar` takes responsibility for managing the width of the search field rather than the search field itself. The search field will just need to expand (i.e. width 100%) to fill its container within the `TopBar` component. This places the `TopBar` in finer control of the layout of the `TopBar`, specifically with regards to alignment of the search field. ### How to 🎩 - [Storybook](https://storybook.web.polaris-top-bar.matt-kubej.us.spin.dev/?path=/story/all-components-topbar--default) - [Spin web](https://admin.web.polaris-top-bar.matt-kubej.us.spin.dev/store/shop1) (associated [PR](https://github.com/Shopify/web/pull/98702) containing required web changes) 1. Validate the `TopBar` aligns with the specifications at various viewports 2. Repeat step 1 with editions enabled. ### 🎩 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~~ (component does not have a README) - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
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#9777](Shopify#9777) [`8228de0f6`](Shopify@8228de0) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Added social media icons ## @shopify/[email protected] ### Minor Changes - [Shopify#9761](Shopify#9761) [`ce3e516a2`](Shopify@ce3e516) Thanks [@aveline](https://github.com/aveline)! - Added `readOnly` prop to `Labelled` component - [Shopify#9770](Shopify#9770) [`571acc166`](Shopify@571acc1) Thanks [@zaquille-oneil](https://github.com/zaquille-oneil)! - Updating TextField to support ArrowUp and ArrowDown keypresses for "integer" type ### Patch Changes - [Shopify#9765](Shopify#9765) [`541e5920b`](Shopify@541e592) Thanks [@mattkubej](https://github.com/mattkubej)! - [TopBar] convert to grid and center align search field - Updated dependencies \[[`8228de0f6`](Shopify@8228de0)]: - @shopify/[email protected] ## @shopify/[email protected] ## [email protected] ### Patch Changes - Updated dependencies \[[`ce3e516a2`](Shopify@ce3e516), [`8228de0f6`](Shopify@8228de0), [`571acc166`](Shopify@571acc1), [`541e5920b`](Shopify@541e592)]: - @shopify/[email protected] - @shopify/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### WHY are these changes introduced? Updates the `TopBar` component, so that the search field sits center of the viewport with large screens. It becomes slightly offset and expands to fill its column at smaller viewports. Note: after additional review there are adjustments within this PR that are not represented within the illustrated specification. Those adjustments are listed below. - Without editions, the search field will have a max-width of 580px - With editions, the search field will have a max-width of 480px - Search field remains centered, but collapses to account for left and right content - At medium breakpoint and above, 24px gap between columns - Below medium breakpoint, 4px gap between columns <details> <summary>Specifications</summary> ![image](https://github.com/Shopify/polaris/assets/86790511/b7423c80-a9ca-4989-84e8-2997835ed9ed) </details> ### WHAT is this pull request doing? Switches the `TopBar` to a grid layout, which adjusts the column configuration based on breakpoint. Additionally, the `TopBar` takes responsibility for managing the width of the search field rather than the search field itself. The search field will just need to expand (i.e. width 100%) to fill its container within the `TopBar` component. This places the `TopBar` in finer control of the layout of the `TopBar`, specifically with regards to alignment of the search field. ### How to 🎩 - [Storybook](https://storybook.web.polaris-top-bar.matt-kubej.us.spin.dev/?path=/story/all-components-topbar--default) - [Spin web](https://admin.web.polaris-top-bar.matt-kubej.us.spin.dev/store/shop1) (associated [PR](Shopify/web#98702) containing required web changes) 1. Validate the `TopBar` aligns with the specifications at various viewports 2. Repeat step 1 with editions enabled. ### 🎩 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~~ (component does not have a README) - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
WHY are these changes introduced?
Updates the
TopBar
component, so that the search field sits center of the viewport with large screens. It becomes slightly offset and expands to fill its column at smaller viewports.Note: after additional review there are adjustments within this PR that are not represented within the illustrated specification. Those adjustments are listed below.
Specifications
WHAT is this pull request doing?
Switches the
TopBar
to a grid layout, which adjusts the column configuration based on breakpoint. Additionally, theTopBar
takes responsibility for managing the width of the search field rather than the search field itself. The search field will just need to expand (i.e. width 100%) to fill its container within theTopBar
component. This places theTopBar
in finer control of the layout of theTopBar
, specifically with regards to alignment of the search field.How to 🎩
TopBar
aligns with the specifications at various viewports🎩 checklist
Updated the component's(component does not have a README)README.md
with documentation changes