-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace payment method logos component with the shared component from @woocommerce/onboarding
#9180
base: develop
Are you sure you want to change the base?
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +92.2 kB (+7%) 🔍 Total Size: 1.42 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review checklist
Parameter | Result |
---|---|
Approach | ✅ All good |
Implementation | 👍 Left comments |
Automated tests | I haven't verified the snapshots |
Naming | ✅ All good |
Typing | ✅ All good |
Code comments | ✅ All good |
Changelog | ✅ All good |
Documentation | Not applicable |
Testing instructions | ✅ All good |
Manual testing |
Scenarios tested
import { WooPaymentMethodsLogos } from 'components/payment-method-logos'; | ||
|
||
const WooPaymentMethodsLogos = React.lazy( () => | ||
import( '@woocommerce/onboarding' ).then( ( module ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why it has to be imported asynchronously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shoot, just saw the post paJDYF-eod-p2 which answers my question. So, we are lazy loading this component for performance reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, correct!
package-lock.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be a massive amount of changes in this file. What's the best way to verify these changes?
@@ -3,7 +3,7 @@ | |||
"outDir": "./dist/", // path to output directory | |||
"sourceMap": true, // allow sourcemap support | |||
"strict": true, // enable strict type checks as a best practice | |||
"module": "es6", // specify module code generation | |||
"module": "esnext", // specify module code generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we have to switch to esnext? Do you think it will have impact in rest of the codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw an explanation for this in paJDYF-eod-p2 👍 Nice discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are to go this route, the suggestion in the above post is to use es2020.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Anurag. We are still discussing the best approach to handle it.
Fixes #9002
Changes proposed in this Pull Request
This PR replaces the existing duplicate payment method logos component with the shared component from
@woocommerce/onboarding
, implemented in the WooCommerce core. By using the shared component, we ensure consistency across the platform and reduce redundancy in the codebase.Testing instructions
Payments
page.npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge