My Jetpack: Onboarding i4 | Wire up toggle success and error notices
Completes MYJP-194
Proposed changes:
- Show notices for module toggles in My Jetpack > Products
Other information:
- [ ] Have you written new tests for your changes, if applicable?
- [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
- [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
- Go to My Jetpack > Products
- Toggle a module ON and OFF
- Confirm that you see the success notice (Snackbar) accordingly
- Simulate a failure by modifying the endpoint here as shown in the video below.
- Confirm that you see the error message
https://github.com/user-attachments/assets/748eaaca-d6fc-4e0d-ba8a-e2fb7807b824
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
- To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the
update/my-jetpack/onboarding-i4/wireup-toggle-noticesbranch. - To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/my-jetpack/onboarding-i4/wireup-toggle-notices
Interested in more tips and information?
- In your local development environment, use the
jetpack rsynccommand to sync your changes to a WoA dev blog. - Read more about our development workflow here: PCYsg-eg0-p2
- Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2
Thank you for your PR!
When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
- :white_check_mark: Include a description of your PR changes.
- :white_check_mark: Add a "[Status]" label (In Progress, Needs Review, ...).
- :white_check_mark: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
- :white_check_mark: Add testing instructions.
- :white_check_mark: Specify whether this PR includes any changes to data or privacy.
- :red_circle: Add changelog entries to affected projects
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:
:red_circle: Action required: Please add missing changelog entries for the following projects: projects/packages/my-jetpack
Use the Jetpack CLI tool to generate changelog entries by running the following command: jetpack changelog add.
Guidelines: /docs/writing-a-good-changelog-entry.md
Follow this PR Review Process:
- Ensure all required checks appearing at the bottom of this PR are passing.
- Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
- You can use GitHub's Reviewers functionality to request a review.
- When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.
If you have questions about anything, reach out in #jetpack-developers for guidance!
Code Coverage Summary
No summary data is available for parent commit 085fa436, so cannot calculate coverage changes. :sleeping:
If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 085fa436 is available.
Looks good, @manzoorwanijk!
Would be great if we could align all those Snackbars to the right — asked about a native way of doing so in the DS channel: p1750754665502119-slack-CNGQYA3B9