Re: [Django] #15220: replace SelectFilter2.js with a jQuery plugin

32 views
Skip to first unread message

Django

unread,
Jun 10, 2011, 7:15:23 AM6/10/11
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Component: contrib.admin
Milestone: | Severity: Normal
Version: SVN | Keywords:
Resolution: | Has patch: 1
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 1 |
UI/UX: 1 |
-------------------------------------+-------------------------------------
Changes (by dbunskoek):

* owner: slurms => dbunskoek
* easy: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 10, 2011, 7:39:31 AM6/10/11
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Component: contrib.admin
Milestone: | Severity: Normal
Version: SVN | Keywords:
Resolution: | Has patch: 1
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 0 |
UI/UX: 1 |
-------------------------------------+-------------------------------------
Changes (by dbunskoek):

* needs_better_patch: 1 => 0


Comment:

I updated the original patch so it will apply cleanly to trunk, and also
made some improvements:

Improved coding-style

* moved from leading spaces to tabs
* removed trailing comma's (fixes IE support)

Usability improvements

* removed inconsistent 'wrap-around' functionality in selects
* also allow moving back from 'selected' to 'choices'
* only allow moving with right or left key when the layout is horizontal
(it doesn't make sense when layout is vertical)
* fixed keyboard shortcuts (didn't work at all in the trunk version)

I tested it all in IE7, IE8, FF4, Safari, Chrome, and it works like a
charm.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:8>

Django

unread,
Jun 10, 2011, 9:47:03 AM6/10/11
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Component: contrib.admin
Milestone: | Severity: Normal
Version: SVN | Keywords:
Resolution: | Has patch: 1
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 0 |
UI/UX: 1 |
-------------------------------------+-------------------------------------

Comment (by idangazit):

This looks good to me, but I also lack the JS-foo to vet every line of the
JS.

This would be an excellent candidate for figuring out a more standardized
means of testing. Could be QUnit, could be Selenium, could be both. I'd
feel more comfortable with JS changes like these if I had a test suite to
run on them.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:9>

Django

unread,
Feb 4, 2012, 4:51:44 PM2/4/12
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by jezdez):

FWIW, selenium tests have now landed in the admin, so this should be much
easier to test.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:10>

Django

unread,
Feb 23, 2012, 3:09:48 AM2/23/12
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by julien):

Quick note: some tests were added in r17579.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:11>

Django

unread,
Mar 4, 2012, 12:43:06 AM3/4/12
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by julien):

FYI, while working on #13614, I've used the latest patch from here and
brought it up to date with current trunk.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:12>

Django

unread,
Mar 12, 2012, 5:03:26 PM3/12/12
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by julien):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:13>

Django

unread,
Mar 12, 2012, 5:04:41 PM3/12/12
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: SVN
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by julien):

We'll do this shortly after 1.4 gets released, based on the patch in
#13614.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:14>

Django

unread,
Jul 26, 2013, 1:27:42 PM7/26/13
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: master

Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by timo):

I closed #3202 as a duplicate which points out the inability of the
current implementation to handle large lists. We should make sure new
solution improves this.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:15>

Django

unread,
Aug 8, 2014, 2:04:53 PM8/8/14
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization | Version: master
Component: contrib.admin | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 1
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by CollinAnderson):

* cc: cmawebsite@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:16>

Django

unread,
May 12, 2015, 8:27:03 AM5/12/15
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by benkonrath):

* cc: ben@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:17>

Django

unread,
Jul 24, 2015, 8:33:13 AM7/24/15
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: slurms | Owner: dbunskoek
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by timgraham):

[https://github.com/django/django/pull/4701 PR 4701] is the latest effort
on this if someone is interested in updating it.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:18>

Django

unread,
Sep 24, 2017, 2:08:34 PM9/24/17
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
-------------------------------------+-------------------------------------
Reporter: Nick Sandford | Owner: dbunskoek

Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Collin Anderson):

This is basically fixed now that we can use select2 for many-to-many
fields. Once it's been around for a while we could try changing UserAdmin
to use select2 by default instead of SelectFilter2.js.

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:19>

Django

unread,
Oct 12, 2021, 3:37:42 AM10/12/21
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
--------------------------------------+------------------------------------
Reporter: Nick Sandford | Owner: (none)
Type: Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: dbunskoek => (none)
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:20>

Django

unread,
Oct 12, 2021, 3:37:46 AM10/12/21
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
--------------------------------------+------------------------------------
Reporter: Nick Sandford | Owner: (none)
Type: Cleanup/optimization | Status: new

Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:21>

Django

unread,
Mar 18, 2024, 3:10:45 AM3/18/24
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
--------------------------------------+------------------------------------
Reporter: Nick Sandford | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
--------------------------------------+------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:22>

Django

unread,
Aug 10, 2025, 2:53:16 AMAug 10
to django-...@googlegroups.com
#15220: replace SelectFilter2.js with a jQuery plugin
--------------------------------------+------------------------------------
Reporter: Nick Sandford | Owner: (none)
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
--------------------------------------+------------------------------------
Changes (by David Smith):

* resolution: => wontfix
* status: new => closed

Comment:

These days (mid-2025) jQuery is not the direction admin is headed to.
Removing it has been the current trajectory for some time.

Digging a bit deeper jQuery was added to this file at some point as it was
later removed in
https://github.com/django/django/commit/c8503562e01a1eba8b227859bcf8965e2e9ea5f8

The underlying reason to rewrite in jQuery as explained on the mailing
list was performance but I'm not sure that's an issue now either. #26561,
for example, aimed to address the key performance issues.
--
Ticket URL: <https://code.djangoproject.com/ticket/15220#comment:23>
Reply all
Reply to author
Forward
0 new messages