W-18672755 - W-18397045 - Chakra UI order history and order detail#2730
W-18672755 - W-18397045 - Chakra UI order history and order detail#2730alexvuong merged 29 commits intofeature/chakra-ui-upgrade-v3from
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
|
|
||
| export default defineRecipe({ | ||
| base: { | ||
| fontWeight: 'bold' |
There was a problem hiding this comment.
Chakra v3 has changed default fontWeight from bold to semobold for all heading. We modified it here to match current design on pwa kit v3
| <Popover.Header pb={1}> | ||
| <Popover.Title> | ||
| <Heading as="h2" fontWeight={700} size="lg"> | ||
| <Heading as="h2" size="lg"> |
There was a problem hiding this comment.
Heading is now default to fontWeight: bold, no need to customise from the component
| useNavLink={true} | ||
| to={`/account${link.path}`} | ||
| <List.Item key={link.name}> | ||
| <Button |
There was a problem hiding this comment.
Reapply Button to make use of current variant menu-link
| <Button | ||
| asChild | ||
| variant="menu-link" | ||
| css={styles.menuAccountLink} |
There was a problem hiding this comment.
This will allow customised style from parent and not affect all buttons of this variant
| </Text> | ||
| <Badge colorScheme="green">{order.status}</Badge> | ||
| <Badge colorPalette="green" fontWeight="bold"> | ||
| {order.status?.toUpperCase()} |
There was a problem hiding this comment.
Badge no longer bold and uppercase. https://www.chakra-ui.com/docs/components/badge
| onMouseOver={isDesktop ? onAccountMenuOpen : noop} | ||
| > | ||
| <AccountIcon boxSize={6} /> | ||
| <AccountIcon boxSize="6" /> |
There was a problem hiding this comment.
Better to use string instead of {} because the design token system is optimized to work with string values, ensuring more reliable processing by the styling engine.
| backgroundColor: 'white', | ||
| rounded: 'base', | ||
| boxShadow: 'base' | ||
| boxShadow: 'xs' |
There was a problem hiding this comment.
there is no 'base' for box shadown, replace with xs https://chakra-ui.com/docs/theming/shadows
| fontWeight: 'semibold', | ||
| borderLeftWidth: '4px', | ||
| borderLeftStyle: 'solid', | ||
| borderLeftColor: 'transparent' |
There was a problem hiding this comment.
This will help all items are align vertically when there is an active item. An active item will have a gray left border
| <AccountIcon boxSize={6} /> | ||
| </IconButtonWithRegistration> | ||
| )} | ||
| <IconButtonWithRegistration |
There was a problem hiding this comment.
I am reverting the code we have for v3 because moving this icon into popover trigger causes the navigation to account onSuccessLogin failed.
| paddingBottom: 1, | ||
| paddingLeft: [4, 4, 6, 6], | ||
| boxShadow: 'base' | ||
| boxShadow: 'sm' |
There was a problem hiding this comment.
Chakra v3 does not have base for boxShadown anymore
| import {defineSlotRecipe} from '@chakra-ui/react' | ||
|
|
||
| export default defineRecipe({ | ||
| export default defineSlotRecipe({ |
There was a problem hiding this comment.
Header is slotRecipe, I missed this when refactoring the header
| isOpen={open} | ||
| onClose={onClose} | ||
| isOpen={isDrawerMenuOpen} | ||
| onClose={onDrawerMenuClose} |
There was a problem hiding this comment.
open and onClose were set above so I think this part can remain unchanged?
There was a problem hiding this comment.
I changed the name to make it clearer since we have a lot open/close state on the _app config.
| const _inputProps = | ||
| typeof inputProps === 'function' ? inputProps({value, onChange}) : inputProps | ||
|
|
||
| const {endElement, ...restOfInputProps} = _inputProps || {} |
There was a problem hiding this comment.
This will address the warning.
console.error
Warning: React does not recognize the `endElement` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `endelement` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
vcua-mobify
left a comment
There was a problem hiding this comment.
The order details, order history, and dnt banner all look good to me.
The account drop down now being an onClick is also working
packages/extension-chakra-storefront/src/pages/account/index.jsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I noticed a typo, it should be colorPalette="red"
packages/extension-chakra-storefront/src/pages/account/index.jsx
Outdated
Show resolved
Hide resolved
| _active={{background: 'gray.100'}} | ||
| _expanded={{background: 'transparent'}} | ||
| > | ||
| <Flex align="center" justify="center" width="full"> |
There was a problem hiding this comment.
| <Flex align="center" justify="center" width="full"> | |
| <Flex alignItems="center" justify="center" width="full"> |
There was a problem hiding this comment.
align should still work, see here: https://www.chakra-ui.com/docs/components/flex#props
| borderColor="gray.100" | ||
| borderRadius="base" | ||
| > | ||
| <Flex width="full" align="flex-start"> |
There was a problem hiding this comment.
| <Flex width="full" align="flex-start"> | |
| <Flex width="full" alignItems="flex-start"> |
| textDecorationColor: 'gray.900' | ||
| }, | ||
| _activeLink: { | ||
| '&.active': { |
There was a problem hiding this comment.
Glad to see this method works!
…2730) * Order history and order detail


Description
Order History

Order Detail

DNT modal

Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization