Skip to content

Improve displaying validation errors' invalid markup in Gutenberg block warning notice #3664

@westonruter

Description

@westonruter

Feature description

The compatibility tool now includes nice translatable error messages instead of error codes:

Screen Shot 2019-10-29 at 12 56 25

This has not yet fully been done for the error listed in the warning notice at the block level:

Screen Shot 2019-10-29 at 12 56 11

Essentially the logic from \AMP_Validation_Error_Taxonomy::get_error_title_from_code() and \AMP_Validation_Error_Taxonomy::filter_manage_custom_columns() needs to be adapted from PHP to be included in JS.

The text style should be consistent as well.

Aside: It would be great if more information could also be included in the warning without requiring the user to navigation to the Validated URL screen. The user should be able to manage whether or not the invalid markup is Removed or Kept straight from the warning itself, and have access to all of the context. This is part of a larger issue: #2316.


The validation error warning should also include:

  • Plugin source information.
  • Deep link to validated URL screen with the validation error expanded.

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

Acceptance criteria

  1. Improve the message on the validated URL screen
  2. Current logic in JS should be in PHP and included in validation errors response.
  3. Ensure the error messages are consistent

Implementation brief

QA testing instructions

Demo

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions