Skip to content
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

Fixes 595 in ember-learn/ember-api-docs - missing has-block API documentation #17767

Merged
merged 4 commits into from
Mar 21, 2019

Conversation

habdelra
Copy link
Contributor

@habdelra habdelra commented Mar 18, 2019

This fixes issue: ember-learn/ember-api-docs#595

I think there are a bunch of helpers that are more foundational to glimmer, like {{yield}} and {{with}} where the documentation was just put in the packages/@ember/-internals/glimmer/index.ts, despite the real functionality living deeper below. This seems to fall into that bucket, which probably explains why the documentation is missing from the API docs. The clearest place where I could find where the {{has-block}} helper is handled is:

https://github.com/emberjs/ember.js/blob/master/packages/%40ember/-internals/glimmer/lib/component-managers/curly.ts#L239-L242

But really, I think there are a lot of places that actually contribute to this functionality. Probably documenting {{has-block}} in the packages/@ember/-internals/glimmer/index.ts file is the most straightforward place to put it.

@habdelra
Copy link
Contributor Author

This also now addresses this issue: ember-learn/ember-api-docs#594 where we are now adding documentation for the {{has-block-params}} helper.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good! Could you also add examples using angle bracket invocation?

<MyComponent /> {{! without block }}
<MyComponent></MyComponent> {{! with block }}

Also, has-block accepts a single argument: the name of the block. The name (at the moment) is either "main" or "inverse" (though only curly components support inverse). I think that argument needs to be added to the docs for both has-block and has-block-params.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!!

@rwjblue rwjblue merged commit 7702686 into emberjs:master Mar 21, 2019
@habdelra habdelra deleted the has-block-api-documentation branch March 23, 2019 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants