-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix(ras-setup): redirect to init screen after setup #3142
Conversation
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.
Looks good! Left a small nitpick regarding redirection strategy. Gonna approve this though as its not a blocker.
setProgress( activationSteps.length + 1 ); // Plus one to account for the "Done!" step. | ||
setProgressLabel( __( 'Done!', 'newspack-plugin' ) ); | ||
setTimeout( () => { | ||
setInFlight( false ); | ||
// window.location = reader_activation_url; | ||
window.location = reader_activation_url; |
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 would recommend using replace
here so we remove the 'setup complete' page from history.
window.location = reader_activation_url; | |
window.location.replace( reader_activation_url ); |
Feel free to ignore the suggestion above, but if you do, I would at least change this to window.location.href
:
window.location = reader_activation_url; | |
window.location.href = reader_activation_url; |
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.
Good idea! Added in 218eff7
🎉 This PR is included in version 4.1.0-epic-ras-acc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [4.2.0-alpha.1](v4.1.0...v4.2.0-alpha.1) (2024-05-31) ### Bug Fixes * **newsletters:** missing UTM params passing ([#3145](#3145)) ([0688fa0](0688fa0)) * **ras-setup:** redirect to init screen after setup ([#3142](#3142)) ([b86580b](b86580b)) * **ras:** handle RAS disabled in newsletters signup handling ([3d70a1d](3d70a1d)) * **ras:** prevent email address exposure via user login ([#3139](#3139)) ([9b534d3](9b534d3)) * **reader-revenue:** prevent sending duplicate receipt emails ([aa91890](aa91890)) * **tracking:** handling user role in pixel ([#3137](#3137)) ([a041764](a041764)) ### Features * **cli:** enable running the setup with a site import ([#3122](#3122)) ([c6cc10e](c6cc10e)) * expand memberships perf to archives ([#3148](#3148)) ([bdbdf1d](bdbdf1d)) * **memberships:** remove content restriction handling on the homepage ([b63a3fa](b63a3fa)) * update donation landing page ([#3109](#3109)) ([96218c1](96218c1))
🎉 This PR is included in version 4.2.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.2.0-epic-ras-acc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 4.2.0-epic-ia.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [4.3.0](v4.2.0...v4.3.0) (2024-06-12) ### Bug Fixes * **newsletters:** missing UTM params passing ([#3145](#3145)) ([0688fa0](0688fa0)) * **ras-setup:** redirect to init screen after setup ([#3142](#3142)) ([b86580b](b86580b)) * **ras:** handle RAS disabled in newsletters signup handling ([3d70a1d](3d70a1d)) * **ras:** prevent email address exposure via user login ([#3139](#3139)) ([9b534d3](9b534d3)) * **reader-revenue:** prevent sending duplicate receipt emails ([aa91890](aa91890)) * **tracking:** handling user role in pixel ([#3137](#3137)) ([a041764](a041764)) ### Features * **cli:** enable running the setup with a site import ([#3122](#3122)) ([c6cc10e](c6cc10e)) * expand memberships perf to archives ([#3148](#3148)) ([bdbdf1d](bdbdf1d)) * **memberships:** remove content restriction handling on the homepage ([b63a3fa](b63a3fa)) * update donation landing page ([#3109](#3109)) ([96218c1](96218c1))
🎉 This PR is included in version 4.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
In RAS setup, skipping the Campaigns (#3051) does not redirect to the initial screen after setup is complete, and displays activation steps erroneously. This PR fixes that.
How to test the changes in this Pull Request:
trunk
* Reset by running
wp option delete newspack_reader_activation_enabled newspack_popups_ras_prompts_last_updated _newspack_ras_skip_campaign_setup
Other information: