-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add @a2lix/symfony-collection solution #9614
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
Conversation
I'm grateful that people contribute something to the community by creating packages that bring a solution for certain problems. I do think you should change: The package `@a2lix/symfony-collection`_ helps as well with ``collection`` form elements,
to provide to modern browsers a simple version that do not require jQuery anymore. to The package `@a2lix/symfony-collection`_ also works with``collection`` form elements,
to provide to modern browsers an improved slimmer version that do not require jQuery. Somebody else has to check and share their opinion about this before we merge this. |
Yep, I agree with the rewordings proposed by @ricknox Furthermore, for something to be seen as "the encouraged way", it should be mentioned first in the docs. So let's change the order of the two packages: First mention the new package and then mention the jQuery package like: "If you want to use jQuery, there is a jQuery extension [...]". If you agree and have time to change this, please update this PR. Otherwise, we'll take your commit and add a new commit changing it afterwards. In any case, thanks for starting to update the docs with best practices from non-Symfony worlds! |
@wouterj updated, but yes feel free to make additional changes! |
@webda2l The changes could be applied to the 2.7 docs too, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely agree with discouraging jQuery 👍
9261971
to
d2b7cee
Compare
This PR was squashed before being merged into the 3.4 branch (closes #9614). Discussion ---------- Add @a2lix/symfony-collection solution Hello, I wrote a blog post earlier this month about this package: https://a2lix.fr/2018/04/05/manage-symfony-form-collection-with-vanilla-javascript.html. IMO, as there are Symfony best practices, we should do a bit of Javascript good practices and start discouraging the use of jQuery in the documentation right now. I thought about updating the different parts of jQuery code of this form_collections.rst to a modern JS code, but it doesn't satisfy me because to do good things, it will increase number of lines of JS. And, IMO, it's better to push people to use an external JS solution (or create symfony JS based solution) instead of explain quickly how redo a poor JS solution. Any thoughts? Commits ------- d2b7cee Add @a2lix/symfony-collection solution
I finally merged this. I apologize for the long delay :( Thanks! |
Hello,
I wrote a blog post earlier this month about this package: https://a2lix.fr/2018/04/05/manage-symfony-form-collection-with-vanilla-javascript.html.
IMO, as there are Symfony best practices, we should do a bit of Javascript good practices and start discouraging the use of jQuery in the documentation right now.
I thought about updating the different parts of jQuery code of this form_collections.rst to a modern JS code, but it doesn't satisfy me because to do good things, it will increase number of lines of JS.
And, IMO, it's better to push people to use an external JS solution (or create symfony JS based solution) instead of explain quickly how redo a poor JS solution.
Any thoughts?