Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 797 forks source link

My Jetpack: Introduce better approach to handle data update #30423

Closed renatoagds closed 5 months ago

renatoagds commented 1 year ago

We have been adding reloads across the application to fetch new data.

Right now, we do this at these places:

Probably we need to introduce endpoints to fetch new data.

renatoagds commented 1 year ago

Moving to on hold.

dhasilva commented 1 year ago

The endpoints already exist on my-jetpack/v1/site/products (REST_API_SITE_PRODUCTS_ENDPOINT) and REST_API_SITE_PRODUCTS_ENDPOINT/<product-slug>.

What needs to be done here is to check how to use the store to trigger the data re-fetch at the points where we are refreshing the page. If at some point it is not possible to know which product needs to be updated then a second action needs to be added to call the general products endpoint. This would involve some refactoring to invalidate the state of all individual products.

renatoagds commented 1 year ago

Thinking better about this one, we should check if without reloading, we can introduce the new menu item in WP sidebar. I forgot about this UX requirement before creating the issue.

github-actions[bot] commented 10 months ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.

dhasilva commented 5 months ago

Stale issue. Jetpack Martech is handling My Jetpack now.