Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0fba8c8
Order history and order detail
alexvuong Jul 4, 2025
58a5946
minor adjustment
alexvuong Jul 4, 2025
5c11ae7
minor adjustment
alexvuong Jul 4, 2025
a753372
revert checkout
alexvuong Jul 4, 2025
78fd619
fix style
alexvuong Jul 4, 2025
e570c77
fix style
alexvuong Jul 4, 2025
9484e4c
fix style
alexvuong Jul 4, 2025
8fe2d25
Fix dnt modal
alexvuong Jul 4, 2025
3fd98c4
Fix dnt modal
alexvuong Jul 4, 2025
483bb8e
remove console
alexvuong Jul 4, 2025
94055f0
fix dnt
alexvuong Jul 4, 2025
9ce187a
Fix dnt tests
alexvuong Jul 4, 2025
4994899
fix header theme
alexvuong Jul 4, 2025
accded0
fix header behavior
alexvuong Jul 4, 2025
cc033c2
fix header behavior
alexvuong Jul 4, 2025
6b5d9ed
fix header behavior
alexvuong Jul 4, 2025
db3edec
use onClick on header
alexvuong Jul 8, 2025
b939c68
Merge branch 'feature/chakra-ui-upgrade-v3' into chakra-ui-order-history
alexvuong Jul 8, 2025
d2b105a
minor fix
alexvuong Jul 8, 2025
5251e1c
fix tests
alexvuong Jul 8, 2025
c34d898
fix tests
alexvuong Jul 8, 2025
74c405c
fix invalid props React warning
alexvuong Jul 8, 2025
90de11f
remove only
alexvuong Jul 8, 2025
4291e2f
enable account addresses
alexvuong Jul 8, 2025
10538d4
Merge branch 'feature/chakra-ui-upgrade-v3' into chakra-ui-order-history
alexvuong Jul 10, 2025
1ed07c5
PR feedback
alexvuong Jul 10, 2025
10ac07d
clean up
alexvuong Jul 10, 2025
6f1ba24
PR feedback
alexvuong Jul 10, 2025
2cd1e65
Merge branch 'feature/chakra-ui-upgrade-v3' into chakra-ui-order-history
alexvuong Jul 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const Header = ({
onClick={onMyAccountClick}
onMouseOver={isDesktop ? onAccountMenuOpen : noop}
>
<AccountIcon boxSize={6} />
<AccountIcon boxSize="6" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

</IconButtonWithRegistration>
)}

