google-pay-button icon indicating copy to clipboard operation
google-pay-button copied to clipboard

Initial render of Google Pay's plain button `min-width` is `240px`

Open vsashyn opened this issue 1 year ago • 3 comments

Describe the bug
Safari only. With buttonType="plain" the style min-width=240px is applied during button's initial render, even though it seems this min-width is relevant only to pay button type.

To Reproduce
I'm not able to reproduce on Customize your button. It seems selection of button type in dropdown rerenders button and there is no min-width.

Steps to reproduce:

  1. Go to Wix test site
  2. See Google Pay button that is outside of the wrapping container. Sometimes it is not reproducible from first attempt. Also, please try different window sizes. Although there is a container which sets width, style min-width:240px is present in Google Pay button.

Expected behavior
Google Pay button fits into the outer container.

Screenshots
Screenshot 2024-05-27 at 19 12 06 Screenshot 2024-05-27 at 19 14 01

Component information:

  • Component
    • [x] React component (@google-pay/button-react)
    • [ ] Custom element (@google-pay/button-element)
    • [ ] Angular component (@google-pay/button-angular)
  • Component version (e.g. 3.0.10):

Environment:

  • Device (MacBook Pro):
  • OS (macOS 14.4.1):
  • Browser (Safari)
  • Country/region: Europe

vsashyn avatar May 27 '24 17:05 vsashyn

would buttonType="short" work for you? That did the trick for me, has a min width of 90px

jnsdrssn avatar May 28 '24 18:05 jnsdrssn

@vsashyn / @jnsdrssn we are looking into this. so sorry for the inconvenience...

dmengelt avatar May 28 '24 18:05 dmengelt

Potential workarounds for now:.

  1. Use buttonType: 'short' (as you mentioned already)
  2. Share your Google Pay merchantId here and I will add it to a deny list. This will no longer show dynamic card info on the button.
Y145O

dmengelt avatar Jun 28 '24 20:06 dmengelt

Closing this for now. Feel free to open up a new issue if needed.

dmengelt avatar Jan 15 '25 12:01 dmengelt