Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Facet by meta #2683

Closed
wants to merge 2 commits into from
Closed

[WIP] Facet by meta #2683

wants to merge 2 commits into from

Conversation

felipeelia
Copy link
Member

Description of the Change

This PR adds support for meta fields in the Facet widget.

This is currently a Work In Progress and should not be merged.

Related to #1440 (it does not close the issue because the range implementation should be done in another PR)

Changelog Entry

Added: Support for meta fields in Facet widgets.

Credits

Props @felipeelia

@felipeelia felipeelia added this to the 4.1.0 milestone Mar 27, 2022
@felipeelia felipeelia self-assigned this Mar 27, 2022
@felipeelia felipeelia modified the milestones: 4.1.0, 4.2.0 Mar 28, 2022
@felipeelia felipeelia modified the milestones: 4.2.0, 4.3.0 May 3, 2022
@Zyles
Copy link

Zyles commented May 12, 2022

I tried this update with Woocommerce and there are some weird results.

A boolean ACF field creates a facet like this:

image

Where I would rather it be a checkbox like:
[ ] Meta field name

It also did not work clicking on any of the boxes. They just added # to the URL.

Second test was a text field ACF type. It did spit out the options. But one value was null (no text), none were clickable and just added # to URL.

The choices were also not conditional in that if I go into a category with a product that does not have any of these values, the facet would still show. If there are no options matching the current query the options should be hidden.

The last test was a select field type. Only 4 names were shown even if the choices are over 100. And the first choice was null. It also had the same problem if I went into a category with no products using this meta at all, they would still show up in the widget.

Maybe make the meta facet widget into its own widget instead of using the current widget? When checking meta in the widget all the other options are not used and could just cause confusion.

The meta widget could use more options such as selecting if the facet should be dropdown, checkboxes, have a search window etc. As seen in YITH Ajax Search:
image

I think some inspiration from this plugin could be good.

@felipeelia
Copy link
Member Author

@Zyles, thanks for giving this one a try but as the title says, it is still a Work In Progress. We are aware of the fact that its current status is far from being testable :)

@felipeelia
Copy link
Member Author

Closing this in favor of #2919.

@felipeelia felipeelia closed this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants