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.23k stars 287 forks source link

Error style isn't cleared when submitting changes in settings edit #8481

Open aaemnnosttv opened 6 months ago

aaemnnosttv commented 6 months ago

Bug Description

The settings edit interface for a module has additional styling applied when an error is raised in response to saving the settings.

https://github.com/google/site-kit-wp/blob/c04724c4dceae289affe66424690673691f6cb74/assets/js/components/settings/SettingsActiveModule/Footer.js#L106-L110

https://github.com/google/site-kit-wp/blob/c04724c4dceae289affe66424690673691f6cb74/assets/js/components/settings/SettingsActiveModule/index.js#L63-L66

However, this state is never cleared which can leave a lingering error appearance after the error has been addressed or is otherwise no longer relevant.

Steps to reproduce

  1. Set up SK with no additions
  2. Connect GA with an existing property
  3. Edit GA settings and choose to create a new property or datastream and submit
    • Note this is technically an error
  4. Follow the prompt to grant additional scope
  5. Back in settings once granted, see the interface shows with the red error border, even after completing the property creation (click edit again)

Screenshots

image

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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

eugene-manuilov commented 6 months ago

IB ✔️

mohitwp commented 1 week ago

QA Update ✅

https://github.com/user-attachments/assets/d1643059-06dd-482b-a481-a522f17b949e