Skip to content

[WOOMOB-3814] Restore default padding on JITM banner CTA button - #16407

Open
malinajirka wants to merge 2 commits into
trunkfrom
issue/WOOMOB-3814-jitm-cta-padding
Open

[WOOMOB-3814] Restore default padding on JITM banner CTA button#16407
malinajirka wants to merge 2 commits into
trunkfrom
issue/WOOMOB-3814-jitm-cta-padding

Conversation

@malinajirka

@malinajirka malinajirka commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Fixes WOOMOB-3814

The JITM banner's CTA button used a custom contentPadding that only set start, but Compose's PaddingValues constructor defaults every unspecified side to 0.dp — so it silently zeroed out top/end/bottom too. That collapsed the button's pressed/ripple Surface down to the exact size of the text, so the highlight had no padding on any side. Restoring ButtonDefaults.TextButtonContentPadding gives the ripple normal insets again.

Test Steps

  1. Enable JITM testing mode: in developer.properties, set wc.jitm_testing_json_file_name=jitm_testing.json, then rebuild/install.
  2. Open the "My store" dashboard — a JITM banner ("In-person card payments") should appear with a "Buy a card reader" CTA.
  3. Press and hold the CTA button.
  4. Confirm the pressed/ripple background forms a pill shape with padding around the text on all sides (not flush with the text).

Images/gif

N/A

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@malinajirka malinajirka added category: design Layout and style elements in the UI or user interface, including color and animations. feature: jitm Related to Just In Time Messages type: bug A confirmed bug. labels Aug 11, 2026
@malinajirka malinajirka added this to the 25.5 milestone Aug 11, 2026
@wpmobilebot

wpmobilebot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Build Number778
Version25.4-rc-1
Application IDcom.woocommerce.android.prealpha
Commit73f0918
Installation URL21h6i19ftkupo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@malinajirka
malinajirka marked this pull request as ready for review August 11, 2026 14:25
@malinajirka
malinajirka requested a review from kidinov August 11, 2026 14:26
The custom contentPadding zeroed out all sides (not just start),
leaving the pressed/ripple background flush with the button text.

@claude claude 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.

AI Code Review - No issues found. The changes look good.

This PR swaps a manual zero-start PaddingValues for the standard ButtonDefaults.TextButtonContentPadding on the JITM banner CTA TextButton, restoring Material3 default padding. The unused PaddingValues import is correctly removed and ButtonDefaults is imported. No correctness, security, or backwards-compatibility concerns.

PR housekeeping
  • UI-only change: the restored default padding is visible on the JITM banner CTA button; no test plan required.

Automatic review · claude-opus-4-8 · Workflow run

How to reply to a finding

Reply on this review (or inline at the line the finding refers to) with one of:

  • @claude addressed - I made the change. Bot verifies against the next diff before marking resolved.
  • @claude rejected: <reason> - Will not fix; reason gets quoted on the next review.
  • @claude not-applicable - Finding does not apply (wrong file, already covered elsewhere, etc.).

The bot honours these on the next review pass.

@malinajirka
malinajirka force-pushed the issue/WOOMOB-3814-jitm-cta-padding branch from 225d984 to 73f0918 Compare August 11, 2026 14:28
@kidinov kidinov assigned kidinov and unassigned kidinov Aug 12, 2026

@kidinov kidinov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the change is good, but it requires some layout changes as well now

Image

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

Labels

category: design Layout and style elements in the UI or user interface, including color and animations. feature: jitm Related to Just In Time Messages type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants