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

Data views: Advanced filtering #64898

Open
jameskoster opened this issue Aug 29, 2024 · 2 comments
Open

Data views: Advanced filtering #64898

jameskoster opened this issue Aug 29, 2024 · 2 comments
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

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:

Category is: category X, and any of: category Y, category Z, or Tag is: Tag X, and Tag is not: Tax Y, Tag Z.

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:

Screenshot 2024-08-29 at 11 15 52
@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Aug 29, 2024
@verofasulo
Copy link

@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.mp4

Here'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

@jameskoster
Copy link
Contributor Author

To me it seems fine for DataViews consumers to utilise any combination of filters types. The add filter button should adapt accordingly:

  • Only simple filters (already shipping).
  • Only advanced filters: Clicking the filter button could add the filter and open the configuration dialog (similar to your mockup).
  • A combo of both: Append 'Advanced filter' to the list of options in the add filter menu (similar to Notion). Selecting 'Advanced filter' would add the filter and open the configuration dialog.

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:

  • The design may need to vary per filter type.
  • We'd need to work out the semantics of including a menu in filter configuration dialogs.

It's probably a detail to explore in a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants