-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[DOC] Document helper
and modifier
keywords
#20119
[DOC] Document helper
and modifier
keywords
#20119
Conversation
This is mostly copy-paste from the respective RFC https://github.com/emberjs/rfcs/blob/master/text/0432-contextual-helpers.md and could be a good starting point to land the docs and we may iterate and polish as we go. would appreciate feedback/recommendations |
1cbd4d8
to
650d862
Compare
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.
Broadly 👍🏼 from me.
I think we can quibble on whether the examples copied from the RFCs are actually useful for explaining what the feature is. In the RFC they are more geared towards exhausting most of the possibilities, in a spec-by-examples kind of way. In documentation that may be a bit much and the point kind of gets lost. In other words, we may want to trim it down so that we only have one or two succinct/common use cases that gets the main point across.
That being said, any docs are certainly better than no docs. So if @SergeAstapov wants to do another pass now I think that's great, but otherwise we can also just merge it and let someone else iterate on this another time.
650d862
to
2f2ee62
Compare
I actually did that originally but then decided to provide exhaustive list examples. trimmed down to 3 examples for both |
2f2ee62
to
d75a0cb
Compare
that it can be passed around as first-class values in templates. | ||
|
||
```handlebars | ||
{{#let (helper "join-words" "foo" "bar" separator=" ") as |foo-bar|}} |
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.
One more thing (same for the other snippet): foo-bar
is it actually legal to have a dash in the local variable (block param) name? I probably should know this but I don't 🙃
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.
According to AST explorer it seems to be fine so that's good enough for me
Closes #19925