woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
301 stars 109 forks source link

Products: Tax classes aren't cached/loading indicators appear each time it's opened #1954

Closed rachelmcr closed 4 years ago

rachelmcr commented 4 years ago

Describe the bug

Most options for product settings (e.g. Tax status, Stock status) are immediately available when I edit that field.

However, when I open the "Tax class" setting, the list of tax classes always have to be reloaded. A loading indicator appears each time (the list doesn't seem to be cached).

To Reproduce Steps to reproduce the behavior:

  1. Go to the Products tab.
  2. Select a product.
  3. Select "Price."
  4. Select "Tax class." Notice the loading indicators before the list of tax classes loads.
  5. Go back to the Price screen.
  6. Select "Tax class" again. Notice the loading indicators again.

Screenshots

Screencast: https://cloudup.com/c-Cd44H_GbX

Mobile Environment Please include:

jaclync commented 4 years ago

we currently fetch the latest tax classes from the site every time to simplify the states and the chance of selecting an outdated tax class. it'd be nice to cache these per edit session at least, while caching could introduce more states. I think we can leave it as a future enhancement?

rachelmcr commented 4 years ago

That makes sense to me! It'd be nice to cache them to some extent (per edit session seems reasonable). I've marked this as an enhancement we can look at in the future.