site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

UX: `useSnippet` setting requires manual save after programmatic toggle

Open Hazlitte opened this issue 5 years ago • 5 comments

Bug Description

When GA snippet is manually inserted and Analytics is connected in Site KIt. In Site Kit -> Analytics settings the "Let Site Kit place code on your site" switch is disabled but the confirm changes button is active even though the user has not made a change.

Steps to reproduce

  1. Check that the tester plugin is not manually inserting the GA snippet
  2. Connect Analytics in Site Kit
  3. Edit Analytics settings. Site Kit -> Settings -> Connected Services -> Analytics -> Edit
  4. Enable Let Site Kit place code on your site and save the settings
  5. Manually insert GA snippet
  6. Edit Analytics settings. Site Kit -> Settings -> Connected Services -> Analytics -> Edit
  7. "Let Site Kit place code on your site" is disabled but the confirm changes button is active

Screenshots

Additional Context

This started occurring after implementing a fix for https://github.com/google/site-kit-wp/issues/2909


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

Acceptance criteria

  • When an existing tag is detected while in the Analytics settings panel, the "Confirm Changes" button should not be enabled until the user has actually changed a setting. It should not be enabled just because Site Kit automatically set useSnippet to false on the client-side.
  • If Site Kit automatically changes the useSnippet setting due to an existing tag being found (i.e. deactivates the toggle when it was previously activated), the change should be saved immediately (without saving any other changes the user potentially made on the page in the meantime).

Implementation Brief

Test Coverage

Visual Regression Changes

QA Brief

Changelog entry

Hazlitte avatar Apr 08 '21 09:04 Hazlitte

This is more of a UX enhancement than a bug I think 🤔

aaemnnosttv avatar Apr 13 '21 09:04 aaemnnosttv

I've probably misinterpreted the documentation. I think I read that if an issue occurs as a result of resolving a bug the subsequent issue is also deemed to be a bug.

Hazlitte avatar Apr 13 '21 12:04 Hazlitte

@felixarntz should we not also inform the user when this happens? It seems like not doing so would be another UX bug where viewing a module's settings could have the side effect of changing this setting without the user knowing.

aaemnnosttv avatar Apr 27 '21 08:04 aaemnnosttv

@aaemnnosttv Good point. Actually, this leads to another question too, what if the existing snippet is for a different property than what was previously selected? In that case, that would need to be automatically updated too.

I guess it makes most sense to keep this as is for now and move it back in the queue. There's some UX improvements to unpack here, but where this currently is, it doesn't feel ready for any meaningful improvements.

The behavior isn't a bug as you mentioned, rather a UX flaw, so I think we should revisit that.

felixarntz avatar Apr 27 '21 18:04 felixarntz

Closing as we no longer change the toggled states of snippet controls based on the presence of existing tags.

aaemnnosttv avatar Aug 02 '22 18:08 aaemnnosttv