Skip to content

feat(components): theme tokens and styling parity fixes (ORC-7616) - #451

Open
OnurVar wants to merge 18 commits into
ov/feat/componentsfrom
epic/styling
Open

OnurVar wants to merge 18 commits into
ov/feat/componentsfrom
epic/styling

Conversation

@OnurVar

@OnurVar OnurVar commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Brings the Checkout Components styling work from epic/styling into ov/feat/components.
Epic: ORC-7616.

Most changes were already reviewed in their own PR.
A few were pushed straight to epic/styling and show a commit hash instead. Those need the closest look.

What this PR does

First batch, brought back

#445 took these PRs off this branch so the beta could ship without them.
The first commit here reverts #445, so they come back as they were reviewed.

Second batch

Merged into epic/styling after that.

Parity fixes without a ticket

Found while comparing the RN example with the iOS and Android apps and Figma.

  • The payment list title shows the amount, for example "Pay £151.00". It shows "Checkout" until the session arrives. (dbae968)
  • The country search field gets a search icon, and its clear button uses iconPrimary. PrimerTextInput gets an optional leadingContent. (cbe2f98)
  • Back on the delete question returns to the saved list, still in edit mode, like Cancel. (c91cffd)
  • The Klarna screen title says "Klarna" (was "Checkout") and sits in the centre of the header. (5d4d81c, 11cad4b)

Follow-up tickets

Known gaps on React Native, not in this PR.

  • One field height on every SDK, built from padding. Today RN fields are taller on Android than on iOS. ORC-8444
  • Payment list: one set of rules for "Pay with card", partner buttons and Apple Pay. ORC-8543
  • Klarna screen: options as in Figma (ORC-8537), and the Klarna logo in the title in light and dark (ORC-8707).
  • While paying: spinning Pay button, then the processing screen, with Back and Cancel locked too. ORC-8672
  • Card field errors: Web's messages instead of the native text like "[invalid-card-number] ...". ORC-8668
  • Country selection screen as in Figma. ORC-8691
  • Card form: hide the accepted card logos row, like iOS and Android. ORC-8705
  • Android back button closes the whole sheet instead of going back one screen. ORC-8671

Testing

  • Two parity runs of the RN example on the iOS simulator and the Android emulator, next to the native apps, in light and dark (19 and 24 Sep).
  • Changes after the second run were checked on RN iOS and RN Android. Not checked on a device yet: autofill suggestions and the bank screen Pay spinner.
  • 6 Oct: appearanceMode System, Light and Dark, with the phone in light and in dark, on RN iOS and RN Android. All correct.
  • 7 Oct: the example's checkout (list, card form, billing, a successful and a failed payment, saved cards) runs on RN iOS and RN Android in light and dark, before and after this branch.
  • RN unit tests passed on CI for every PR listed above, and each direct commit adds its own tests. One localization test fails only on a Turkish-locale machine.

Screenshots

Before is ov/feat/components (82d72fcb). After is this branch. Both use the same example app and native SDKs; only src/ differs. They run the example's "Before/after: default theme" entry (Primer's default theme, the same session) in light and dark, on the iOS simulator and the Android emulator, so changes that need a merchant theme do not show here. Each image says what was wrong and what changed. On Android, the round button over a field is the keyboard's stylus button.

RN iOS

ios-01-payment-method-list ios-02-card-form-empty ios-03-all-saved-methods ios-04-saved-methods-edit ios-05-payment-failed ios-06-payment-successful
More RN iOS screens (small changes) ios-07-card-number-error ios-08-country-list ios-09-billing-address ios-10-card-form-ready-to-pay ios-11-card-number-focused ios-12-cobadged-card ios-13-cobadged-network-menu ios-14-delete-question

RN Android

android-01-payment-method-list android-02-card-form-empty android-03-all-saved-methods android-04-saved-methods-edit android-05-payment-failed android-06-payment-successful
More RN Android screens (small changes) android-07-card-number-error android-08-country-list android-09-billing-address android-10-card-form-ready-to-pay android-11-card-number-focused android-12-cobadged-card android-13-cobadged-network-menu android-14-delete-question

handlePay waited for the billing address call before submit() turned
the lock on, and by then the processing screen had replaced the form.
On iOS that left about a second after the tap with a live form and a
Pay button showing nothing. The form now locks and Pay spins from the
tap, and a second tap in that time is ignored. PrimerCardForm gets the
same optional editable prop as the billing form.
@OnurVar
OnurVar requested a review from a team as a code owner October 7, 2026 05:43
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Swift 🤔. Please consider double checking it 🙏
Messages
📖 ✅ No SwiftLint violations found.

Generated by 🚫 Danger Swift against 11cad4b

@unblocked unblocked Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found.

About Unblocked

Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.

📖 Documentation — Learn more in our docs.

💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions.

👍 Give feedback — React to comments with 👍 or 👎 to help us improve.

⚙️ Customize — Adjust settings in your preferences.

Comment on lines +104 to +109
<PrimerButton
title={t('primer_common_button_pay')}
onPress={handleSubmit}
variant="primary"
disabled={!canSubmit}
activeOpacity={0.7}
style={[styles.payButton, !canSubmit && styles.payButtonDisabled]}
accessibilityRole="button"
accessibilityState={{ disabled: !canSubmit }}
>
<Text style={styles.payButtonText}>{t('primer_common_button_pay')}</Text>
</TouchableOpacity>
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR description states "The bank screen's Pay button shows its spinner while it loads (ORC--8435, #436)" and even lists "the bank screen Pay spinner" as pending device verification, but the migrated PrimerButton receives no loading prop. PrimerButton only renders its ActivityIndicator when loading is true, so while the issuer list loads (isLoading), the Pay button is merely disabled (grey fill, no spinner), and after a tap the screen immediately replaces to processing — the spinner can never appear in any state.

If the intended behaviour matches the other screens in this PR (e.g. CardFormScreen), pass the loading state through:

<PrimerButton
  title={t('primer_common_button_pay')}
  onPress={handleSubmit}
  variant="primary"
  loading={isLoading}
  disabled={!canSubmit}
/>

(Confirm with design whether it should spin during the bank-list fetch or only during submit; as written it does neither.)

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Warnings
⚠️ Pull Request size seems relatively large. If this Pull Request contains multiple changes, please split each into separate PRs for a faster, easier review.
⚠️ Please assign someone aside from CODEOWNERS (@checkout-pci-reviewers) to review this PR.
Messages
📖 ✅ No ESLint violations found.

Generated by 🚫 dangerJS against 11cad4b

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Warnings
⚠️ This PR doesn't seem to contain any updated Unit Test for Kotlin 🤔. Please consider double checking it 🙏
Messages
📖 ✅ No detekt violations found.

Generated by 🚫 Danger Kotlin against 11cad4b

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Appetize Android link: https://appetize.io/app/pwbbbby6be4kfm6kahe2fgfdim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant