Skip to content

Cleanup from Select bonus button PR#2682

Merged
sf-deepali-bharmal merged 4 commits intofeature/bonus-productsfrom
W-18598170/selectBonusButtonPart2
Jun 30, 2025
Merged

Cleanup from Select bonus button PR#2682
sf-deepali-bharmal merged 4 commits intofeature/bonus-productsfrom
W-18598170/selectBonusButtonPart2

Conversation

@sf-deepali-bharmal
Copy link
Contributor

Description

Taking care of minor comments from previous PR to add Select Bonus Product Button in cart - https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2569/files

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

  • Its a cleanup PR
  • The text on top of 'Select Bonus Button" only shows up only when we have promotionName available.

How to Test-Drive This PR

  • Make sure existing "Select Bonus products" from cart works as expected.
  • Make sure text on top of 'Select Bonus Button" only shows up only when we have promotionName available.

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)

@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team June 27, 2025 20:24
@sf-deepali-bharmal sf-deepali-bharmal requested a review from a team as a code owner June 27, 2025 20:24
@sf-deepali-bharmal sf-deepali-bharmal added ready for review PR is ready to be reviewed skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated labels Jun 27, 2025
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jun 27, 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)

<Text fontSize="lg" fontWeight="bold">
{promotionName} ({selectedOfferCount} of {maxOfferCount} selected)
</Text>
{promotionName && (
Copy link
Contributor

Choose a reason for hiding this comment

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

How about wrap the component inside skeleton?

<Skeleton isloading={!promotionName}>
<Text fontSize="lg" fontWeight="bold">
                    {promotionName} ({selectedOfferCount} of {maxOfferCount} selected)
                </Text>
<Skeleton>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

BonusProductsTitle,
BonusProductsSelection
} from '@salesforce/retail-react-app/app/pages/cart/partials/bonus-products-title'
} from '@salesforce/retail-react-app/app/pages/cart/partials/bonus-product-helper'
Copy link
Contributor

Choose a reason for hiding this comment

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

Disagree on this name. helpers tend to cater to function. How about cart-bonus-products.jsx?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, helper doesnt feel right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool. Changing to suggested name.

@sf-deepali-bharmal sf-deepali-bharmal force-pushed the W-18598170/selectBonusButtonPart2 branch from 846a92a to ce09843 Compare June 27, 2025 22:00
@sf-deepali-bharmal sf-deepali-bharmal merged commit 97fecc3 into feature/bonus-products Jun 30, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review PR is ready to be reviewed skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants