Opened 3 years ago

Last modified 9 months ago

#24179 new New feature

FilteredSelectMultiple widget - add filter field to the right column.

Reported by: gdmka Owned by:
Component: contrib.admin Version: master
Severity: Normal Keywords: FilteredSelectMultiple, filter_horizontal, UI
Cc: gdmka Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: yes

Description (last modified by gdmka)

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.

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?

Change History (11)

comment:1 Changed 3 years ago by gdmka

Description: modified (diff)

comment:2 Changed 3 years ago by gdmka

Cc: gdmka added
Easy pickings: set

comment:3 Changed 3 years ago by Tim Graham

Easy pickings: unset

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?

comment:4 Changed 3 years ago 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 (hidden) back to the "available" column. The rest of the logic: eg doubleclick on filtered results, stays the same.

Last edited 3 years ago by gdmka (previous) (diff)

comment:5 Changed 3 years ago by gdmka

Owner: changed from nobody to gdmka
Status: newassigned

comment:6 in reply to:  4 Changed 3 years ago by Simon Charette

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

comment:7 Changed 3 years ago by Tim Graham

Component: Formscontrib.admin
Triage Stage: UnreviewedAccepted
Version: 1.7master

comment:8 Changed 9 months ago by Anton Samarchyan

Owner: changed from gdmka to Anton Samarchyan

comment:9 Changed 9 months ago by Anton Samarchyan

Has patch: set

I have submitted a 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.

comment:10 Changed 9 months ago by Tim Graham

Patch needs improvement: set

comment:11 Changed 9 months ago by Anton Samarchyan

Owner: Anton Samarchyan deleted
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top