Skip to content

[Chakra V3 Upgrade] @W-18672916 refactor Wishlist page buttons#2768

Merged
sf-jie-dai merged 8 commits intofeature/chakra-ui-upgrade-v3from
jdai.W-18672916.refactorWishlishPageCmp
Jul 14, 2025
Merged

[Chakra V3 Upgrade] @W-18672916 refactor Wishlist page buttons#2768
sf-jie-dai merged 8 commits intofeature/chakra-ui-upgrade-v3from
jdai.W-18672916.refactorWishlishPageCmp

Conversation

@sf-jie-dai
Copy link
Contributor

@sf-jie-dai sf-jie-dai commented Jul 9, 2025

  1. Migrated WishlistSecondaryButtonGroup component, and refactored its unit tests
  2. Migrated WishlistPrimaryAction component
    • Migrated useDisclosure to show product view modal correctly
    • Verified add-to-cart successfully will show successful toast for product with inventory
    • Verified add-to-cart will show error toast for out-of-stock product
    • Commented out add-to-cart/add-set-to-cart unit tests, created W-18999715 to track that
Screenshot 2025-07-10 at 3 32 04 PM

success toast:
Screenshot 2025-07-14 at 12 53 33 PM
error toast:
Screenshot 2025-07-14 at 12 51 20 PM

Description

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

How to Test-Drive This PR

  • (step1)

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jul 9, 2025

🎉 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)

@sf-jie-dai sf-jie-dai changed the title @W-18672916 refactor Wishlist page components @W-18672916 refactor Wishlist page components[WIP] Jul 9, 2025
@sf-jie-dai sf-jie-dai changed the title @W-18672916 refactor Wishlist page components[WIP] [Chakra V3 Upgrade] @W-18672916 refactor Wishlist page components Jul 10, 2025
@sf-jie-dai sf-jie-dai requested a review from alexvuong July 10, 2025 19:34
@sf-jie-dai sf-jie-dai marked this pull request as ready for review July 10, 2025 19:35
@sf-jie-dai sf-jie-dai requested a review from a team as a code owner July 10, 2025 19:35
@alexvuong
Copy link
Contributor

Please make sure there are no more React warning act().... warnings in the terminal when you run tests in this PR. To do that always wrap user actions in

await act(async () => {
 await user.actions()
})

@sf-jie-dai
Copy link
Contributor Author

sf-jie-dai commented Jul 11, 2025

Please make sure there are no more React warning act().... warnings in the terminal when you run tests in this PR. To do that always wrap user actions in

await act(async () => {
 await user.actions()
})

Thanks for the reminder! Just updated tests above

@sf-jie-dai sf-jie-dai requested a review from alexvuong July 11, 2025 11:33
Copy link
Contributor

@alexvuong alexvuong left a comment

Choose a reason for hiding this comment

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

LGTM

@sf-jie-dai sf-jie-dai merged commit f9ec5e9 into feature/chakra-ui-upgrade-v3 Jul 14, 2025
33 checks passed
sf-jie-dai added a commit that referenced this pull request Jul 14, 2025
)

* migrate wishlist secondary button group

* migrate wishlist primary action

* migrate useDisclosure hook

* comment out failing tests

* add back button hover style

* use prependHandlersToServer in jest-setup to simplify server setup

* wrap user action in act to avoid React warning
@sf-jie-dai sf-jie-dai deleted the jdai.W-18672916.refactorWishlishPageCmp branch July 14, 2025 17:51
sf-jie-dai added a commit that referenced this pull request Jul 14, 2025
* migrate and enable wishlist page

* [Chakra V3 Upgrade] @W-18672916 refactor Wishlist page components (#2768)

* migrate wishlist secondary button group

* migrate wishlist primary action

* migrate useDisclosure hook

* comment out failing tests

* add back button hover style

* use prependHandlersToServer in jest-setup to simplify server setup

* wrap user action in act to avoid React warning

* skip commented tests to track them

* fix confirmation modal header style

* fix loading state for useWishlist hook

* center the text for empty wishlist/order history pages

* simplify code with Flex

* use string number for gap

* fix perttier issue

* Update packages/extension-chakra-storefront/src/pages/account/wishlist/index.jsx

Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Signed-off-by: sf-jie-dai <jie.dai@salesforce.com>

* fix perttier issue

---------

Signed-off-by: sf-jie-dai <jie.dai@salesforce.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
@sf-jie-dai sf-jie-dai self-assigned this Jul 16, 2025
@sf-jie-dai sf-jie-dai changed the title [Chakra V3 Upgrade] @W-18672916 refactor Wishlist page components [Chakra V3 Upgrade] @W-18672916 refactor Wishlist page buttons Jul 16, 2025
alexvuong pushed a commit that referenced this pull request Jul 16, 2025
)

* migrate wishlist secondary button group

* migrate wishlist primary action

* migrate useDisclosure hook

* comment out failing tests

* add back button hover style

* use prependHandlersToServer in jest-setup to simplify server setup

* wrap user action in act to avoid React warning
alexvuong added a commit that referenced this pull request Jul 16, 2025
* migrate and enable wishlist page

* [Chakra V3 Upgrade] @W-18672916 refactor Wishlist page components (#2768)

* migrate wishlist secondary button group

* migrate wishlist primary action

* migrate useDisclosure hook

* comment out failing tests

* add back button hover style

* use prependHandlersToServer in jest-setup to simplify server setup

* wrap user action in act to avoid React warning

* skip commented tests to track them

* fix confirmation modal header style

* fix loading state for useWishlist hook

* center the text for empty wishlist/order history pages

* simplify code with Flex

* use string number for gap

* fix perttier issue

* Update packages/extension-chakra-storefront/src/pages/account/wishlist/index.jsx

Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Signed-off-by: sf-jie-dai <jie.dai@salesforce.com>

* fix perttier issue

---------

Signed-off-by: sf-jie-dai <jie.dai@salesforce.com>
Co-authored-by: Alex Vuong <alex.vuong@salesforce.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants