Skip to content

Rebrand validation errors#3630

Merged
westonruter merged 27 commits intodevelopfrom
update/rebrand-validation-errors
Oct 28, 2019
Merged

Rebrand validation errors#3630
westonruter merged 27 commits intodevelopfrom
update/rebrand-validation-errors

Conversation

@westonruter
Copy link
Copy Markdown
Member

@westonruter westonruter commented Oct 26, 2019

Summary

Fixes #2023.

  • Rebrand “accepting” the sanitization the invalid markup causing a validation error to rather be “removing” the invalid markup. Similarly, rebrand “reject” as “keep”. As such, “Status” generally now becomes “Markup Status”
  • Use different colors of AMP logo as icons for the various states, as opposed to the many different icons previously used (e.g. ✅ and ❌).
  • Improve descriptions of stylesheet error codes to indicate they relate to CSS.

Validated URLs List

  • Include whether AMP is enabled or disabled in the list.
  • Combine the counts of new errors into the remove/keep counts.
  • Rename “Invalid” column to “Invalid Markup”
  • Remove red color from Invalid Markup column.
  • Improve sources summary (see section below).
  • Update filter dropdowns to refer to actions taken on invalid markup rather than validation errors sanitization statuses.
Before After
amp validated urls before amp validated urls after

Validation Error Index

  • Per above, use “Removed” instead of “Accepted” and “Kept” instead of “Rejected”.
  • Per above, use only red and green AMP logos to indicate whether the invalid markup is kept or removed, respectively.
Before After
validation error index before validation error index after

Validation Error Detail

  • Use green/red buttons to correspond to the removed/kept actions.
  • Include “confirm” in the action buttons/links for remove/keep when in the new state, as removing already-removed invalid markup just clears the new state.
Before After
validation error before validation error after

Validated URL with Kept Markup (Rejected Error)

  • Re-work the page heading to just say “AMP Validated URL”, with subheading for the actual title of the queried object (if available).
  • Use same summary from validated URL list in the status metabox.
Before After
validated url kept error before validated url kept error after

Validated URL with Errors in all 4 states

  • As above, re-work the page heading to just say “AMP Validated URL”, with subheading for the actual title of the queried object (if available).
  • Eliminate separate dropdown options for the “New” states, keeping the choices to just: Removed and Kept.
  • As above, merge new error counts into the total counts for invalid markup removed/kept.
Before After
validated url all error states before validated url all error states after

Improvement to sources summary

Previously when there was a validation error occurring in the content, the summary would show:

Screen Shot 2019-10-26 at 09 31 18

Now, however, a translatable “Content” label is used:

Screen Shot 2019-10-26 at 09 34 14

And, more importantly, when there is more specific information available, like the block name, it is used instead:

Screen Shot 2019-10-26 at 09 31 36

Additionally, if Gutenberg is one of the sources, it will be suppressed since it should be considered the same as core.

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@googlebot googlebot added the cla: yes Signed the Google CLA label Oct 26, 2019
@westonruter westonruter added this to the v1.4 milestone Oct 26, 2019
@westonruter westonruter force-pushed the update/rebrand-validation-errors branch from 59901f4 to 634aae1 Compare October 26, 2019 16:14
@amedina amedina requested review from amedina and removed request for amedina October 26, 2019 16:56
@westonruter westonruter force-pushed the update/rebrand-validation-errors branch from c8f1604 to e7f39f2 Compare October 26, 2019 17:26
@westonruter westonruter self-assigned this Oct 26, 2019
@westonruter westonruter force-pushed the update/rebrand-validation-errors branch from e7f39f2 to 7658ab2 Compare October 27, 2019 00:07
@amedina amedina self-requested a review October 27, 2019 02:07
* Use "new" instead of "unseen"
* Add AMP enabled/disabled to validated URLs list
* Add new error count to validated URLs list
@westonruter westonruter force-pushed the update/rebrand-validation-errors branch from 924571a to 7bfe06e Compare October 27, 2019 06:16
…orange info

* Combine the Standard and Transitional disabled states into one.
* Eliminate separate New count for validation errors, instead showing tooltip.
* Bold the AMP enabled/disabled line.
…brand-validation-errors

* 'develop' of github.com:ampproject/amp-wp:
  Update dependency postcss to v7.0.21 (#3625)
  Update dependency eslint-plugin-jest to v22.21.0 (#3631)
  Improve logic for merging meta amp-script-src elements
  Add todo note for AMP4EMAIL and explain base64url
  Improve test_prepare_response_for_amp_script
  Add tests for new elements and attributes
  Add support for inline amp-script, with hash generator and amp-script-src meta tag merging
  Exclude erroneous AMP4EMAIL specs which include (erroneously?) html_format=AMP
  Update allowed tags/attributes from spec in amphtml 1910161528000
@westonruter westonruter marked this pull request as ready for review October 28, 2019 06:33
self::VALIDATION_ERROR_ACCEPT_ACTION
),
esc_html(
self::VALIDATION_ERROR_NEW_ACCEPTED_STATUS === $sanitization['term_status'] ? __( 'Confirm remove', 'amp' ) : __( 'Remove', 'amp' )
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be Confirm Removal? Feels more 'English' to me. But not a native speaker.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is my gut sense as well. Nevertheless, I can't think of a similar word for “keep”, so that's why I left it as a bare verb. “Confirm keepal” doesn't work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe “Confirm removed” and “Confirm kept” would be better.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so, because “confirm removed” has more or a sense that an action has been performed, whereas “confirm removal” has more of a timeless sense. And using the past participle means we can use “confirm kept”, and be consistent with other places we use the past participles in the markup status dropdowns.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 803d00f

@westonruter
Copy link
Copy Markdown
Member Author

Updates on Validated URL status metabox

An explanation is added when there are AMP is disabled:

image

And when AMP is enabled while there is invalid markup being removed, another message is displayed:

image

When there is no invalid markup on the URL, then no message is required:

image

AMP Validated URLs list

The “AMP enabled” and “AMP disabled” lines are removed from the validated URLs list, and “Status” column is changed to “Markup Status” to match the other screens:

image

The icons are reduced in size.

@amedina
Copy link
Copy Markdown
Member

amedina commented Oct 28, 2019

These changes are superb as they make the functionality of the plugin much more accessible, making it easier for developers to follow an AMP debugging workflow fully integrated with WordPress content generation mechanisms.

Copy link
Copy Markdown
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it, please!

…brand-validation-errors

* 'develop' of github.com:ampproject/amp-wp:
  Update dependency @wordpress/core-data to v2.7.4 (#3640)
  Update dependency @wordpress/editor to v9.7.4 (#3641)
  If text has been pasted, also force update dimesisions.
  Update dependency @wordpress/api-fetch to v3.6.4 (#3639)
  Update dependency @wordpress/edit-post to v3.8.4 (#3643)
  Update eslint and eslint-plugin-jest (#3636)
  Fix context menu for RTL users. (#3633)
  Fix cross-page element dragging in RTL (#3637)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance Compatibility debugging workflow narrative

4 participants