awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
862 stars 475 forks source link

3.0 - Auto save tax rate changes #7629

Open ashleyfae opened 4 years ago

ashleyfae commented 4 years ago

Enhancement Request

Explain your enhancement (please be detailed)

It would be nice if tax rate changes were automatically saved and didn't require clicking the Save Changes button. Example:

Justification or use case

I love the new tax rate UI. It's super slick and super user friendly. However, it feels so "react-y" that it makes me think my changes have been saved when they haven't. I add a tax rate, it appears in the table, and my mind fells me that it's been "saved". But in reality it hasn't. I deactivate a tax rate, it disappears, and my mind tells me that it's been saved. But it hasn't.

Every time I've used this feature, I've made the mistake of thinking my data has been saved. I added a tax rate (didn't save), added something to my cart, and got confused when taxes weren't being added. I'd forgotten to save.

I deactivated a tax rate, I added something to my cart, and got confused when taxes were being added. I'd forgotten to save.

I think it doesn't help that the Save Changes button feels far away from the actual table, and thus doesn't feel related. This is due to the "indenting" of the tax rate table.

Screenshot from 2020-03-05 16-48-56

spencerfinnell commented 4 years ago

@nosegraze There should be an "Are you sure" when you leave the tab if changes are unsaved, but you of course need to leave first to realize it hasn't saved.

Previously https://github.com/easydigitaldownloads/easy-digital-downloads/pull/6902#issuecomment-418135312

Autosaving was a future enhancement when the new UI was added -- maybe something good for an earlish 3.x?

ashleyfae commented 4 years ago

@nosegraze There should be an "Are you sure" when you leave the tab if changes are unsaved, but you of course need to leave first to realize it hasn't saved.

Yeah in my cases I had two tabs open. In one I made the tax rate changes and didn't try to navigate away, so I never got that notice. I just switched to the other tab for my checkout process.

spencerfinnell commented 4 years ago

I think this is slightly less likely to happen when not testing a bunch of things in wp-admin but it happened to @ashleyfae again so this is certainly something we should keep an eye on; especially if it starts affecting support.

spencerfinnell commented 4 years ago

If auto save can't make it in for some reason @robincornett suggests making the unsaved items a bit clearer in https://github.com/easydigitaldownloads/easy-digital-downloads/pull/7994#pullrequestreview-427282724

The difference between "Deactivate" and "Remove" as an indicator of whether a tax rate has actually been saved is a bit too nuanced for me. I would love to see "(not yet saved)", or something similar, appended to the "Remove" label, to make it really clear that the tax rate is not actually active.

robincornett commented 4 years ago

Noting here that the table markup has some accessibility issues which should be addressed:

robincornett commented 4 years ago

Just an update on this: when I deactivate a tax rate, it immediately disappears from view (if the "Show deactivated rates" toggle is off), but I didn't realize that I still had to click "Save Changes" to actually deactivate the rate.