Update block-templates error message and docs#46
Open
carolinan wants to merge 1 commit intoWordPress:trunkfrom
Open
Update block-templates error message and docs#46carolinan wants to merge 1 commit intoWordPress:trunkfrom
carolinan wants to merge 1 commit intoWordPress:trunkfrom
Conversation
dd32
reviewed
Sep 27, 2021
| ) { | ||
| failures.push( | ||
| `There's a problem with templates in: ${ templates[ i ].fileName }.` | ||
| `There's a problem with the markup in ${templates[i].fileName }. There are unclosed tags or multiline blocks that are missing closing tags. Blocks are self-containing; the opening tag and the closing tag must be in the same template.` |
Member
There was a problem hiding this comment.
I personally don't think the extra sentences are required here, but clarification on the wording of the error makes sense.
Having an error message that is not explicit of the error seems unhelpful to me - that's what the documentation is for.
Thoughts @carolinan
Suggested change
| `There's a problem with the markup in ${templates[i].fileName }. There are unclosed tags or multiline blocks that are missing closing tags. Blocks are self-containing; the opening tag and the closing tag must be in the same template.` | |
| `There's a problem with the markup in ${templates[i].fileName }.` |
Contributor
Author
There was a problem hiding this comment.
"The markup in (name) is invalid" might be better?
carolinan
commented
Sep 27, 2021
| ) { | ||
| failures.push( | ||
| `There's a problem with templates in: ${ templates[ i ].fileName }.` | ||
| `There's a problem with the markup in ${templates[i].fileName }. There are unclosed tags or multiline blocks that are missing closing tags. Blocks are self-containing; the opening tag and the closing tag must be in the same template.` |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| `There's a problem with the markup in ${templates[i].fileName }. There are unclosed tags or multiline blocks that are missing closing tags. Blocks are self-containing; the opening tag and the closing tag must be in the same template.` | |
| `The markup in ${templates[i].fileName } is invalid.` |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Updates the error message and docs for the test that checks if block templates are complete.
Current:
There's a problem with templates in: filename
After:
There's a problem with the markup in filename. There are unclosed tags or multiline blocks that are missing closing tags. Blocks are self-containing; the opening tag and the closing tag must be in the same template.