Goal
Remove the example Stimulus controller assets/controllers/hello_controller.js
once a real Stimulus controller exists in the project.
Background
assets/controllers/hello_controller.js was generated by the
symfony/stimulus-bundle Flex recipe during the frontend tooling
scaffolding in #38. It is an example file: when an element with
data-controller="hello" is rendered, the controller replaces the
element's text with "Hello Stimulus! Edit me in
assets/controllers/hello_controller.js". The file's own docblock says
"Delete this file or adapt it for your use!"
It was kept in the #38 PR so reviewers could see what a recipe-shipped
Stimulus controller looks like and so the asset pipeline had at least
one auto-discovered controller to exercise. It serves no production
purpose.
Scope
- Delete
assets/controllers/hello_controller.js.
- Verify nothing references
data-controller="hello" in templates/
(grep -r 'data-controller="hello"' templates/ should return no
matches).
- Run
itkdev-docker-compose php bin/console debug:asset-map and
confirm the hello controller no longer appears in the importmap
output.
When to do this
This issue is blocked until the project ships its first real
Stimulus controller (or until we conclude we will not use Stimulus
after all). Removing hello_controller.js while it is the only
Stimulus controller in the repo would leave us unsure whether the
auto-registration mechanism still works.
Acceptance criteria
References
Goal
Remove the example Stimulus controller
assets/controllers/hello_controller.jsonce a real Stimulus controller exists in the project.
Background
assets/controllers/hello_controller.jswas generated by thesymfony/stimulus-bundleFlex recipe during the frontend toolingscaffolding in #38. It is an example file: when an element with
data-controller="hello"is rendered, the controller replaces theelement's text with "Hello Stimulus! Edit me in
assets/controllers/hello_controller.js". The file's own docblock says
"Delete this file or adapt it for your use!"
It was kept in the #38 PR so reviewers could see what a recipe-shipped
Stimulus controller looks like and so the asset pipeline had at least
one auto-discovered controller to exercise. It serves no production
purpose.
Scope
assets/controllers/hello_controller.js.data-controller="hello"intemplates/(
grep -r 'data-controller="hello"' templates/should return nomatches).
itkdev-docker-compose php bin/console debug:asset-mapandconfirm the
hellocontroller no longer appears in the importmapoutput.
When to do this
This issue is blocked until the project ships its first real
Stimulus controller (or until we conclude we will not use Stimulus
after all). Removing
hello_controller.jswhile it is the onlyStimulus controller in the repo would leave us unsure whether the
auto-registration mechanism still works.
Acceptance criteria
assets/controllers/hello_controller.jsis deleted.data-controller="hello".[Unreleased] / Removed.References