Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Compatibility debugging workflow narrative #2023

Closed
amedina opened this issue Mar 26, 2019 · 25 comments · Fixed by #3630
Closed

Enhance Compatibility debugging workflow narrative #2023

amedina opened this issue Mar 26, 2019 · 25 comments · Fixed by #3630
Labels
QA passed Has passed QA and is done
Projects
Milestone

Comments

@amedina
Copy link
Member

amedina commented Mar 26, 2019

The AMP plugin functionality is centered around interactions between actions taken by the plugin and actions taken by the user. The plugin can be configured to detect validation errors and automatically remove them (automatic sanitization). Or it can be configured to only detect errors but not removing them (manual sanitization). The user/developer has the control of what to do with detected errors. He/she can accept the plugin action (remove/not remove), or he/she can reject the plugin action.

This dicothomy between plugin and user actions percolates to the compatibility tool, and it is a main source of confusion for users of the plugin. This manifests in the labeling of errors that are surfaced by the compatibility tool as New Accepted or New Rejected, and the labeling of errors after the user has taken an action: Accepted or Rejected.

The problem is that the plugin actions are Remove and Keep (referring to the fate of the offending markup causing an error), while the user action is Accept or Reject (referring to the user intention with respect to the plugin action).

To remove this confusion, the compatibility tool should label the errors according to the action of the plugin, and not according to the action of the user. This entails updating the error labels this way:

  • New Accepted to New, Removed
  • New Rejected to New, Kept
  • Accepted to Removed
  • Rejected to Kept

This is only a change in labels and internal resource labeling.

@westonruter
Copy link
Member

See also #1741

Does this terminology change work for "Statuses"?

Since the underlying entity is the "validation error", does it make sense that a "validation error is removed" and a "validation error is kept"? Or does removed/kept make more sense if the underlying entity is the "invalid markup"?

@amedina
Copy link
Member Author

amedina commented Mar 26, 2019

I see that point. Still we are on the right track. Let's flesh out things a little more. The ultimate goal should be two fold:

  1. Decouple plugin actions from user actions
  2. Maintain consistency on the plugin side so that labels and statuses refer to either plugin actions or error-specific labels.

The status of an validation error as removed captures the fact that the error is not present in the generated content. That makes sense for status labels: this is an error which has been removed from the content. Similarly, the status of an error can be Kept, meaning it is still present in the generated content.

There are no other statuses for errors; that is, there is not a 'fixed' status, or anything else. And this approach satisfies conditions (1) and (2) above.

WDYT?

@westonruter
Copy link
Member

As discussed, it may be better to speak of “Retained” rather than “Kept”.

Something else to consider is that if:

  • ❌ Rejected ➡️ Retained/Kept
  • ✅ Accepted ➡️ Removed

Do these icons still make sense?

@westonruter
Copy link
Member

For master issue on the Compatibility Tool redesign, see #2316.

@amedina
Copy link
Member Author

amedina commented May 17, 2019

Discussing today with @pbakaus we considered using:

❌ Rejected ➡️ Markup Retained
✅ Accepted ➡️ Markup Removed

Which aligns well with the sanitization actions by the plugin.

@westonruter
Copy link
Member

The only gotcha with “Markup” is that the validation error could be due to non-markup code, like an illegal CSS at-rule or excessive CSS.

@pbakaus
Copy link

pbakaus commented May 17, 2019

Retained is a pretty complicated word, that many non-native speakers will not understand, I'm afraid.

How about:
-> Remove invalid content
-> Keep invalid content

We could also replace invalid with incompatible, might be clearer.

@amedina amedina added this to the v2.0 milestone May 17, 2019
@amedina
Copy link
Member Author

amedina commented May 17, 2019

The label must capture the status of the markup (past tense). We can have:

❌ Rejected ➡️ Markup Kept
✅ Accepted ➡️ Markup Removed

@amedina
Copy link
Member Author

amedina commented May 17, 2019 via email

@westonruter
Copy link
Member

What about “Code” instead of “Content”?

@postphotos
Copy link
Contributor

YES! This is a major step in the right direction. 🚀

Calling out Weston's note above, sometimes it's an illegal CSS rule or excessive that is flagging the sanitizer, not markup.

So if it's helpful, I'd suggest a slight adjustment, but with the same line of thinking:
Rejected ➡️ Content Kept (AMP Not Served)
Accepted ➡️ Incompatible Content Hidden

Maybe that's too wordy, but at least it's well understood.

@westonruter
Copy link
Member

Reject: 🗑
Accept: 💾

😉

@westonruter
Copy link
Member

Another alternative to “accept” is “suppress”, as the acceptance is intended to be temporary. The underlying issue should ideally be fixed in the theme/plugin that caused the problem in the first place.

@westonruter
Copy link
Member

westonruter commented Oct 25, 2019

Stepping back from this to get a fresh look.


The AMP plugin has an internalized representation of the AMP validator specification. The internalized validation rules are used in the plugin's sanitizers to prevent invalid AMP markup from being served on the frontend (to prevent Google Search Console from complaining). At the same time, the AMP plugin provides warnings about those caught validation errors in order to ensure the user is aware that it performing any sanitization actions.

Validation errors that have already been seen need to be marked as acknowledged in order to differentiate them from newly-encountered validation errors that require the user to review.

The user also needs to be able to opt-out of the markup causing a validation error from being sanitized. It may be that some invalid AMP markup on the page is actual critical for the page to function properly (e.g. some interactive graphic), and in this case the user needs to reject it from being sanitized. When a sanitization for a validation error's markup is rejected, there are two outcomes:

  • On a Transitional mode site (which is paired AMP), the user is redirected from the AMP version to the non-AMP version, and the rel=amphtml link is not even presented for crawling.
  • On a Standard mode site (which is AMP-first), there are no non-AMP URLs and thus redirection is not an option. In this case the amp attribute is removed from the root HTML element, preventing the page from being validated as an AMP page (and thus preventing Google Search Console from complaining). Such pages still use the AMP framework, and eventually these would be utilizing Bento AMP.

As such, a validation error which is sanitized is shown with ✅ whereas a validation error which is not sanitized is shown with ❌, since whether something is sanitized determines whether AMP is available.

There are 4 possible states for a validation error:

  • ✅ New Accepted
  • ✅ (Ack) Accepted
  • ❌ New Rejected
  • ❌ (Ack) Rejected

Again, the “new” states are important because they highlight validation errors which haven't been dealt with yet. So the “new” here is synonymous with “unacknowledged”, “unread” or “unapproved” (which is used on the Comments screen):

Screen Shot 2019-10-25 at 12 04 55

On the Validated URL screen, here is what it currently looks like when a URL has validation errors in all 4 possible states:

Screen Shot 2019-10-25 at 11 30 32

Here is what it could look like if we replace the “new” with the concept of read/unread state, and rebrand “accepted” as “removed” and “rejected” as “kept” (while also rebranding “Status” to “Action”):

Mock 1

Screen Shot 2019-10-25 at 11 28 32

Screen Shot 2019-10-25 at 11 28 49

The semantics change here as instead of listing validation errors it is rather listing invalid markup which is causing validation errors. So instead of manipulating the status of whether or not a validation error should (have its underlying markup) be sanitized, it changes to what action should be performed with the invalid AMP markup.

Notice that there is now no longer any “New” in the dropdowns. This is moved to a “Mark as read” row action, which would behave similar to the “Approve” link for comments. It doesn't change the action, but just clears out the unmoderated state. There is also here a new capability, to mark a previously read error as unread (via the “Mark as unread“ row action link. This would provide a way for a user to essentially flag a validation error to revisit later, similar to what people do with marking emails as unread.

Clicking “mark as read” and “mark as unread” would not cause the page to reload (same as comments) and the user wouldn't have to click the Update to persist the changes. The only concern I have with this is the call to action for clearing out the “unread” is not as easy to find as perhaps should be. Maybe instead of “read”/“unread” there should be instead (following the email paradigm) be the concept of “starring”. There could be a new column with a star which the user could click to toggle the state, which would make this more discoverable, for example:

Mock 2

Screen Shot 2019-10-25 at 11 49 53

Or using unseen/seen instead of unstarred/starred:

Mock 3

Screen Shot 2019-10-25 at 11 47 32

Or going with a checkbox:

Mock 4

Screen Shot 2019-10-25 at 11 52 32

But I don't like this so much because there is already a checkbox in the first column for bulk actions, and checkboxes don't usually change state when clicked (which we'd be doing here), and it confuses with the other ✅/❌ iconography (which perhaps should also be revamped).

@westonruter
Copy link
Member

Another alternative to seen/unseen is reviewed/unreviewed.

@westonruter
Copy link
Member

westonruter commented Oct 25, 2019

Current Validated URL Screens

As for the list of Validated URLs, here is what it looks like presently:

Screen Shot 2019-10-25 at 12 30 54

Screen Shot 2019-10-25 at 12 31 15

Screen Shot 2019-10-25 at 12 31 27

The “new” state for the URL shown here is present because it has one or more validation errors that are in this new/unseen/unacknowledged/unapproved state.

Mocks for Updated Validated URL Screens

Screen Shot 2019-10-25 at 12 33 57

Screen Shot 2019-10-25 at 12 34 09

Screen Shot 2019-10-25 at 12 34 18

Something that is missing from this view is a column indicating whether AMP is enabled/disabled for the URL. This is implied by there being a validation error in the “Kept” state, but it could be more clear.

It's also not clear what “Actions” means here, or what specifically is being “Removed” or “Kept”.

@westonruter
Copy link
Member

westonruter commented Oct 25, 2019

Current Validation Error Index Screen

Screen Shot 2019-10-25 at 12 39 18

Screen Shot 2019-10-25 at 12 39 28

Screen Shot 2019-10-25 at 12 39 51

Screen Shot 2019-10-25 at 12 39 58

Mocks for Updated Validated URL Screen

See discussion above about whether stars, eyeballs, or something else should be used to represent the acknowledged state.

Screen Shot 2019-10-25 at 12 46 19

Screen Shot 2019-10-25 at 12 46 28

Screen Shot 2019-10-25 at 12 46 37

@westonruter
Copy link
Member

As an alternative to unseen/starred/unapproved, another workable concept would be flagged.

A validation error that not been reviewed yet, could get flagged by default, indicating that it is an issue that needs to be reviewed. This concept would also work for issues which actually have been seen before but which the user wants to put back into an “unread” state. There is a flag Dashicon:

image

But there is no corresponding “unflagged” dashicon similar to there is for filled/unfilled star or visible/hidden:

image image

image image

@westonruter
Copy link
Member

Here's where @amedina and I have settled:

  • Remove the “Seen” column entirely, in favor of the “Mark as seen” and “Mark as unseen” row actions.
  • Rename the “Action” column to “Markup Status”.
  • Changing the seen state of a validation error is persisted immediately upon clicking (as is done with Comments), whereas the removed/kept status is only persisted when clicking Update (when on the Validated URL screen).
  • Use “Remove markup” and “Keep markup” for the action buttons and bulk action options.

Screen Shot 2019-10-25 at 16 52 56

Screen Shot 2019-10-25 at 16 54 17

@westonruter westonruter modified the milestones: v2.0, v1.4 Oct 26, 2019
@westonruter westonruter moved this from To do to In progress in v2.0 Planning Oct 26, 2019
@westonruter westonruter removed this from In progress in v2.0 Planning Oct 26, 2019
@westonruter westonruter added this to In Progress in Ongoing Oct 26, 2019
@westonruter westonruter self-assigned this Oct 26, 2019
@westonruter
Copy link
Member

I think we need better icons to represent Removed and Kept:

image

The ✅ is currently used for removal because it has a positive result for AMP, in that it allows AMP to be served. The ❌ is used for keeping because it has a negative result for AMP, that it blocks AMP from being served for the given URL.

Possibilities:

image
Screen Shot 2019-10-26 at 19 23 41 image

The icon representing removal can be green, whereas keep can be red.

@westonruter
Copy link
Member

Maybe it would make the most sense to just use the AMP logo? A red logo could be used for keep, whereas a green one for removal:

image

When a URL has any kept validation errors, then the URL as a whole would get the “AMP Disabled” gray badge in Transitional mode, whereas the orange badge in Standard mode. If a URL has no kept validation errors, then it should get the “AMP Enabled” blue badge.

@amedina
Copy link
Member Author

amedina commented Oct 28, 2019

I like the ides of using AMP logos with color differentiation.

The only aspect I am not fully convinced is the cases for AMP disabled Standard vs. Transitional modes. It might be better to have both of those cases represented with the gray symbol.

Although, I admit I like the orangee color used for the Standard mode case.

@westonruter
Copy link
Member

@amedina Yeah, going with gray will make it simpler; we won't have to explain it isn't fully disabled.

Here's what it is looking like now:

Screen Shot 2019-10-27 at 18 07 09

Screen Shot 2019-10-27 at 18 07 33

Screen Shot 2019-10-27 at 18 07 47

@westonruter
Copy link
Member

See all before/after screenshots in PR: #3630

@westonruter westonruter moved this from In Progress to Ready for QA in Ongoing Oct 28, 2019
@csossi
Copy link

csossi commented Nov 12, 2019

Verified in QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA passed Has passed QA and is done
Projects
Ongoing
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants