-
Notifications
You must be signed in to change notification settings - Fork 835
Forms: Preload initial inbox data and essential endpoints #45378
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
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 🤖 🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so:
🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so:
Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 7 files. Only the first 5 are listed here.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
'/wp/v2/feedback/config', | ||
'/wp/v2/feedback/config?_locale=user', | ||
'/wp/v2/feedback/integrations?version=2', | ||
'/wp/v2/feedback/integrations?version=2&_locale=user', |
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.
We removed ?_locale=user from these endpoints, but I think we need to keep them. I just added them here to fix preloading not working. The issue is that apiFetch adds that to endpoints, so we need the endpoints we list here to exactly match what apiFetch calls. If we're going to remove something, we should remove the versions without the extra query param. That would make sense as long as we're always using apiFetch to call them.
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'm still seeing an extended spinner (maybe 4-8 seconds) on the forms dashboard with this PR, which would suggest the endpoint for getting feedback isn't being pre-loaded as expected. Assuming it's not preloading, the most likely culprit is that we're missing or have wrong order on some query param so that our preload url and the one actually fetched don't quite match.

14a942d
to
e107dcc
Compare
Preloads first page of responses, counts, filters, and entity types for instant rendering. Related: #45339
dccc5e3
to
0cf2f16
Compare
0cf2f16
to
d443fe4
Compare
d443fe4
to
3eb6c49
Compare
Summary
Preloads the first page of inbox responses and essential endpoints for instant UI rendering.
Changes
/wp/v2/types?context=view
for entity type registration/wp/v2/feedback/counts
for status counts/wp/v2/feedback/filters
for filter optionswp-data
,wp-core-data
,wp-dom-ready
)Performance Impact
Related
Main PR: #45339