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

Remove custom jquery #301

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

leibowitz
Copy link
Contributor

@leibowitz leibowitz commented Apr 28, 2020

Remove both JQUERY_URL and USE_DJANGO_JQUERY and always use Django jQuery version.

See #270 (comment)

BTW, jQuery 2.2.0 is quite old
https://snyk.io/vuln/npm:[email protected]

@leibowitz leibowitz changed the title Remove jquery settings Remove custom jquery Apr 28, 2020
@leibowitz leibowitz mentioned this pull request Apr 28, 2020
@leibowitz
Copy link
Contributor Author

leibowitz commented Apr 28, 2020

Fun fact, to actually make sure django jQuery is loaded, one needed to set JQUERY_URL = None, otherwise this never enters:

elif JQUERY_URL is not False:

But I can't see this documented anywhere. Apparently JQUERY_URL = None was the default for a while, and then got changed. I can only see some comments about this in there #206...

@@ -1,10 +0,0 @@
## Settings

`JQUERY_URL`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than delete this file, we should mention SMART_SELECTS_URL_PREFIX

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does SMART_SELECTS_URL_PREFIX do exactly? From what I can tell, it prepend the autocomplete endpoints. Is that it?

@manelclos
Copy link
Member

@leibowitz I would like to merge this one. Could you please rebase it against master to fix the conflict?

@manelclos manelclos self-assigned this May 12, 2020
@manelclos manelclos self-requested a review May 12, 2020 20:06
@codecov
Copy link

codecov bot commented Jun 3, 2021

Codecov Report

Merging #301 (e66769b) into master (2cff847) will decrease coverage by 12.53%.
The diff coverage is 20.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #301       +/-   ##
===========================================
- Coverage   80.42%   67.88%   -12.54%     
===========================================
  Files           8        8               
  Lines         470      464        -6     
  Branches       68       65        -3     
===========================================
- Hits          378      315       -63     
- Misses         60      136       +76     
+ Partials       32       13       -19     
Impacted Files Coverage Δ
smart_selects/widgets.py 31.97% <20.00%> (-34.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2cff847...e66769b. Read the comment docs.

@leibowitz
Copy link
Contributor Author

leibowitz commented Jun 3, 2021

@manelclos happy to try to bring this PR/branch up-to-date, if you are still willing to merge it? I did update it a year ago but nobody seems to have been bold enough to merge. I guess there were some concerns?

In my opinion depending on jquery 2.2.0 is not ideal. Especially since django already bundles jquery... I don't really see the need. Also, this causes a myriad of issues with other django extensions, I'm not going to get into... mainly due to events not being triggered due to multiple versions of jquery being loaded

@manelclos
Copy link
Member

Hi @leibowitz, back then I wanted to merge simple PRs to have a "last" compatible release, then merge this and the one removing Django 2.2 support to have a new major version release. But the Django 2.2 PR was merged without prior notice.

This PR was ok, I'm happy to look at it again if you update it. We should look into other needed modifications before we bump the major version.

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.

3 participants