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

[live-component docs] Rearrange information about using custom Stimul… #1367

Merged
merged 1 commit into from Jan 3, 2024

Conversation

srich387
Copy link
Contributor

@srich387 srich387 commented Jan 1, 2024

Q A
Bug fix? no
New feature? no
Issues n/a
License MIT

In the section 'Working with the Component in JavaScript', the preamble mentions that you can create a custom Stimulus controller, and attach it to or put it around the root component element, in order to control its behaviour.

How to attach a custom controller is, however, only explained further down in the subsection 'Adding a Stimulus Controller to your Component Root Element'. This subsection is currently buried beneath an intervening subsection on a different topic, 'JavaScript Component Hooks', making it easy for a reader to overlook.

I have therefore swapped these two subsections around to improve their logical flow.

It is especially important that this information is presented clearly because it has caused confusion in the past; see e.g. #687.

…us controllers

In the section 'Working with the Component in JavaScript', the preamble mentions that you can create a custom Stimulus controller and attach it to or put it around the root component element in order to control its behaviour.

How to attach a custom controller is only explained further down in the subsection 'Adding a Stimulus Controller to your Component Root Element'. This subsection is currently buried beneath an intervening subsection on a different topic, 'JavaScript Component Hooks', making it easy for a reader to overlook.

As such, to improve the logical flow of the documentation, I have swapped these two subsections around.

It is especially important that this information is presented clearly because it has caused confusion in the past; see e.g. symfony#687.
@kbond
Copy link
Member

kbond commented Jan 3, 2024

Thank you @srich387.

@kbond kbond merged commit 86a7d39 into symfony:2.x Jan 3, 2024
33 of 34 checks passed
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.

None yet

3 participants