-
Notifications
You must be signed in to change notification settings - Fork 212
W-18672799 Chakra UI v3 header migration #2691
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
alexvuong
merged 17 commits into
feature/chakra-ui-upgrade-v3
from
chakra-ui-v3-header-migration
Jul 2, 2025
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0b589f5
Bring back the mobile menu
vmarta 92e1969
fix header popover
alexvuong 6343715
fix header popover
alexvuong 19655b9
fix header
alexvuong 6e98850
minor adjustment
alexvuong 1057004
minor adjustment
alexvuong 1b415cc
fix header tests
alexvuong 3799844
fix failing tests
alexvuong 153f1f7
fix React act warnings
alexvuong 33e3709
revert code
alexvuong 20fd974
fix react warning
alexvuong 807fc9e
fix lint
alexvuong 6c984c6
Merge branch 'feature/chakra-ui-upgrade-v3' into chakra-ui-v3-header-…
alexvuong 99726fb
PR feedback
alexvuong dc3052e
revert some tests
alexvuong b9402ec
Pr address
alexvuong 299f7af
Pr address
alexvuong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
308 changes: 161 additions & 147 deletions
308
packages/extension-chakra-storefront/src/components/header/index.jsx
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/extension-chakra-storefront/src/components/header/slot-a.jsx
This file was deleted.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,50 +8,23 @@ import {defineRecipe} from '@chakra-ui/react' | |
|
|
||
| export default defineRecipe({ | ||
| slots: [ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rearrange by alphabetical order for easy searching |
||
| 'accountIconButton', | ||
| 'arrowDownIconButton', | ||
| 'bodyContainer', | ||
| 'container', | ||
| 'content', | ||
| 'searchContainer', | ||
| 'bodyContainer', | ||
| 'logo', | ||
| 'dropdownMenuBody', | ||
| 'dropdownMenuTitle', | ||
| 'icons', | ||
| 'accountIconButton', | ||
| 'wishListIconButton', | ||
| 'arrowDownIconButton', | ||
| 'signout' | ||
| 'logo', | ||
| 'menuContent', | ||
| 'menuPositioner', | ||
| 'searchContainer', | ||
| 'signout', | ||
| 'wishListIconButton' | ||
| ], | ||
| base: { | ||
| container: { | ||
| minWidth: 'xs', | ||
| width: 'full', | ||
| shadow: 'xs', | ||
| backgroundColor: 'white' | ||
| }, | ||
| content: { | ||
| maxWidth: 'container.xxxl', | ||
| marginLeft: 'auto', | ||
| marginRight: 'auto', | ||
| paddingLeft: [4, 4, 6, 8], | ||
| paddingRight: [4, 4, 6, 8], | ||
| paddingTop: [1, 1, 2, 4], | ||
| paddingBottom: [3, 3, 2, 4] | ||
| }, | ||
| searchContainer: { | ||
| order: [2, 2, 2, 'inherit'], | ||
| width: ['full', 'full', 'full', 60], | ||
| marginRight: [0, 0, 0, 4], | ||
| marginBottom: [1, 1, 2, 0] | ||
| }, | ||
| bodyContainer: { | ||
| flex: '1' | ||
| }, | ||
| logo: { | ||
| width: [8, 8, 8, 12], | ||
| height: [6, 6, 6, 8] | ||
| }, | ||
| icons: { | ||
| marginBottom: [1, 1, 2, 0] | ||
| }, | ||
| accountIcon: { | ||
| accountIconButton: { | ||
| height: 11, | ||
| minWidth: 'auto', | ||
| cursor: 'pointer', | ||
|
|
@@ -63,7 +36,7 @@ export default defineRecipe({ | |
| outline: 0 | ||
| } | ||
| }, | ||
| arrowDown: { | ||
| arrowDownButton: { | ||
| height: 11, | ||
| minWidth: 'auto', | ||
| marginRight: 0, | ||
|
|
@@ -77,9 +50,46 @@ export default defineRecipe({ | |
| }, | ||
| display: ['none', 'none', 'none', 'block'] | ||
| }, | ||
| wishlistIcon: { | ||
| // More breathing room between the account and wishlist icons | ||
| marginLeft: 2 | ||
| container: { | ||
| minWidth: 'xs', | ||
| width: 'full', | ||
| shadow: 'xs', | ||
| backgroundColor: 'white' | ||
| }, | ||
| content: { | ||
| maxWidth: 'container.xxxl', | ||
| marginLeft: 'auto', | ||
| marginRight: 'auto', | ||
| paddingLeft: [4, 4, 6, 8], | ||
| paddingRight: [4, 4, 6, 8], | ||
| paddingTop: [1, 1, 2, 4], | ||
| paddingBottom: [3, 3, 2, 4] | ||
| }, | ||
| bodyContainer: { | ||
| flex: '1' | ||
| }, | ||
| dropdownMenuBody: { | ||
| padding: 0, | ||
| pb: 2 | ||
| }, | ||
| dropdownMenuTitle: { | ||
| px: 7, | ||
| py: 6, | ||
| pb: 2 | ||
| }, | ||
| iconButton: { | ||
| marginBottom: [1, 1, 2, 0] | ||
| }, | ||
| logo: { | ||
| width: [8, 8, 8, 12], | ||
| height: [6, 6, 6, 8] | ||
| }, | ||
|
|
||
| searchContainer: { | ||
| order: [2, 2, 2, 'inherit'], | ||
| width: ['full', 'full', 'full', 60], | ||
| marginRight: [0, 0, 0, 4], | ||
| marginBottom: [1, 1, 2, 0] | ||
| }, | ||
| signout: { | ||
| width: '100%', | ||
|
|
@@ -98,6 +108,10 @@ export default defineRecipe({ | |
| }, | ||
| signoutIcon: { | ||
| marginRight: 2 | ||
| }, | ||
| wishlistIcon: { | ||
| // More breathing room between the account and wishlist icons | ||
| marginLeft: 2 | ||
| } | ||
| } | ||
| }) | ||
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.
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.
Based on https://www.chakra-ui.com/docs/theming/z-index