Comments

StryKaizer created an issue. See original summary.

borisson_’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
4.29 KB
33.38 KB
40.23 KB

Hi @StryKaizer,

I implemented this for the links widget.

Current HEAD behavior:

With patch:

Nick_vh’s picture

Is 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.

borisson_’s picture

Disabled by default in the patch.

borisson_’s picture

FileSize
635 bytes
4.35 KB

Needed a reroll and some extra changes.

StryKaizer’s picture

Version: » 8.x-1.x-dev
FileSize
516.22 KB

The 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:

StryKaizer’s picture

Issue summary: View changes
FileSize
63.67 KB
borisson_’s picture

Status: Needs review » Needs work

Does this mean we should postpone on #2625186: Support and/or for facets?

StryKaizer’s picture

That was my idea too, so, yes? :)

borisson_’s picture

Status: Needs work » Postponed
Related issues: +#2625186: Support and/or for facets

postponing this on that.

Leksat’s picture

I 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.

borisson_’s picture

Status: Postponed » Needs work

I think this is needed for the dropdown issue, yeah.
Unpostponing this issue because the dependency got in a while ago.

Leksat’s picture

Status: Needs work » Needs review
FileSize
5.27 KB

Made 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?

borisson_’s picture

Status: Needs review » Needs work

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.

borisson_’s picture

Added an integration test.

borisson_’s picture

Status: Needs review » Fixed

I fixed a small code style thing on commit and pushed this.

  • borisson_ committed bf7f3be on 8.x-1.x
    Issue #2625188 by borisson_, Leksat, StryKaizer: Allow limiting to one...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.