-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataViews: update field API to generate filters based on type #55996
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oandregal
added
[Type] Feature
New feature to highlight in changelogs.
[Feature] DataViews
Work surrounding upgrading and evolving views in the site editor and beyond
labels
Nov 9, 2023
Size Change: -45 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
youknowriad
approved these changes
Nov 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with this. I think I still have some uncertainties which we will only clear when introduce the field types formally.
oandregal
added
[Type] Experimental
Experimental feature or API.
and removed
[Type] Feature
New feature to highlight in changelogs.
labels
Nov 17, 2023
oandregal
force-pushed
the
update/add-field-type-to-filter
branch
from
November 17, 2023 11:48
f5fc648
to
8ed8ff8
Compare
I had to rebase from |
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] Experimental
Experimental feature or API.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #55083
Related #55917 (comment)
What?
This PR updates the field API to generate the filters based on the field
type
– and it removes the existingfilters
prop.Why
Follow-up on conversations about filters. This is what I see:
type: enumeration
. By default, we may offerIN
andNOT_IN
operators but some fields may want to disable support forNOT_IN
. In the current design, disabling one of the operators would mean the UI won't show the "settings" submenu:type: date
. By default, we may offerBEFORE
,AFTER
, andPRESET_RANGE
("today", "this week", "last month", etc.) operators. See conversation). Some fields may not support all of that, or may want different preset ranges available ("this hour", "last hour", "today" instead of "last mont", "last year"), depending on the frequency of the data. Not design for this, but the same rationale could apply here.How
So far, providing the field
type
is enough.However, we need to plan to configure the filters in upcoming PRs (adding
NOT_IN
operator, addingDATE
filter, etc.). This is how it could work (this is not to implement in this PR, but I wanted to share the direction):Testing Instructions