-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Data views: Advanced filtering #64898
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
Comments
@jameskoster, thank you so much for kicking this off! I tested it in Woo Analytics using advanced filters only. Combining simple and advanced filters ended up feeling a bit clunky and introduced conflicts, requiring extra work to transition simple filters into advanced ones (as per Notion approach). Single.report.-.Advanced.filtering.mp4Here's a video showing how Notion allows users to transition from simple filters to advanced ones. Is it something we're thinking of? Notion.approach.mp4 |
To me it seems fine for DataViews consumers to utilise any combination of filters types. The add filter button should adapt accordingly:
In your case you'd omit any simple filters to streamline the workflow. What do you think? Transforming/adding a simple filter to the advanced filter is a nice flow, but I suspect it could be a lot of extra work:
It's probably a detail to explore in a separate issue. |
Looking at adopting DataViews as we’ve already built similar that is a bit further along but no point in diverging from core more. That said I’ve got a lot to potentially contribute. First being I’ve long been building conditional Boolean systems and UX for over a decade in our plugins. We have ready to go RuleEngine components that could be ported much easier than creating this from scratch. Check it out in Content Control plugin (https://github.com/code-atlantic/content/control/ under packages/rule-engine) Ours already is built out in full Typescript and supports
Also been tested in the wild on tens of thousands of installs of not hundreds of thousands. Also have matching JS and PHP OOP handlers for processing said rules depending on where it needs to take place. |
The current filtering capabilities in data views are powerful, but there are some restrictive details. For instance you cannot combine filters of the same type, and there's no way to modify the operator between filters.
In other words you could not filter the Posts data view to show posts where:
How might we extend the filter UX to cater to such options?
One idea would be to provide an "Advanced filter" option in the Add filter menu. It would add a filter chip like any other, but the configuration popover would be more comprehensive. Here's a very rough mockup to demonstrate the idea:
The text was updated successfully, but these errors were encountered: