8000 [Form] Add Stimulus example to Form Collections page? · Issue #17355 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Form] Add Stimulus example to Form Collections page? #17355

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

Closed
ThomasLandauer opened this issue Oct 16, 2022 · 3 comments
Closed

[Form] Add Stimulus example to Form Collections page? #17355

ThomasLandauer opened this issue Oct 16, 2022 · 3 comments
Labels
Form hasPR A Pull Request has already been submitted for this issue.

Comments

@ThomasLandauer
Copy link
Contributor

@weaverryan What about showing the Stimulus way of doing it at https://symfony.com/doc/current/form/form_collections.html#allowing-new-tags-with-the-prototype ?
If I write it, will you merge it?
If yes: It's probably better to add it to the existing Vanilla-JS code (e.g. with an own heading "Using Stimulus" below), rather than replace it?

@carsonbot carsonbot added the Form label Oct 16, 2022
@weaverryan
Copy link
Member

I'd say yes, 👍!

My instinct would be to ADD it - e.g. a "JavaScript with Stimulus" and "JavaScript with Vanilla JS", but perhaps others will think we should be more opinionated in favor of Stimulus. But either way, NOT showing how this is done in Stimulus is a diss\service currently.

ThomasLandauer added a commit to ThomasLandauer/symfony-docs that referenced this issue Oct 18, 2022
See symfony#17355 (comment)

* Please add a link to https://symfony.com/doc/current/frontend/encore/simple-example.html#stimulus-symfony-ux - this syntax is still a miracle to me...
* The *general* explanation is so intertwined with JavaScript, that a "clean" separation doesn't work - Stimulus users will still need to read the Vanilla JS approach to understand what's going on.

Please merge this first, then I'll add the same down at the "Allowing Tags to be Removed" section.
@ThomasLandauer
Copy link
Contributor Author

Please take a look: #17364

@xabbuh xabbuh added the hasPR A Pull Request has already been submitted for this issue. label Oct 31, 2022
javiereguiluz added a commit that referenced this issue Nov 3, 2022
This PR was squashed before being merged into the 6.1 branch.

Discussion
----------

[Form] Adding Stimulus code

See #17355 (comment)

* Please add a link to https://symfony.com/doc/current/frontend/encore/simple-example.html#stimulus-symfony-ux - this syntax is still a miracle to me...
* The *general* explanation is so intertwined with JavaScript, that a "clean" separation doesn't work - Stimulus users will still need to read the Vanilla JS approach to understand what's going on.

Please merge this first, then I'll add the same down at the "Allowing Tags to be Removed" section.

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `6.x` for features of unreleased versions).

-->

Commits
-------

aeb04ec [Form] Adding Stimulus code
@javiereguiluz
Copy link
Member

Closing as fixed in #17364.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Form hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

5 participants
0