Skip to content

W-18672586 - Update Error Component with Chakra v3#2776

Merged
alexvuong merged 5 commits intofeature/chakra-ui-upgrade-v3from
fix-chakra-ui-v3-error-comp
Jul 10, 2025
Merged

W-18672586 - Update Error Component with Chakra v3#2776
alexvuong merged 5 commits intofeature/chakra-ui-upgrade-v3from
fix-chakra-ui-v3-error-comp

Conversation

@alexvuong
Copy link
Contributor

Description

This PR update Error component with Chakra v3
Desktop
image

mobile
image

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

Changes

  • (change1)

How to Test-Drive This PR

  • create _error component at typescript minimal
  • reexport error from storefront extension
import Error from '@salesforce/extension-chakra-storefront/components/error'

export default Error

  • throw new Error ('test') at render function of any component in the app
  • Load the app to see error

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)

@alexvuong alexvuong requested a review from a team as a code owner July 10, 2025 18:18
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jul 10, 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)

@alexvuong alexvuong changed the title W-18672586 - Fix chakra UI v3 error component W-18672586 - Update Error Component with Chakra v3 Jul 10, 2025
// },
{
path: [
config.pages.ResetPassword && config.pages.ResetPassword.path,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've fixed this page, I re-enabled it

@alexvuong
Copy link
Contributor Author

Cleaned up the PR according to lint messages
image

import {ADD_FILTER, REMOVE_FILTER} from '../../../pages/product-list/partials/refinements-utils'

const RadioRefinement = ({filter, value, toggleFilter, isSelected}) => {
const RadioRefinement = ({value, isSelected}) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are not using filter and toggleFilter props in the code


import React from 'react'
import {Heading, Stack, Separator, Accordion} from '@chakra-ui/react'
import {Heading, Stack, Accordion} from '@chakra-ui/react'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed unused Component

Center,
Button,
Flex,
Heading,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused components

Dialog,
HStack,
IconButton,
Flex,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused

variant="unstyled"
onClick={() => history.push('/')}
/>
// We need to use window.location.href here rather than history
Copy link
Contributor

Choose a reason for hiding this comment

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

Make sense to me. Just curious, was it working before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you meant if history was working before? I suppose it was not, so we changed to use window.location.

…or-comp

# Conflicts:
#	packages/extension-chakra-storefront/src/components/with-layout/with-layout.tsx
#	packages/extension-chakra-storefront/src/setup-app.tsx
pages: {ProductList: productListConfig},
maxCacheAge: MAX_CACHE_AGE,
staleWhileRevalidate: STALE_WHILE_REVALIDATE,
search: searchConfig
Copy link
Contributor

Choose a reason for hiding this comment

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

I take it we weren't using this searchConfig?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we don't need this data in this page anymore

@alexvuong alexvuong merged commit 1072569 into feature/chakra-ui-upgrade-v3 Jul 10, 2025
33 checks passed
alexvuong added a commit that referenced this pull request Jul 16, 2025
* Update Error component with chakra v3
@alexvuong alexvuong deleted the fix-chakra-ui-v3-error-comp branch July 16, 2025 22:13
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