Skip to content

Commit f157f1a

Browse files
authored
Merge branch 'develop' into fix/refund-on-cancel
2 parents b8cada6 + 59c5b9c commit f157f1a

File tree

11 files changed

+45
-63
lines changed

11 files changed

+45
-63
lines changed

changelog/fix-woopay-blocks-field

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fix
3+
4+
WooPay component spacing issues on blocks and classic checkout.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: update
3+
Comment: New Account Details: Remove the payout icon status to be consistent with account status (without icon)
4+
5+

client/checkout/blocks/style.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
padding: 0;
1717
}
1818

19-
#contact-fields {
20-
padding-bottom: 1.5em;
21-
}
22-
2319
.wc-block-components-text-input button.wcpay-stripelink-modal-trigger {
2420
top: 50%;
2521
transform: translateY( -50% );
@@ -96,13 +92,8 @@ button.wcpay-stripelink-modal-trigger:hover {
9692
}
9793
}
9894

99-
#remember-me {
100-
h2 {
101-
font-size: 18px;
102-
font-weight: 600;
103-
line-height: 21.6px;
104-
letter-spacing: -0.01em;
105-
}
95+
#remember-me:empty {
96+
margin-bottom: 0;
10697
}
10798

10899
#payment-method {

client/components/account-details/__tests__/index.test.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ describe( 'AccountDetails', () => {
4747
payout_status: {
4848
text: 'Available',
4949
background_color: 'green',
50-
icon: 'published',
5150
},
5251
banner: null,
5352
};
@@ -70,7 +69,6 @@ describe( 'AccountDetails', () => {
7069
payout_status: {
7170
text: 'Disabled',
7271
background_color: 'red',
73-
icon: 'error',
7472
},
7573
banner: {
7674
text: 'Your account has been restricted by Stripe.',
@@ -98,7 +96,6 @@ describe( 'AccountDetails', () => {
9896
payout_status: {
9997
text: 'Disabled',
10098
background_color: 'red',
101-
icon: 'error',
10299
},
103100
banner: {
104101
text: 'Your account has been rejected.',
@@ -127,7 +124,6 @@ describe( 'AccountDetails', () => {
127124
payout_status: {
128125
text: 'Available in 2 days',
129126
background_color: 'yellow',
130-
icon: 'caution',
131127
popover: {
132128
text: 'Payouts are processed within 2 business days.',
133129
cta_text: 'Learn more',
@@ -154,7 +150,6 @@ describe( 'AccountDetails', () => {
154150
payout_status: {
155151
text: 'Available',
156152
background_color: 'green',
157-
icon: 'published',
158153
},
159154
banner: null,
160155
};
@@ -180,7 +175,6 @@ describe( 'AccountDetails', () => {
180175
payout_status: {
181176
text: 'Available',
182177
background_color: 'green',
183-
icon: 'published',
184178
},
185179
banner: null,
186180
};
@@ -206,7 +200,6 @@ describe( 'AccountDetails', () => {
206200
payout_status: {
207201
text: 'Available',
208202
background_color: 'green',
209-
icon: 'published',
210203
},
211204
banner: null,
212205
};

client/components/account-details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import React from 'react';
77
import { __ } from '@wordpress/i18n';
88
import { addQueryArgs } from '@wordpress/url';
9-
import { Card, CardBody, CardHeader, Flex } from '@wordpress/components';
9+
import { Card, CardBody, CardHeader } from '@wordpress/components';
1010

1111
/**
1212
* Internal dependencies

client/components/account-details/payout-status-wrapper.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import HelpOutlineIcon from 'gridicons/dist/help-outline';
1414
import Chip from 'wcpay/components/chip';
1515
import { ClickTooltip } from 'wcpay/components/tooltip';
1616
import { AccountDetailsData } from 'wcpay/types/account/account-details';
17-
import { getChipTypeFromColor, getIconByName } from './utils';
17+
import { getChipTypeFromColor } from './utils';
1818

1919
const PayoutStatus: React.FC< {
2020
payoutStatus: AccountDetailsData[ 'payout_status' ];
@@ -23,11 +23,7 @@ const PayoutStatus: React.FC< {
2323

2424
return (
2525
<Flex align="center" gap={ 0 } justify="flex-start">
26-
<Chip
27-
type={ chipType }
28-
message={ payoutStatus.text }
29-
icon={ getIconByName( payoutStatus.icon ) }
30-
/>
26+
<Chip type={ chipType } message={ payoutStatus.text } />
3127
{ payoutStatus.popover && (
3228
<ClickTooltip
3329
className={ 'payout-click-tooltip' }

client/components/woopay/save-user/checkout-page-save-user.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -385,24 +385,25 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => {
385385
} }
386386
isBlocksCheckout={ isBlocksCheckout }
387387
/>
388+
389+
{ isBlocksCheckout && (
390+
<ValidationInputError
391+
elementId={ errorId }
392+
propertyName={ errorId }
393+
/>
394+
) }
395+
{ ! isBlocksCheckout && ! isPhoneValid && (
396+
<p
397+
id="validate-error-invalid-woopay-phone-number"
398+
hidden={ isPhoneValid !== false }
399+
>
400+
{ __(
401+
'Please enter a valid mobile phone number.',
402+
'woocommerce-payments'
403+
) }
404+
</p>
405+
) }
388406
</div>
389-
{ isBlocksCheckout && (
390-
<ValidationInputError
391-
elementId={ errorId }
392-
propertyName={ errorId }
393-
/>
394-
) }
395-
{ ! isBlocksCheckout && ! isPhoneValid && (
396-
<p
397-
id="validate-error-invalid-woopay-phone-number"
398-
hidden={ isPhoneValid !== false }
399-
>
400-
{ __(
401-
'Please enter a valid mobile phone number.',
402-
'woocommerce-payments'
403-
) }
404-
</p>
405-
) }
406407
<AdditionalInformation />
407408
<Agreement />
408409
</div>

client/components/woopay/save-user/container.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ const Container = ( { children, isBlocksCheckout } ) => {
88
return (
99
<>
1010
<div className="woopay-save-new-user-container">
11-
<h2>{ __( 'Save my info' ) }</h2>
11+
<div className="wc-block-components-checkout-step__heading-container">
12+
<div className="wc-block-components-checkout-step__heading">
13+
<h2 className="wc-block-components-title wc-block-components-checkout-step__title">
14+
{ __( 'Save my info' ) }
15+
</h2>
16+
</div>
17+
</div>
1218
{ children }
1319
</div>
1420
</>

client/components/woopay/save-user/style.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
.woocommerce-checkout-payment {
2-
.woopay-save-new-user-container {
3-
padding: 1.41575em;
4-
}
5-
}
6-
71
.woopay-save-new-user-container {
82
.save-details {
93
.wc-block-components-text-input input:-webkit-autofill {
@@ -37,7 +31,6 @@
3731
flex: 1;
3832

3933
label {
40-
gap: unset;
4134
display: flex !important;
4235
align-items: flex-start;
4336
padding: 0;

client/settings/phone-input/style.scss

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@import '/node_modules/intl-tel-input/build/css/intlTelInput.css';
22

33
.woopay-save-new-user-container {
4-
display: flex;
5-
flex-direction: column;
6-
gap: $gap;
7-
84
&:not( :empty ) {
95
#payment .wc_payment_methods.payment_methods.methods + & {
106
margin-top: $gap-large;
@@ -63,20 +59,19 @@
6359
}
6460

6561
.additional-information {
66-
font-size: 14px;
67-
font-weight: 400;
62+
font-size: var( --wp--preset--font-size--small, 14px );
6863
line-height: 21px;
6964
text-align: left;
7065
}
7166

7267
.tos {
73-
font-size: 12px;
68+
font-size: 13px;
7469
}
7570

7671
#validate-error-invalid-woopay-phone-number {
7772
// Using rems to base this on the theme styles.
78-
font-size: 0.875rem;
79-
line-height: 1.5rem;
73+
font-size: 13px;
74+
line-height: 1;
8075
margin-bottom: 0;
8176
color: $alert-red;
8277
}
@@ -91,7 +86,6 @@
9186
box-shadow: none;
9287
border: 1px solid $gray-300;
9388
border-radius: 5px;
94-
margin-left: 0.1rem;
9589
width: calc( 100% - 0.25rem );
9690

9791
&::placeholder {

0 commit comments

Comments
 (0)