Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Save changes button on WooPayments pages are always active #9305

Open pierorocca opened 3 weeks ago

pierorocca commented 3 weeks ago

Describe the bug

WooPayments and Multicurrency pages seem to be the only pages where the "save settings" button is always enabled. Settings can be saved even if no changes were made to any setting. On occasion, the browser will throw a warning typical of unsaved changes.

image

Expected

Save settings is disabled until a settings change is made When a change is made, the button is enabled

@FangedParakeet do you know if there's a historical reason or technical limitation for this behavior?

pierorocca commented 3 weeks ago

image

FangedParakeet commented 3 weeks ago

do you know if there's a historical reason or technical limitation for this behavior?

@pierorocca, I wanted to confirm with the team before I offered a definitive answer here, but AFAICT there shouldn't be any technical limitations preventing us from implementing this enhancement and moreover there should be some existing functionality in the current code that might assist us in providing this feature, so might be a lightweight improvement from a development perspective as well.

FangedParakeet commented 2 weeks ago

Please add your planning poker estimate with Zenhub @mdmoore

mdmoore commented 1 week ago

This turned out to be more complex than a 2 because of the multiple settings screens accessible through modals and sub-pages. Upgrading the estimate to a 3.

pierorocca commented 6 days ago

@mdmoore which subpages don't have their own save button?

mdmoore commented 6 days ago

@pierorocca It's that more that they all do have their own save buttons. It's just that I kept realizing there were more settings to consider than just a main settings page and the multi-currency page, such as the Advanced Fraud settings, Single Currency settings via the "manage" link within each currency, and Express Checkout customization settings. Then there is the Add/Remove Currencies modal which requires updating the disabled state based on changes made via the modal.

pierorocca commented 6 days ago

Ah I see, it's the quantity of pages with save buttons as opposed to tracking changes multiple levels deep. Gotcha.