-
Notifications
You must be signed in to change notification settings - Fork 384
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
Add AMP validation checking for Gutenberg blocks #1019
Merged
Merged
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
8413457
Add source comments around each Gutenberg block to track validation i…
westonruter 07aeee2
Defer mustache tag replacements to right before serialization and onl…
westonruter 01691e5
Eliminate needless use of PEG parser for adding block source comments
westonruter 27e8bec
Revert commit that removed REST API logic.
590cd76
Prototype asynchronous notices for blocks.
8218919
Rever commit 27e8b, which added REST API endpoint.
9c3568d
Add amp_validation field to REST API response.
ab82e8d
Output validation errors in REST API response.
ea1c37a
Remove jQuery dependency and ES6 class.
96297fc
Change which post types have the added field.
ed4b03b
In REST API response, validate front-end if no errors exist.
561af32
Skip Gutenberg-based tests for WP version < 4.9.
f64ab2e
Begin to add notices to blocks based on errors.
b9bd206
Address Travis error by aligning array values vertically.
bcdff5f
Get the block types with errors from the REST API response.
049e482
Update test to reflect change in text.
fe34e8e
Store the block validation errors, avoiding lookup in every edit().
49b66ae
Get validation errors for specific blocks, not only for block names.
743cca4
Address Travis errors by raising variable declaration.
4676777
Add 'block_attrs' to blocksWithErrors.
b9aa16c
Correct the variable for block_attrs.
e2fc9a7
Use the new blockAttrs to find a match with errors.
6cd996a
Move the notice from below to above the block.
339f69f
Add a 'More details' link to the notice.
a02d029
Enable showing multiple validation errors.
15f0abe
Enable outputting several error codes, and their counts.
2b03c6a
Address a Travis error regarding complexity.
d366da3
Remove the counts from after the error codes.
80d32de
Add keys to the components and edit block.
16388c2
Make the notice expandable.
f9d8575
Merge in develop, resolve conflicts.
kienstra 9aa6704
Address Travis error by removing extra comma.
kienstra dcb1e77
Force re-validation of post on frontend for amp_validation_errors fie…
westonruter eb00bcf
Prevent re-validating posts that have just been validated
westonruter 9ecc24c
Fix: Each child in an array or iterator should have a unique "key" prop
westonruter 354fdcd
Remove block error summary while waiting for design to formulate
westonruter 0bada73
Fix delay between save and update of validation error notice
westonruter 34024cc
Use eslint-config-wordpress and fix eslint issues
westonruter 8e78904
Prevent reporting validation errors for blocks that are not in the cu…
westonruter 277da63
Use eslint config adapted from Gutenberg
westonruter ca3ff60
Use block content index to match blocks with corresponding validation…
westonruter 01a21a8
Only update block validation errors when editor state is clean
westonruter 3e032d4
Handle showing validation errors for nested blocks
westonruter 6a4cbcc
Add initial overall warning notice when there are validation errors
westonruter 4d7dc19
Improve organization of Gutenberg extension code; improve warning not…
westonruter 21e60f0
Show details with each block's validation errors; improve styling
westonruter ca6c96c
Add link to validation error details in Gutenberg notice
westonruter 7a60509
Use wp.element.Fragment instead of wrangling arrays with key props
westonruter 5bf12da
Merge branch 'develop' of https://github.com/Automattic/amp-wp into a…
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've raised this in WordPress
#core-editor
:https://wordpress.slack.com/archives/C02QB2JS7/p1521043684000458