Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bc-peng
Copy link
Contributor

@bc-peng bc-peng commented Sep 3, 2025

What/Why?

Remove the following components:

  • CreditCardFieldset
  • CreditCardNumberField
  • CreditCardValidation
  • CreditCardExpiryField
  • CreditCardNameField

These components were used for the non-hosted version of credit card form fields, which has since been deprecated, so they are safe to remove.

Rollout/Rollback

Revert.

Testing

CI.

@bc-peng bc-peng requested a review from a team as a code owner September 3, 2025 05:46
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
});
}, []);

Copy link
Contributor

Choose a reason for hiding this comment

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

Also do we need to add deps here, since this replacing componentDidUpdate and not componentDidmount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory, [] should not be set in order to run this whenever something changes.
And we only trigger updates when inputRef.current && inputRef.current.selectionEnd !== nextSelectionEndRef.current is met.

Copy link
Contributor

@vitalii-koshovyi vitalii-koshovyi left a comment

Choose a reason for hiding this comment

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

LGTM! please add a screenshot.

animesh1987
animesh1987 previously approved these changes Sep 9, 2025
@bc-peng bc-peng requested a review from a team as a code owner September 11, 2025 05:18
@bc-peng bc-peng force-pushed the CreditCardNumberInput branch 2 times, most recently from 327871f to 2de5c47 Compare September 11, 2025 06:05
@bc-peng bc-peng requested a review from a team as a code owner September 11, 2025 06:30
@bc-peng bc-peng force-pushed the CreditCardNumberInput branch from 2d6eb82 to ca16b3b Compare September 11, 2025 06:45
@@ -260,9 +260,7 @@ const BigCommercePaymentsCreditCardsPaymentMethod: FunctionComponent<PaymentMeth
[getHostedFormOptions, initializePayment],
);

// Info: isHostedFormEnabled is an option in store config which responsible for switching BigCommercePayments Credit Card form
// rendering between Hosted Form and default BC fields (non-hosted)
return isHostedFormEnabled ? (
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 the branch when isHostedFormEnabled is false.
Confirmed internally this is no longer possible.

@bc-peng bc-peng changed the title refactor(checkout): CHECKOUT-9386 Convert CreditCardNumberInput [HOLD] refactor(checkout): CHECKOUT-9386 Convert CreditCardNumberInput Sep 11, 2025
import { LoadingOverlay } from '@bigcommerce/checkout/ui';

export interface CreditCardPaymentMethodProps {
cardFieldset?: ReactNode;
cardFieldset: ReactNode;
Copy link
Contributor Author

@bc-peng bc-peng Sep 12, 2025

Choose a reason for hiding this comment

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

Make cardFieldSet required so that each payment method using <CreditCardPaymentMethodComponent /> defines its own card validation field set.

@bc-peng bc-peng force-pushed the CreditCardNumberInput branch from ca16b3b to 40c91b6 Compare September 15, 2025 03:47
@bc-peng bc-peng force-pushed the CreditCardNumberInput branch from 40c91b6 to d07561f Compare September 15, 2025 04:44
@bc-peng bc-peng changed the title [HOLD] refactor(checkout): CHECKOUT-9386 Convert CreditCardNumberInput refactor(checkout): CHECKOUT-9386 Remove CreditCardFieldset Sep 15, 2025
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.

3 participants