Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悶Bug] - Fix <ProductItem /> Not Being Overridable #1672

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

bendvc
Copy link
Collaborator

@bendvc bendvc commented Feb 16, 2024

Description

This PR fixes #1657

Looks like we were importing the ProductItem component in a valid syntax but not compatible with overrides. Lets fix these imports and then we can work on fixing the support for these types of imports later.

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

  • Remove /index from imports of the product-item component in the template.

How to Test-Drive This PR

  • Generate a demo project.
  • Override the product-item component
  • Insure that the component is overridden.

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)

@bendvc bendvc changed the title [馃悶Bug] - Fix <ProductItem /> Overridability [馃悶Bug] - Fix <ProductItem /> Not Being Overridable Feb 16, 2024
@bendvc bendvc marked this pull request as ready for review February 17, 2024 00:02
@bendvc bendvc requested a review from a team as a code owner February 17, 2024 00:02
alexvuong
alexvuong previously approved these changes Feb 20, 2024
kevinxh
kevinxh previously approved these changes Feb 21, 2024
@@ -16,7 +16,7 @@ import {useWishList} from '@salesforce/retail-react-app/app/hooks/use-wish-list'

import PageActionPlaceHolder from '@salesforce/retail-react-app/app/components/page-action-placeholder'
import {HeartIcon} from '@salesforce/retail-react-app/app/components/icons'
import ProductItem from '@salesforce/retail-react-app/app/components/product-item/index'
import ProductItem from '@salesforce/retail-react-app/app/components/product-item'
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL! you can't have index in your import path, is there a bug with the webpack extensibility plugin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe it is yes, ticket incoming

Signed-off-by: Ben Chypak <bchypak@mobify.com>
@bendvc bendvc dismissed stale reviews from kevinxh and alexvuong via c4c2efa February 21, 2024 19:36
@bendvc bendvc merged commit c06b660 into develop Feb 21, 2024
28 checks passed
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.

[BUG] Unable to properly override components/product-item
3 participants