Opened 9 years ago

Closed 19 months ago

Last modified 19 months ago

#24179 closed New feature (fixed)

FilteredSelectMultiple widget - add filter field to the right column.

Reported by: gdmka Owned by: Gav O'Connor
Component: contrib.admin Version: dev
Severity: Normal Keywords: FilteredSelectMultiple, filter_horizontal, UI
Cc: gdmka Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
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 (23)

comment:1 by gdmka, 9 years ago

Description: modified (diff)

comment:2 by gdmka, 9 years ago

Cc: gdmka added
Easy pickings: set

comment:3 by Tim Graham, 9 years ago

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 by gdmka, 9 years ago

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 9 years ago by gdmka (previous) (diff)

comment:5 by gdmka, 9 years ago

Owner: changed from nobody to gdmka
Status: newassigned

in reply to:  4 comment:6 by Simon Charette, 9 years ago

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 by Tim Graham, 9 years ago

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

comment:8 by Anton Samarchyan, 7 years ago

Owner: changed from gdmka to Anton Samarchyan

comment:9 by Anton Samarchyan, 7 years ago

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 by Tim Graham, 7 years ago

Patch needs improvement: set

comment:11 by Mariusz Felisiak, 2 years ago

Owner: Anton Samarchyan removed
Status: assignednew

comment:12 by Gav O'Connor, 20 months ago

Owner: set to Gav O'Connor
Status: newassigned

comment:13 by Gav O'Connor, 20 months ago

Patch needs improvement: unset

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.

PR

comment:14 by Carlton Gibson, 20 months ago

Needs tests: set

comment:15 by Gav O'Connor, 20 months ago

Needs tests: unset

comment:16 by Mariusz Felisiak, 20 months ago

Patch needs improvement: set

comment:17 by Gav O'Connor, 19 months ago

Patch needs improvement: unset

comment:18 by Mariusz Felisiak, 19 months ago

Patch needs improvement: set

comment:19 by Gav O'Connor, 19 months ago

Patch needs improvement: unset

comment:20 by Mariusz Felisiak, 19 months ago

Triage Stage: AcceptedReady for checkin

comment:21 by Carlton Gibson <carlton.gibson@…>, 19 months ago

In fc220d27:

Refs #24179 -- Added extra JS tests for admin vertical/horizontal filters.

comment:22 by Carlton Gibson <carlton.gibson@…>, 19 months ago

Resolution: fixed
Status: assignedclosed

In be63c787:

Fixed #24179 -- Added filtering to selected side of vertical/horizontal filters.

comment:23 by GitHub <noreply@…>, 19 months ago

In a2e580ac:

Refs #24179 -- Fixed selenium tests for offset of admin selector boxes in fieldset.

Regression in be63c78760924e1335603c36babd0ad6cfaea3c4.

Note: See TracTickets for help on using tickets.
Back to Top