-
Notifications
You must be signed in to change notification settings - Fork 65
Added doc tag support logic inside snippet tag #1067
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
Added doc tag support logic inside snippet tag #1067
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4136c01 to
209fe79
Compare
|
|
||
| context.report({ | ||
| message: `The \`${docTagName}\` tag can only be used within a snippet or block.`, | ||
| message: `The \`${docTagName}\` tag can only be used at the top level of a snippet or block file, or as a direct child of an inline snippet tag.`, |
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.
(nit) Wondering if this could be clearer but nothing better is springing to mind. Might be worth workshopping a little bit to get "at the top level of" clearer.
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 totally agree, I'll try to come up with something clearer
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.
How does "The `${docTagName}` tag cannot be nested inside Liquid tags except for snippet tags." sound?
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.
Throwing in my two cents. Would it make sense to offer two different messages?
We keep the message for doc tags in snippets and blocks as The \${docTagName}\ tag can only be used at the top level of a snippet or block file
and then have a separate one triggered for inline snippets like `The ${docTagName} tag can only be used inside an inline snippet at the top level. (I don't have a good message for this)
My only reason for this is that the doc tags are now serving a purpose in different ways that would be confusing in one message.
We're top level only within blocks and snippet files but if we have an inline snippet that can be placed anywhere, it actually goes top level within the snippet itself.
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.
Hmm, yeah that's actually a great idea, I'll make two separate messages for the two cases
dejmedus
left a comment
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.
1c33a1e to
a47fc50
Compare
a47fc50 to
391578c
Compare


What are you adding in this PR?
Solves #826
Updated theme check to support
doctag inside ofsnippettag. This change allows thedoctag to be used within inline snippets, in addition to the previously supported snippet and block contexts.This PR also makes the theme check more rigorous by ensuring the doc tag is either:
The error message has been updated to reflect this new support, and tests have been added to verify that
doctags inside inline snippets don't trigger errors.What's next? Any followup issues?
Update the theme check docs
Before you deploy
changeset