As, the UI is builded dynamically it is pretty easy to achieve the result
you see below. I believe this feature is small but important.
[[Image(http://i.imgur.com/E2qGjLf.png)]]
I have a patch for that, should i attach it to the ticket or i can simply
make a Pull request on Github referring this particular ticket?
--
Ticket URL: <https://code.djangoproject.com/ticket/24179>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> I found that working with large datasets using ''filter_horizontal'' and
> thus FilteredSelectMultiple widget can be painful if you need to filter
> out `selected` entries.
>
> As, the UI is builded dynamically it is pretty easy to achieve the
> result you see below. I believe this feature is small but important.
> [[Image(http://i.imgur.com/E2qGjLf.png)]]
>
> I have a patch for that, should i attach it to the ticket or i can
> simply make a Pull request on Github referring this particular ticket?
New description:
I found that working with large datasets using ''filter_horizontal'' and
thus FilteredSelectMultiple widget can be painful if you need to filter
out selected entries.
As, the UI is builded dynamically it is pretty easy to achieve the result
you see below. I believe this feature is small but important.
[[Image(http://i.imgur.com/E2qGjLf.png)]]
I have a patch for that, should i attach it to the ticket or i can simply
make a Pull request on Github referring this particular ticket?
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:1>
* cc: gdmka (added)
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:2>
* easy: 1 => 0
Comment:
The tricky thing I have seen with this type of UI is determining what the
proper behavior is when a search term is entered in the right hand search
box and the form is saved. Do we save only the values that appear due to
the search or do we save all the "hidden" values as well?
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:3>
Comment (by gdmka):
>> Do we save only the values that appear due to the search or do we save
all the "hidden" values as well?
Great question!
I believe that ''filtering out'' values that do not match search criteria
is what should be default upon form submission. So we move the filtered
out back to the "available" column. The rest of the logic: eg doubleclick
on filtered results, stays the same.
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:4>
* owner: nobody => gdmka
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:5>
Comment (by charettes):
Replying to [comment:4 gdmka]:
> >> Do we save only the values that appear due to the search or do we
save all the "hidden" values as well?
> Great question!
>
> I believe that ''filtering out'' values that do not match search
criteria is what should be default upon form submission.
I would expect the opposite since the filter on the left side doesn't work
this way.
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:6>
* version: 1.7 => master
* component: Forms => contrib.admin
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:7>
* owner: gdmka => Anton Samarchyan
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:8>
* has_patch: 0 => 1
Comment:
I have submitted a [https://github.com/django/django/pull/8277 PR]. It's
currently for 1.8 version. Please see if the functionality is correct and
I will update it for the master branch. Please don't review the code
itself. It will need refactoring after the functionality is confirmed.
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:9>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:10>
* status: assigned => new
* owner: Anton Samarchyan => (none)
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:11>
* owner: Anton Samarchyan => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:11>
* owner: (none) => Gav O'Connor
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:12>
* needs_better_patch: 1 => 0
Comment:
PR created to allow the "Selected" column to be filtered in the same was
as the "Available" column.
The fix is purely for displaying the results, and the value passed to the
server/saved to the DB is not affected by what options are visible due to
the search terms.
[https://github.com/django/django/pull/15926 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:13>
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:14>
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:15>
* needs_better_patch: 0 => 1
Comment:
Pending
[https://github.com/django/django/pull/15926#issuecomment-1211611445 the
design decision].
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:16>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:17>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:18>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:18>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:19>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:20>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"fc220d27c624ba5e78988d0545bb241e2c0a8c22" fc220d27]:
{{{
#!CommitTicketReference repository=""
revision="fc220d27c624ba5e78988d0545bb241e2c0a8c22"
Refs #24179 -- Added extra JS tests for admin vertical/horizontal filters.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:21>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"be63c78760924e1335603c36babd0ad6cfaea3c4" be63c787]:
{{{
#!CommitTicketReference repository=""
revision="be63c78760924e1335603c36babd0ad6cfaea3c4"
Fixed #24179 -- Added filtering to selected side of vertical/horizontal
filters.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:22>
Comment (by GitHub <noreply@…>):
In [changeset:"a2e580acf62a3de4f9108cc1af061a02b94b1064" a2e580ac]:
{{{
#!CommitTicketReference repository=""
revision="a2e580acf62a3de4f9108cc1af061a02b94b1064"
Refs #24179 -- Fixed selenium tests for offset of admin selector boxes in
fieldset.
Regression in be63c78760924e1335603c36babd0ad6cfaea3c4.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24179#comment:23>