Skip to content

Remove custom jquery - #301

Open
leibowitz wants to merge 3 commits into
jazzband:masterfrom
leibowitz:remove_jquery_settings
Open

Remove custom jquery#301
leibowitz wants to merge 3 commits into
jazzband:masterfrom
leibowitz:remove_jquery_settings

Conversation

@leibowitz

@leibowitz leibowitz commented Apr 28, 2020

Copy link
Copy Markdown
Contributor

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:jquery@2.2.0

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

leibowitz commented Apr 28, 2020

Copy link
Copy Markdown
Contributor Author

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...

Comment thread docs/settings.md
@@ -1,10 +0,0 @@
## Settings

`JQUERY_URL`

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

codecov Bot commented Jun 3, 2021

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.88%. Comparing base (2cff847) to head (e66769b).
⚠️ Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
smart_selects/widgets.py 20.00% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (2cff847) and HEAD (e66769b). Click for more details.

HEAD has 16 uploads less than BASE
Flag BASE (2cff847) HEAD (e66769b)
18 2
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leibowitz

leibowitz commented Jun 3, 2021

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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