Site: Add is_garden to no_member_fields for server side rendering#47123
Site: Add is_garden to no_member_fields for server side rendering#47123arthur791004 wants to merge 2 commits intotrunkfrom
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
There was a problem hiding this comment.
Pull request overview
Adds support for returning the is_garden flag from the public/unauthenticated site endpoint response, enabling server-side rendering consumers to access the field without authentication.
Changes:
- Add
is_gardento theno_member_fieldsallowlist for unauthenticated/sites/%srequests. - Add a Jetpack changelog entry documenting the enhancement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php | Expands the unauthenticated response field allowlist to include is_garden. |
| projects/plugins/jetpack/changelog/feat-site-add-is-garden-to-default-fields | Documents the change in the Jetpack changelog system. |
projects/plugins/jetpack/changelog/feat-site-add-is-garden-to-default-fields
Outdated
Show resolved
Hide resolved
| 'is_wpcom_flex', | ||
| 'is_a4a_client', | ||
| 'is_a4a_dev_site', | ||
| 'is_garden', |
There was a problem hiding this comment.
Adding is_garden to no_member_fields changes the unauthenticated/public /sites/%s response surface. Since this endpoint has unit tests, please add/update a test to cover that the field is included (and populated) when the request has no user/blog auth, to prevent regressions.
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
b80058b to
1f671ad
Compare
Related to WOOPRD-2282
Proposed changes:
is_gardentono_member_fieldsto we can get the property from the server side without auth.Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
/rest/v1.1/sites/:siteand/rest/v1.2/sites/:siteis_gardenfrom the response