Problem/Motivation

Add integration with Better Exposed Filters so we can use Tagify widgets in views exposed filters.

Proposed resolution

Provide a BetterExposedFiltersFilterWidget implementation similar to the one select2 provides. It should handle both multiple select elements and autocomplete widgets such as the Name (autocomplete) views filter.

Issue fork tagify-3352185

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DieterHolvoet created an issue. See original summary.

anybody’s picture

That would be suuuper awesome! +1 for this suggestion!

gxleano made their first commit to this issue’s fork.

gxleano’s picture

Version: 1.0.x-dev » 1.1.x-dev
gxleano’s picture

Version: 1.1.x-dev » 1.2.x-dev
gxleano’s picture

Assigned: Unassigned » gxleano

gxleano’s picture

Assigned: gxleano » Unassigned
Status: Active » Needs review
gxleano’s picture

dieterholvoet’s picture

Status: Needs review » Needs work
StatusFileSize
new23.5 KB

Doesn't seem to work yet, the autocomplete endpoint returns a HTTP 403 response. Diving into the controller code, I noticed $selection_settings is FALSE, causing this code to be triggered:

// Disallow access when the selection settings key is not found in the
// key/value store.
throw new AccessDeniedHttpException();

Something else: it would look better if these widgets would be the same height as other form fields, but that might be a Gin specific issue (not tested using Claro).

Screenshot

gxleano’s picture

StatusFileSize
new37.46 KB
new50.44 KB

@DieterHolvoet Thanks for the review!

I've added a quick change to fix the issue with the height in the Tagify element.

But, the rest of the implementation works fine for me. Could you provide more info from your end? Which entity are you using in the problematic elements? Node, Taxonomy term, User...?

Tested on Drupal 10.1.6 with taxonomy term and node entity references.

Claro
Tagify BEF Claro

Gin Theme
Tagify BEF Gin

Also works with Olivero.

gxleano’s picture

gxleano’s picture

Status: Needs work » Needs review
gxleano’s picture

StatusFileSize
new172.7 KB
new250.64 KB
dieterholvoet’s picture

You're right, it does work for taxonomy autocomplete filters. I forgot only taxonomy autocomplete filters are currently supported by core, I'm using a patch from #3347343: Add Views EntityReference filter to support better UX for exposed filters to support other entity types as well. It didn't work in combination with that patch, but I found a fix and pushed it to the fork. One minor issue I noticed: it's not possible anymore to submit the filter form by pressing enter.

gxleano’s picture

Status: Needs review » Reviewed & tested by the community
gxleano’s picture

Issue tags: +release1.2.2

  • gxleano committed a917a3bb on 1.2.x
    Resolve #3352185 "Add better exposed"
    
gxleano’s picture

Status: Reviewed & tested by the community » Fixed
gxleano’s picture

Status: Fixed » Closed (fixed)
dieterholvoet’s picture

Thank you for working on this!

ec-adam’s picture

I've recently installed Tagify on both Drupal 11 and its running on the latest version of Drupal CMS (different install). It works great on the admin side except its a little inconsistent for me to be able to have awesome tagify select lists on entities where I can control the form display but not on selects lists like the /admin/content content type filter.

I've been trying to use Tagify with Better Exposed Filters to get Tagify to work on the /admin/content filter (as well as select views filters on the front-end). There is a fatal error when using the BEF Tagify option on filters configured to be select lists. Works just fine on filters set to be autocomplete.

When using Tagify on entity form display select fields there is a specific Tagify Select option to use. Can that option be added to the BEF integration so Tagify can work on views filter select lists?