jetpack
jetpack copied to clipboard
Add /recommendations/evaluation endpoint handling
Proposed changes:
- Adds recommendation evaluation endpoint handling and saving it as Jetpack option.
- Improves
useWelcomeBanner()
hook - Improves
useSimpleMutation()
hook cc @CodeyGuyDylan
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:
This PR requires you to point Jetpack to your sandbox with D153037-code patched
-
Create JN site (with “Enable Sandbox Access” option enabled)
-
Set Jetpack constant JETPACK__SANDBOX_DOMAIN to your sandbox
-
Install Jetpack through Jetpack Beta plugin, with
add/recommendations-evaluation-endpoint
feature branch -
Go to
/wp-admin/admin.php?page=my-jetpack
and connect your site, evaluation form will be displayed -
Open Network tab in Web Inspector
-
Select some options and click "See solutions"
-
Make sure that /evaluation and /save-evaluation endpoints returned successful responses
-
Welcome Flow banner should disappear after evaluation is saved ✨