Closed (fixed)
Project:
Facets
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2015 at 12:50 UTC
Updated:
21 Mar 2016 at 10:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
borisson_Hi @StryKaizer,
I implemented this for the links widget.
Current HEAD behavior:

With patch:

Comment #3
nick_vhIs this enabled by default? I like this behavior but by no means should it be default. From my experience (not scientific) most sites allow multiple facets to be selected when they are links.
Comment #4
borisson_Disabled by default in the patch.
Comment #5
borisson_Needed a reroll and some extra changes.
Comment #6
strykaizerThe behaviour in D7 Facetapi is slightly different.
Links do not disappear but instead allow you to switch to another item (So more similar to Radio button-behaviour). I'm in favour of keeping this feature in par with D7.
D7 demo:

Comment #7
strykaizerComment #8
borisson_Does this mean we should postpone on #2625186: Support and/or for facets?
Comment #9
strykaizerThat was my idea too, so, yes? :)
Comment #10
borisson_postponing this on that.
Comment #11
leksat commentedI think we'll need this for #2636328: Widget dropdown - select.
But... Does D7 version work correctly? On #6 gif:
- when nothing is selected, "st" shows 15 results
- when "dr" is selected, "st" shows 9 results
- when then "st" is clicked, "dr" is unselected, and we have 15 results
I think, one-active-item mode should run a separate query if a facet is active, to see how many results we'll have if the active item will be unselected.
Also, I guess that one-active-item mode should be always enabled for the dropdown widget.
Comment #12
borisson_I think this is needed for the dropdown issue, yeah.
Unpostponing this issue because the dependency got in a while ago.
Comment #13
leksat commentedMade on the base of #5.
The show_only_one_result mode works well only with OR logic. Should we implement some form validation that prevents AND logic with show_only_one_result? Or it's up to user?
Comment #14
borisson_I think that form validation makes sense and implementing that is a good idea. This will also need an extra testcase in the integration test.
Comment #15
borisson_Added an integration test.
Comment #16
borisson_I fixed a small code style thing on commit and pushed this.