Expand All @@ -235,7 +235,7 @@ const Header = ({
ref={popoverTriggerRef}
onKeyDown={handleKeyDown}
>
<AccountIcon boxSize={6} onClick={onMyAccountClick} />
<AccountIcon boxSize="6" onClick={onMyAccountClick} />
<HideOnMobile>
<ChevronDownIcon />
</HideOnMobile>
Expand All @@ -257,15 +257,15 @@ const Header = ({
<Popover.Body css={styles.dropdownMenuBody}>
<Popover.Header pb={1}>
<Popover.Title>
<Heading as="h2" fontWeight={700} size="lg">
<Heading as="h2" size="lg">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heading is now default to fontWeight: bold, no need to customise from the component

{intl.formatMessage({
defaultMessage: 'My Account',
id: 'header.popover.title.my_account'
})}
</Heading>
</Popover.Title>
</Popover.Header>
<Box asChild px={3}>
<Box asChild px="3">
<nav>
<List.Root
variant="plain"
Expand All @@ -275,40 +275,42 @@ const Header = ({
{navLinks.map((link) => {
const LinkIcon = link.icon
return (
<List.Item
key={link.name}
value={link.name}
>
<Link
useNavLink={true}
to={`/account${link.path}`}
<List.Item key={link.name}>
<Button
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapply Button to make use of current variant menu-link

asChild
variant="menu-link"
css={styles.menuAccountLink}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will allow customised style from parent and not affect all buttons of this variant

>
<LinkIcon
boxSize={5}
mr={3}
/>
{intl.formatMessage(
messages[link.name]
)}
</Link>
<Link
to={`/account${link.path}`}
useNavLink={true}
>
<LinkIcon
boxSize="5"
mr="2"
/>
{intl.formatMessage(
messages[link.name]
)}
</Link>
</Button>
</List.Item>
)
})}
</List.Root>
</nav>
</Box>
<Separator mx={3} my={2} />
<Separator mx="3" my="2" />

<Popover.Footer px={3} py={0}>
<Popover.Footer px="3" py="0">
<Button
variant="ghost"
css={styles.signoutButton}
onClick={onSignoutClick}
>
<SignoutIcon
aria-hidden={true}
boxSize={5}
boxSize="5"
css={styles.signoutIcon}
/>
<Text as="span" css={styles.signoutText}>
Expand All @@ -335,7 +337,7 @@ const Header = ({
// uncomment when we fix wishlist
// onClick={onWishlistClick}
>
<HeartIcon boxSize={6} />
<HeartIcon boxSize="6" />
</IconButtonWithRegistration>
{isStoreLocatorEnabled && (
<IconButton
Expand All @@ -349,7 +351,7 @@ const Header = ({
openModal()
}}
>
<StoreIcon boxSize={6} />
<StoreIcon boxSize="6" />
</IconButton>
)}
<IconButton
Expand All @@ -365,7 +367,7 @@ const Header = ({
onClick={onMyCartClick}
>
<>
<BasketIcon boxSize={6} />
<BasketIcon boxSize="6" />
{basket && totalItems > 0 && (
<Badge variant="notification">{totalItems}</Badge>
)}
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed a typo, it should be colorPalette="red"

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const CartItems = ({basket}) => {
return (
<Accordion.Root w="full" collapsible>
<Accordion.Item>
<Accordion.ItemTrigger px={0} py={4}>
<Accordion.ItemTrigger px="0" py="4">
<Box as="span" flex="1" textAlign="left" fontSize="md" fontWeight="bold">
<BasketIcon display="inline" mr={2} />
<FormattedMessage
Expand All @@ -57,8 +57,8 @@ const CartItems = ({basket}) => {
</Box>
<Accordion.ItemIndicator />
</Accordion.ItemTrigger>
<Accordion.ItemContent px={0} py={4}>
<Stack gap={5} align="flex-start" separator={<Separator />}>
<Accordion.ItemContent px="0" py="4">
<Stack gap="5" alignItems="flex-start" separator={<Separator w="full" />}>
{basket.productItems?.map((product, idx) => {
const variant = {
...product,
Expand All @@ -72,8 +72,8 @@ const CartItems = ({basket}) => {
variant={variant}
>
<Flex width="full" alignItems="flex-start">
<CartItemVariantImage width="80px" mr={2} />
<Stack width="full" gap={1} marginTop="-3px">
<CartItemVariantImage width="80px" mr="2" />
<Stack width="full" gap="1" marginTop="-3px">
<CartItemVariantName />
<CartItemVariantAttributes includeQuantity />
<CartItemVariantPrice
Expand All @@ -86,11 +86,13 @@ const CartItems = ({basket}) => {
)
})}

<Button as={Link} to="/cart" variant="link-blue" width="full">
<FormattedMessage
defaultMessage="Edit cart"
id="order_summary.cart_items.link.edit_cart"
/>
<Button asChild to="/cart" variant="link-blue" width="full">
<Link>
<FormattedMessage
defaultMessage="Edit cart"
id="order_summary.cart_items.link.edit_cart"
/>
</Link>
</Button>
</Stack>
</Accordion.ItemContent>
Expand Down Expand Up @@ -120,16 +122,14 @@ const OrderSummary = ({

return (
<Stack data-testid="sf-order-summary" gap={5}>
<Heading fontSize={fontSize} pt={1} id="order-summary-heading">
<Heading fontSize={fontSize} pt="1" id="order-summary-heading">
<FormattedMessage
defaultMessage="Order Summary"
id="order_summary.heading.order_summary"
/>
</Heading>

<Stack gap={4} align="flex-start" role="region" aria-labelledby="order-summary-heading">
<Stack gap="4" align="flex-start" role="region" aria-labelledby="order-summary-heading">
{showCartItems && <CartItems basket={basket} />}

<Stack w="full">
<Flex justifyContent="space-between" aria-live="polite" aria-atomic="true">
<Text fontWeight="bold" fontSize={fontSize}>
Expand Down Expand Up @@ -246,9 +246,8 @@ const OrderSummary = ({
<PromoCode {...promoCodeProps} />
</Box>
) : (
<Separator />
<Separator w="full" />
)}

<Stack gap={4} w="full">
<Flex
w="full"
Expand Down Expand Up @@ -282,7 +281,7 @@ const OrderSummary = ({

{basket.couponItems?.length > 0 && (
<Stack
p={4}
p="4"
border="1px solid"
borderColor="gray.100"
borderRadius="base"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Section = ({title, subtitle, actions, maxWidth, children, ...props}) => {
<Box as="section" paddingBottom="16" {...props}>
<Stack gap={6} as={Container} maxW={sectionMaxWidth} textAlign="center">
{title && (
<Heading as="h2" fontSize={40} textAlign="center" fontWeight="bold">
<Heading as="h2" fontSize={40} textAlign="center">
{title}
</Heading>
)}
Expand Down
Loading
Loading