google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 290 forks source link

Prevent disabling "Confirm changes" / "Save changes" button when settings are not changed #7533

Closed jimmymadon closed 11 months ago

jimmymadon commented 1 year ago

Feature Description

If a user modifies settings within a form but then ends up selecting the same settings as when the UI panel / form was initially opened, i.e. the settings have not changed, then the "Confirm Changes" button is disabled. This behaviour can be confusing to the user as explained in this comment.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

In assets/js/components/settings/SettingsActiveModule/Footer.js:

Button Text Modification

Managing Button's Disabled State

Test Coverage

QA Brief

  1. Initial State Check:

    • Set up Site Kit and navigate to the settings page.
    • Ensure the initial state of the button reads "Save" and isn't disabled.
  2. Changing Settings:

    • Modify any settings available on the page.
    • Observe the button text. It should update to "Apply changes".
  3. Saving State Check:

    • Click the "Apply changes" or "Save" button.
    • Observe that the button text changes to "Saving…" during the save operation as it works currently.
  4. Loading State Check:

    • Refresh the settings page or navigate away and then return.
    • The button should be disabled while the entire settings screen is loading.

Changelog entry

tofumatt commented 1 year ago

ACs are good, I think this is a good change 👍🏻

tofumatt commented 1 year ago

Good idea on the change of behaviour for when to disable the "Save" button. Nice work, I think that's gonna be a better user experience 👍🏻

IB ✅

mohitwp commented 12 months ago

QA Update ✅

![image](https://github.com/google/site-kit-wp/assets/94359491/6e9e320f-7aeb-445a-a219-a7da23c3a5fd) ![image](https://github.com/google/site-kit-wp/assets/94359491/d23446e0-2170-40be-8cdd-c4e980bff2fd) https://github.com/google/site-kit-wp/assets/94359491/496b4bf0-7b7b-437d-b2aa-624d92cc1d2c https://github.com/google/site-kit-wp/assets/94359491/b80f7a0f-f464-4c07-b20a-8f73af0907e1
aaemnnosttv commented 11 months ago

Approving since this is defined as specific to the module settings views, but the same pattern should be applied consistently and currently we're still using the previous pattern in user input (post setup) and dashboard sharing settings. @jimmymadon let's open a new issue to address these additional cases unless it was decided not to for some reason.