Navigation Menu

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

Javascript is outdated and needs an overhaul #637

Open
nreynis opened this issue Jan 16, 2018 · 4 comments
Open

Javascript is outdated and needs an overhaul #637

nreynis opened this issue Jan 16, 2018 · 4 comments

Comments

@nreynis
Copy link

nreynis commented Jan 16, 2018

The javascript client has several problems and needs a bit of attention:

  • Use of deprecated methods which have been removed from jQuery 3 (critical: jQuery 3 has been released 18 months ago! Any new project is likely to use it and will have problem with this bundle.)
  • Use of assetic which is deprecated. You should deliver something more webpack friendly as webpack/remix is now the recommanded tool for Symfony
  • Global variables. You should use html5 data-attributes instead
  • Auto initialisation on parse. You should init on DOMContentReady so that the user is free to put his script where he wants
@nreynis
Copy link
Author

nreynis commented Jan 16, 2018

Just found #604. Forcing dev stability solve the first issue composer require friendsofsymfony/comment-bundle:^3.0@dev.

I still thinks the other points are valid and should be addressed in some way. But that's more of an opinion, so feel free to close and ignore if you don't agree.

@stof
Copy link
Member

stof commented Jan 16, 2018

for the global variables vs data attributes, a PR adding support for data-attributes would be OK (but not removing support for the global variable, to prevent BC breaks).

Note that I don't know of any FOS member actively using this bundle anymore (I may be wrong about this though), so changes are relying on community contributions.

@yakobe
Copy link

yakobe commented Jan 19, 2018

@stof could you share what people are using as an alternative? Perhaps it is time to concentrate resources into a better package if available and formally deprecate/abandon this one.

@XWB
Copy link
Member

XWB commented Jan 29, 2018

jQuery 3 is supported in master branch. I'll make a new release as soon as the next FOSRestBundle is released.

I agree it would be nice to have HTML 5 data attributes, perhaps someone is willing to create a PR?

I also agree on DOMContentReady. That should be an easy fix.

Regarding the assets, unfortunately I have not yet used Webpack so I have no clue what needs to be changed.

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

No branches or pull requests

4 participants