Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Repeated unnecessary API calls when changing theme filter #79187

Open dsas opened 1 year ago

dsas commented 1 year ago

When toggling between the different filters free, premium, paid, and all in the theme showcase. We're triggering a network call to https://public-api.wordpress.com/wp/v2/sites/221022448/themes?status=active&_envelope=1 . The active theme is still the same so I'm not sure if we really need to perform that call for the purpose of filtering themes. On the other hand we aren't performing a call to retrieve a list of filtered themes (which makes sense).

Originally posted by @rcrdortiz in https://github.com/Automattic/wp-calypso/pull/79137#pullrequestreview-1522002558

rcrdortiz commented 1 year ago

Thanks for creating this @dsas I'll add some screenshots I had in case they're helpful. Captura de Pantalla 2023-07-10 a las 14 42 52 Captura de Pantalla 2023-07-10 a las 14 43 15