PUGX / PUGXAutoCompleterBundle

Add an autocomplete field to your Symfony forms
GNU Lesser General Public License v3.0
93 stars 38 forks source link

Avoid dependencies on javascript libraries #66

Closed nzurita closed 3 years ago

nzurita commented 4 years ago

As of 2020, this bundle offers 2 javascript libraries options:

JqueryUI download page is now broken when using custom download. It has been like that for months (more than a year) and they state it will take some more months.

Using complete version of jqueryUI may confilct with some other plugins (that's my case) and using old version of Select2 also may lead to problems (I don't recall what exact problem I had but I couldn't use it either, maybe it forced to use an older version of some other library).

So, my question is: is there a built-in way to avoid using these libraries and implement my own? if not, do you plan to implement a built-in javascript list and avoid external dependencies? or at least... support last version of Select2?

Thank you.

garak commented 4 years ago

There are many different ways to use frontend assets in Symfony, so I can reply to your last question: no, I don't want to add frontend dependencies here. My personal suggestion is to use webpack encore, combined with yarn or npm to declare your vendors (similarly to backend vendors declared with composer)

nzurita commented 4 years ago

You mean I should implement my own javascrpt solution and plug it to PUGX/AutoCompleterBundle with this utility?

garak commented 4 years ago

I did it like so in many projects. No need to re-implement a solution, you can simply copy js files from here

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

garak commented 3 years ago

Solved with the new way of handling assets (via package.json)