-
Notifications
You must be signed in to change notification settings - Fork 21
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
2492: Remove PreLaunchChecklist component #2532
2492: Remove PreLaunchChecklist component #2532
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/2458-streamline-onboarding #2532 +/- ##
=======================================================================
+ Coverage 63.8% 65.2% +1.4%
- Complexity 0 4581 +4581
=======================================================================
Files 325 800 +475
Lines 5072 22899 +17827
Branches 1230 1230
=======================================================================
+ Hits 3237 14928 +11691
- Misses 1667 7803 +6136
Partials 168 168
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Thanks @asvinb, this is looking pretty good. I left feedback on the disabled button change inline. Additionally, there is one other E2E test that needs to be updated here. This test from Step 2 is confirming that the REST requests for the policy checks are being made after moving on from step 2. Now that those are removed, these can also be removed from that test.
<StepContentFooter> | ||
<AppButton | ||
isPrimary | ||
loading={ adapter.isSubmitting } | ||
disabled={ ! settingsSaved } | ||
disabled={ |
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.
This might be a good idea, but I think it's unnecessary. Currently, the form can be submitted as long as the settings aren't being saved. Once saved, if there is some validation that fails, the handleSubmitClick
callback will show validation errors rather than moving on to the next step. Therefore, I only think we need to disable this button if we're in the middle of recording some state that would change the validation (not something that is currently applicable).
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.
Updates look good. Thanks @asvinb!
Hi @asvinb, thanks for the PR. I tested this PR and found it to be working as expected. The Pre-Launch Checklist has been removed from the onboarding flow ✅.
Please take a look at the use cases below and let me know if they are not related to the changes completed in this PR and if they are worth addressing in another PR/issue: I noticed that when the store doesn’t have a verified phone number, the "Continue" button is active, even though it doesn’t allow you to move to the next step. This can be confusing. Please see the attached screenshots. I observed inconsistent behavior in the onboarding flow. On the first step, when required information or accounts are not added/connected, the button remains inactive (works as expected). However, on the second screen, when required details like 'Shipping times' are not added, the "Continue" button remains active, as it does on the third screen. So on 1st screen, continue button appears inactive and on 2nd, 3rd screen it appear as active when required details are not added.
cc: @joemcgill for progress update. |
@ankitguptaindia Thanks for your comment. Apologies, I did not update the QAB since disabling the continue button was something which I added. You can see @joemcgill 's comment here about it. Let me know if that answers your questions. |
QA/Test Report- ✅Testing Environment -
Test Results - Changes working as expected. PreLaunchChecklist component has been removed and the onboarding flow working as expected. Next Step- Ready to Code Review(Woo) Plugin file with this fix-specific code: google-listings-and-ads.zip |
@eason9487 this one is ready for your review |
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.
Hi @asvinb, it's working well, just a few comments:
This hook can be removed: #2492 (comment) since it's no longer used in the codebase.
I know this PR focuses on the JS part, but what about the backend code used for the pre-launch checklist? For instance, src/API/Site/Controllers/MerchantCenter/PolicyComplianceCheckController.php
—is it still needed, or will it be handled in a different PR?
Also, there are other parts of the JS code that still reference policy_check
. Should these be kept, or can they be removed as well?
google-listings-and-ads/js/src/data/reducer.js
Lines 419 to 422 in 32bbb30
case TYPES.POLICY_CHECK: { | |
const { data } = action; | |
return setIn( state, 'mc.policy_check', data ); | |
} |
google-listings-and-ads/js/src/data/resolvers.js
Lines 174 to 195 in 32bbb30
* Fetch policy info for checking merchant onboarding policy setting. | |
*/ | |
export function* getPolicyCheck() { | |
try { | |
const response = yield apiFetch( { | |
path: `${ API_NAMESPACE }/mc/policy_check`, | |
} ); | |
return { | |
type: TYPES.POLICY_CHECK, | |
data: response, | |
}; | |
} catch ( error ) { | |
handleApiError( | |
error, | |
__( | |
'There was an error loading policy check details.', | |
'google-listings-and-ads' | |
) | |
); | |
} | |
} |
@@ -418,9 +418,6 @@ test.describe( 'Configure product listings', () => { | |||
} ); | |||
|
|||
test( 'should see the heading of next step and send two requests after clicking "Continue"', async () => { | |||
const requestPromises = |
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 believe the /gla/mc/contact-information
request is still being fetched, so instead of asserting the policy check response, could we assert the contact information instead? Otherwise, we're just asserting the heading without checking any of the requests. Also, the title could be updated to align with these changes.
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.
Sounds good @jorgemd24 . I've now updated the PR for additional tests.
Hello @jorgemd24 , |
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.
Thanks for the adjustments, LGTM. I couldn’t find any more references to the policy check in the frontend, and it’s working well.
Thanks all. @asvinb feel free to merge this after resolving conflicts and then move to UAT. |
…emove-pre-launch-checklist
Thanks @joemcgill @jorgemd24 . Merge conflicts fixed now. |
Hi @asvinb, please hold off on the merge. |
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.
Thanks for the work!
It would be appreciated if the following unused codes could be removed together:
- The
extendAdapter
prop ofAdaptiveForm
in the js/src/setup-mc/setup-stepper/store-requirements/index.js as its only use will be removed by this PR - All
PreLaunchCheckItem
component codes under this directory - E2E utils:
google-listings-and-ads/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js
Lines 58 to 65 in c21b1b5
/** * Get checklist card. * * @return {import('@playwright/test').Locator} Get checklist card. */ getChecklistCard() { return this.page.locator( '.gla-pre-launch-checklist' ); } google-listings-and-ads/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js
Lines 170 to 186 in c21b1b5
/** * Get pre-launch checklist checkboxes. * * @return {import('@playwright/test').Locator} Get pre-launch checklist checkboxes. */ getPrelaunchChecklistCheckboxes() { return this.getChecklistCard().getByRole( 'checkbox' ); } /** * Get pre-launch checklist panels. * * @return {import('@playwright/test').Locator} Get pre-launch checklist panels. */ getPrelaunchChecklistPanels() { return this.getChecklistCard().locator( '.components-panel__body' ); } google-listings-and-ads/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js
Lines 221 to 231 in c21b1b5
/** * Get read google merchant center requirements link. * * @return {import('@playwright/test').Locator} Get read google merchant center requirements link. */ getReadGoogleMerchantCenterRequirementsLink() { return this.page.getByRole( 'link', { name: 'Read Google Merchant Center requirements', exact: true, } ); } google-listings-and-ads/tests/e2e/utils/pages/setup-mc/step-3-confirm-store-requirements.js
Lines 245 to 266 in c21b1b5
/** * Register settings request when the confirm button or checkbox in pre-lauch checklist is checked. * * @param {Array} settings * @return {Promise<import('@playwright/test').Request[]>} The requests. */ registerPrelaunchChecklistConfirmCheckedRequest( settings = [] ) { const promises = []; for ( const setting of settings ) { promises.push( this.page.waitForRequest( ( request ) => request.url().includes( '/gla/mc/settings' ) && request.method() === 'POST' && request.postDataJSON()[ setting ] === true ) ); } return Promise.all( promises ); }
- All frontend codes and comments related to these keywords:
website_live
checkout_process_secure
payment_methods_visible
refund_tos_visible
contact_info_visible
@eason9487 Kindly note I've updated your PR following your last comment. Can you check again please? |
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.
Thanks for the further cleanup! LGTM.
…nch-checklist-items Remove pre launch checklist items
f39cf03
into
feature/2458-streamline-onboarding
Changes proposed in this Pull Request:
Closes #2492 .
PreLaunchChecklist
component from the codebase, including any associated tests.Continue
button in case the phone number is not verified or store address not filled in.Screenshots:
Detailed test instructions:
Confirm store requirements
, the Pre Launch Checklist section should no longer be present.Additional details:
Changelog entry