-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Deprecate {{hasBlock}} and {{hasBlockParams}} in templates #689
Conversation
👋 Should hasBlockParams be included in this RFC as well or should that be a separate one? It seems: {{#if hasBlockParams}}
{{/if}} and {{#if (has-block-params)}}
{{/if}} accomplish the same thing as well. |
Yep let's add |
We discussed this on the framework core team meeting today. We are all 👍 but agreed logistically it's easier to add |
Yeah, the only reason it was not part of this RFC was because the transform only documents that it works for |
Hi, @pzuraq. Could you update the link for |
We discussed this at todays core team meeting, and are moving it into final comment period. |
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.
Both {{has-block}}
and {{has-block-params}}
are currently documented as hasBlock
and hasBlockParams
in API docs. This might be very confusing when this deprecation lands.
The `{{hasBlockParams}}` property is true if the component was given a default block, | ||
and false otherwise. To transition away from it, you can use the `(has-block-params)` | ||
helper instead. |
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.
The `{{hasBlockParams}}` property is true if the component was given a default block, | |
and false otherwise. To transition away from it, you can use the `(has-block-params)` | |
helper instead. | |
The `{{hasBlockParams}}` property is true if the component was invoked with block | |
params for the default block, and false otherwise. To transition away from it, you can | |
use the `(has-block-params)` helper instead. |
@jelhan - ya, totally agree! We'll need to ensure that the API docs are updated at the time the deprecation guide lands. @pzuraq - Would you mind double checking the prose here to see if we need to explicitly call that out? I think it may be already included in the existing prose RE: "How we teach this", but would love a second set of 👀... |
Regarding implementing this, should this be a deprecation log on build? Since it's a build time transform? |
I think either would be acceptable, but generally if we can do it at build time that would be preferable IMO. |
Agree. Doing it in the build gives us easier access to actual line / column numbers which is very helpful. |
6404caf
to
f3a4773
Compare
f3a4773
to
54d323d
Compare
Rendered