-
Notifications
You must be signed in to change notification settings - Fork 396
refactor(checkout): CHECKOUT-9386 Remove CreditCardFieldset #2552
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
}, []); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
0004a6e
327871f
to
2de5c47
Compare
2d6eb82
to
ca16b3b
Compare
@@ -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 ? ( |
There was a problem hiding this comment.
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.
import { LoadingOverlay } from '@bigcommerce/checkout/ui'; | ||
|
||
export interface CreditCardPaymentMethodProps { | ||
cardFieldset?: ReactNode; | ||
cardFieldset: ReactNode; |
There was a problem hiding this comment.
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.
ca16b3b
to
40c91b6
Compare
refactor(checkout): CHECKOUT-9386 CreditCardNumberInput
40c91b6
to
d07561f
Compare
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.