Skip to content

chore: remove example Stimulus controller (hello_controller.js) #42

@martinydeAI

Description

@martinydeAI

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

  • assets/controllers/hello_controller.js is deleted.
  • No template references data-controller="hello".
  • CHANGELOG entry under [Unreleased] / Removed.

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions