Skip to content

Commit

Permalink
Merge branch 'develop' into mobile/tpv-tracking-channel
Browse files Browse the repository at this point in the history
* develop:
  Ensure ECE button load events are triggered for multiple buttons on the same page (#9845)
  Payouts: Add payout bank reference key to payout reports and CSV (#9832)
  Fix WooPay component spacing (#9748)
  Use paragraph selector instead of label for pmme appearance (#9840)
  Allow redirect to the settings page from WCPay connect (#9827)
  Update references to woocommerce_payments_server (#9824)
  Fix return types in DocBlocks (#9815)
  Fix WooPay trial subscriptions purchases (#9778)
  • Loading branch information
jaclync committed Dec 2, 2024
2 parents 280ae94 + e0b69be commit 85f5176
Show file tree
Hide file tree
Showing 44 changed files with 460 additions and 193 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/e2e-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ on:
description: "Branch to be used for running tests"

env:
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
WCP_SERVER_REPO: ${{ secrets.WCP_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WCPAY_USE_BUILD_ARTIFACT: ${{ inputs.wcpay-use-build-artifact }}
WCPAY_ARTIFACT_DIRECTORY: 'zipfile'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WCPAY_USE_BUILD_ARTIFACT: ${{ inputs.wcpay-use-build-artifact }}
WCPAY_ARTIFACT_DIRECTORY: 'zipfile'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-pw-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
WCP_SERVER_REPO: ${{ secrets.WCP_SERVER_REPO }}
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ on:
workflow_dispatch:

env:
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
WCP_SERVER_REPO: ${{ secrets.WCP_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true
E2E_GH_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
WCP_DEV_TOOLS_REPO: ${{ secrets.WCP_DEV_TOOLS_REPO }}
WCP_DEV_TOOLS_BRANCH: 'trunk'
TRANSACT_PLATFORM_SERVER_REPO: ${{ secrets.TRANSACT_PLATFORM_SERVER_REPO }}
WC_SUBSCRIPTIONS_REPO: ${{ secrets.WC_SUBSCRIPTIONS_REPO }}
E2E_BLOG_ID: ${{ secrets.E2E_BLOG_ID }}
E2E_BLOG_TOKEN: ${{ secrets.E2E_BLOG_TOKEN }}
E2E_USER_TOKEN: ${{ secrets.E2E_USER_TOKEN }}
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_CHANNEL: ${{ secrets.E2E_SLACK_CHANNEL }}
E2E_SLACK_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
E2E_USE_LOCAL_SERVER: false
E2E_RESULT_FILEPATH: 'tests/e2e/results.json'
WC_MIN_SUPPORTED_VERSION: '7.6.0'
NODE_ENV: 'test'
FORCE_E2E_DEPS_SETUP: true

jobs:
generate-matrix:
Expand Down
1 change: 1 addition & 0 deletions assets/images/illustrations/setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions changelog/add-5316-payout-trace-id
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: add

Add Bank reference key column in Payout reports. This will help reconcile WooPayments Payouts with bank statements.
4 changes: 4 additions & 0 deletions changelog/dev-4293-address-additional-union-types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Fix return types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Allow redirect to the settings page from WCPay connect
4 changes: 4 additions & 0 deletions changelog/fix-9795-debounce-of-ece-load-events
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Ensure ECE button load events are triggered for multiple buttons on the same page.
4 changes: 4 additions & 0 deletions changelog/fix-pmme-appearance-blocks
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Use paragraph selector instead of label for pmme appearance
4 changes: 4 additions & 0 deletions changelog/fix-woopay-component-spacing
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WooPay component spacing.
4 changes: 4 additions & 0 deletions changelog/fix-woopay-trial-subscriptions
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Fix WooPay trial subscriptions purchases.
5 changes: 5 additions & 0 deletions changelog/update-server-container-name
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Updates server container name used by E2E tests


2 changes: 0 additions & 2 deletions client/checkout/blocks/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ button.wcpay-stripelink-modal-trigger:hover {
}

#remember-me {
margin: 36px 0 0 0;

h2 {
font-size: 18px;
font-weight: 600;
Expand Down
21 changes: 16 additions & 5 deletions client/checkout/upe-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const appearanceSelectors = {
appendTarget: '.woocommerce-billing-fields__field-wrapper',
upeThemeInputSelector: '#billing_first_name',
upeThemeLabelSelector: '.woocommerce-checkout .form-row label',
upeThemeTextSelector: '.woocommerce-checkout .form-row',
rowElement: 'p',
validClasses: [ 'form-row' ],
invalidClasses: [
Expand All @@ -46,6 +47,7 @@ export const appearanceSelectors = {
appendTarget: '#contact-fields',
upeThemeInputSelector: '.wc-block-components-text-input #email',
upeThemeLabelSelector: '.wc-block-components-text-input label',
upeThemeTextSelector: '.wc-block-components-text-input',
rowElement: 'div',
validClasses: [ 'wc-block-components-text-input', 'is-active' ],
invalidClasses: [ 'wc-block-components-text-input', 'has-error' ],
Expand Down Expand Up @@ -73,6 +75,7 @@ export const appearanceSelectors = {
appendTarget: '.product .cart .quantity',
upeThemeInputSelector: '.product .cart .quantity .qty',
upeThemeLabelSelector: '.product .cart .quantity label',
upeThemeTextSelector: '.product .cart .quantity',
rowElement: 'div',
validClasses: [ 'input-text' ],
invalidClasses: [ 'input-text', 'has-error' ],
Expand All @@ -91,6 +94,7 @@ export const appearanceSelectors = {
appendTarget: '.cart .quantity',
upeThemeInputSelector: '.cart .quantity .qty',
upeThemeLabelSelector: '.cart .quantity label',
upeThemeTextSelector: '.cart .quantity',
rowElement: 'div',
validClasses: [ 'input-text' ],
invalidClasses: [ 'input-text', 'has-error' ],
Expand All @@ -111,6 +115,7 @@ export const appearanceSelectors = {
upeThemeInputSelector:
'.wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input',
upeThemeLabelSelector: '.wc-block-components-text-input',
upeThemeTextSelector: '.wc-block-components-text-input',
rowElement: 'div',
validClasses: [ 'wc-block-components-text-input' ],
invalidClasses: [ 'wc-block-components-text-input', 'has-error' ],
Expand All @@ -133,6 +138,7 @@ export const appearanceSelectors = {
appendTarget: '.woocommerce-billing-fields__field-wrapper',
upeThemeInputSelector: '#billing_first_name',
upeThemeLabelSelector: '.woocommerce-checkout .form-row label',
upeThemeTextSelector: '.woocommerce-checkout .form-row',
rowElement: 'p',
validClasses: [ 'form-row' ],
invalidClasses: [
Expand Down Expand Up @@ -476,6 +482,11 @@ export const getAppearance = ( elementsLocation, forWooPay = false ) => {
'.Label'
);

const paragraphRules = getFieldStyles(
selectors.upeThemeTextSelector,
'.Text'
);

const tabRules = getFieldStyles( selectors.upeThemeInputSelector, '.Tab' );
const selectedTabRules = getFieldStyles(
selectors.hiddenInput,
Expand Down Expand Up @@ -505,9 +516,9 @@ export const getAppearance = ( elementsLocation, forWooPay = false ) => {
);
const globalRules = {
colorBackground: backgroundColor,
colorText: labelRules.color,
fontFamily: labelRules.fontFamily,
fontSizeBase: labelRules.fontSize,
colorText: paragraphRules.color,
fontFamily: paragraphRules.fontFamily,
fontSizeBase: paragraphRules.fontSize,
};

const isFloatingLabel = elementsLocation === 'blocks_checkout';
Expand All @@ -528,8 +539,8 @@ export const getAppearance = ( elementsLocation, forWooPay = false ) => {
'.Tab--selected': selectedTabRules,
'.TabIcon:hover': tabIconHoverRules,
'.TabIcon--selected': selectedTabIconRules,
'.Text': labelRules,
'.Text--redirect': labelRules,
'.Text': paragraphRules,
'.Text--redirect': paragraphRules,
} )
),
};
Expand Down
3 changes: 3 additions & 0 deletions client/checkout/upe-styles/upe-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const borderOutlineBackgroundProps = [
];
const upeSupportedProperties = {
'.Label': [ ...paddingColorProps, ...textFontTransitionProps ],
'.Text': [ ...paddingColorProps, ...textFontTransitionProps ],
'.Input': [
...paddingColorProps,
...textFontTransitionProps,
Expand Down Expand Up @@ -112,4 +113,6 @@ export const upeRestrictedProperties = {
'.TabLabel': upeSupportedProperties[ '.TabLabel' ],
'.Block': upeSupportedProperties[ '.Block' ],
'.Container': upeSupportedProperties[ '.Container' ],
'.Text': upeSupportedProperties[ '.Text' ],
'.Text--redirect': upeSupportedProperties[ '.Text' ],
};
2 changes: 0 additions & 2 deletions client/checkout/woopay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const renderSaveUserSection = () => {
checkoutPageSaveUserContainer,
paymentOptions.nextSibling
);

paymentOptions.classList.add( 'is-woopay' );
}
}

Expand Down
16 changes: 1 addition & 15 deletions client/components/woopay/save-user/checkout-page-save-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import request from '../../../checkout/utils/request';
import useSelectedPaymentMethod from '../hooks/use-selected-payment-method';
import { recordUserEvent } from 'tracks';
import './style.scss';
import { compare } from 'compare-versions';

const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => {
const errorId = 'invalid-woopay-phone-number';
Expand Down Expand Up @@ -57,12 +56,6 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => {
);
const viewportWidth = window.document.documentElement.clientWidth;
const viewportHeight = window.document.documentElement.clientHeight;
const wooCommerceVersionString = window.wcSettings?.wcVersion;
const wcVersionGreaterThan91 = compare(
wooCommerceVersionString,
'9.1',
'>='
);

useEffect( () => {
if ( ! isBlocksCheckout ) {
Expand Down Expand Up @@ -291,10 +284,7 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => {
}

return (
<Container
isBlocksCheckout={ isBlocksCheckout }
wcVersionGreaterThan91={ wcVersionGreaterThan91 }
>
<Container isBlocksCheckout={ isBlocksCheckout }>
<div className="save-details">
<div className="save-details-header">
<div
Expand All @@ -313,10 +303,6 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => {
id="save_user_in_woopay"
value="true"
className={ `save-details-checkbox ${
wcVersionGreaterThan91
? 'without-margin-right'
: ''
} ${
isBlocksCheckout
? 'wc-block-components-checkbox__input'
: ''
Expand Down
12 changes: 2 additions & 10 deletions client/components/woopay/save-user/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
*/
import { __ } from '@wordpress/i18n';

const Container = ( {
children,
isBlocksCheckout,
wcVersionGreaterThan91,
} ) => {
const Container = ( { children, isBlocksCheckout } ) => {
if ( ! isBlocksCheckout ) return children;
return (
<>
<div
className={ `woopay-save-new-user-container ${
wcVersionGreaterThan91 ? 'wc-version-greater-than-91' : ''
}` }
>
<div className="woopay-save-new-user-container">
<h2>{ __( 'Save my info' ) }</h2>
{ children }
</div>
Expand Down
44 changes: 0 additions & 44 deletions client/components/woopay/save-user/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,13 @@
}
}

.is-mobile,
.is-small {
.woopay-save-new-user-container.wc-version-greater-than-91::after {
background: currentColor;
box-shadow: -50vw 0 0 0 currentColor, 50vw 0 0 0 currentColor;
content: '';
height: 1px;
opacity: 0.11;
width: 100%;
margin-top: 22px;
}
}

.is-medium,
.is-large {
.woopay-save-new-user-container.wc-version-greater-than-91 {
border-bottom: 1px solid hsla( 0, 0%, 7%, 0.11 );
margin-bottom: 48px;
}
}

@media ( max-width: 600px ) {
.is-mobile,
.is-small {
.wc-block-components-form
.wc-block-components-checkout-step.is-woopay::after {
height: 0;
}
}
}

.woopay-save-new-user-container {
.save-details {
.wc-block-components-text-input input:-webkit-autofill {
padding: 1.5em 0.5em 1.5em 0.5em;
}
}

&.wc-version-greater-than-91 {
@media ( min-width: 601px ),
( min-width: 566px ) and ( max-width: 568px ) {
.save-details {
margin-bottom: 48px;
}
}
}

.save-details-header {
display: flex;
align-items: flex-start;
Expand Down Expand Up @@ -87,10 +47,6 @@
text-indent: 0;
}

input:not( .without-margin-right ) {
margin-right: $gap-small;
}

span {
@include breakpoint( '>960px' ) {
margin-right: 1.25rem;
Expand Down
Loading

0 comments on commit 85f5176

Please sign in to comment.