-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Enhance controller templates docs #300
Enhance controller templates docs #300
Conversation
@leastbad I didn't quite understand what you meant by:
By event handlers do you mean the lifecycle methods/callbacks? |
310682e
to
e0fe347
Compare
e0fe347
to
b8c5e97
Compare
Hey @leastbad I have a failing test I couldn't get how to fix. It's comparing the output of the generated file to something but I'm not sure what's it comparing it to. These are the test lines responsible: Could you guide through it? I haven't written these kinds of tests before. |
Hey @pinzonjulian! Thank you for the PR! This is looking good so far.
Yes, he is talking about the four lifecycle methods in the ApplicationController template. ( Concerning the tests:
Maybe it also make sense to check if the action is also present since I hope this helps! 😊 |
I believe |
We can add more to this, later! For now, these changes are great. Thanks @pinzonjulian! |
Enhancement
Description
This PR enhances the comments included in the
application_controller.js.tt
and%file_name%_controller.js.tt
that explain how stimulus controllers work in the context of StimulusReflex.Fixes #298
Why should this be added
This PR solves a few doubts and gotchas I experienced myself as a first time user of SR. By enhancing these comments, I expect new developers using the gem to encounter less unexpected errors and be able to use the gem out of the box with less problems.
Checklist