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

Document ember-cli Addon Hooks #243

Open
villander opened this issue Dec 29, 2021 · 6 comments
Open

Document ember-cli Addon Hooks #243

villander opened this issue Dec 29, 2021 · 6 comments

Comments

@villander
Copy link
Contributor

We don't have a clear and easy way to learn ember-cli hooks even for experienced Ember.js developers sometimes we have to jump into the ember-cli codebase to understand many points about the hooks:

I'd love to see these hooks very well documented into CLI Guides. How can we start this initiative @jenweber @locks to make our guides better?

https://ember-cli.com/api/classes/addon

@jenweber
Copy link
Contributor

jenweber commented Jan 3, 2022

Thanks for raising this! We need an author for the content. Just one or two examples in a short article would even be a huge help. Are there any blog posts covering this? We could ask the authors if they would let us use the content.

I don’t write any addons using hooks and so I can’t really guide anyone directly, but I can help review PRs for clarity and test code samples.

@villander
Copy link
Contributor Author

@miguelcobain @rwwagner90 @kaliber5 @ef4 @runspired I know that you guys have a lot of experience writing addons for the ember community and I appreciate it a lot.

I’ve been mentoring many developers these last years. And even for experienced developers is too hard to play with addons when people need to do something more complex with addon hooks. They always need to jump in an addon already built like ember-bootstrap or know about the framework behind the scenes to develop their addons. Since one of the core values of ember.js is ergonomic, I really would love to see this knowledge more public and improved. Can you help us here?

@RobbieTheWagner
Copy link
Member

@villander I usually stumble through this stuff myself and I don't know a ton about it. However, I would be happy to help write up what I know. Where should we start?

@ef4
Copy link

ef4 commented Jan 3, 2022

This is another reason why I am working to kill off the traditional (v1) addon format. They're way too hard to contribute to, and that's not primarily because of a lack of docs. It's because they're complicated and genuinely hard to work with.

I would rather get help on learning materials for v2 addon authoring than try to explain how v1 addons work. The end result will be more beginner-friendly.

@jenweber
Copy link
Contributor

jenweber commented Jan 6, 2022

@ef4 we are interested in helping to create the v2 addon docs. @villander and I are going to review the RFC and see what we can pull out from it. Can we meet with you once we have the bare bones sketched out?

I reached out to hashrocket to see if they will allow us to use the blog post they have about v1 hooks within our docs, to avoid writing new material.

@rwwagner90 can you tell me which hooks you have used the most? If there's any particular addon you used them in that you can link us to, that would be great. We can do some experimenting and then we will probably have some questions.

@RobbieTheWagner
Copy link
Member

@jenweber I am really not sure, to be honest. I usually just look them up when I have a need, and then they immediately exit my brain. I think we should probably look at top addons on Ember Observer and check the hooks they use.

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

No branches or pull requests

4 participants