Add Property Filter To Entities Visualizer#8786
Open
yusufkinatas wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
🤖 Augment PR SummarySummary: This PR adds per-property value filtering to the Entities Visualizer so users can narrow the table by property values (e.g. numeric comparisons, string matching, boolean/existence checks). Changes:
Technical Notes: Property filter clauses are ANDed with existing web/type/archived filters, and operator/value input is debounced to reduce refetch churn while typing. 🤖 Was this summary useful? React with 👍 or 👎 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🌟 What is the purpose of this PR?
Follow-up for #8783 based on the task
Adds per-property value filtering to the Entities Visualizer. Previously the ribbon only supported filtering by web, type, and archived status; you could narrow the table by which entities were shown but not by the values of their properties.
This lets a user filter the table on the properties they can see — e.g.
Age > 13,Name contains "Acme",Active is true, orEmail has any value— by adding property-filter "pills" to the existing filter ribbon. Each pill picks a property, an operator appropriate to the property's value kind, and (where relevant) a value; the resulting clauses are ANDed with the existing web / type / archived filters and pushed down into the graph query.🔗 Related links
🚫 Blocked by
🔍 What does this change?
Filter model & query building
EntitiesFilterStatewith apropertyFiltersarray (data/types.ts).data/property-filters/types.tsdefiningPropertyFilter, thePropertyFilterOperatorset, theFilterValueKind(number/string/boolean), and theFilterablePropertyshape (filterable, or disabled-with-reason).buildPropertyFilterClause(data/property-filters/build-property-filter-clause.ts) translates a single filter into a graphFilterclause as a pure, unit-testable function. It owns parameter typing (numbers coerced to JS numbers so comparisons are numeric, strings kept untrimmed for case-sensitive matching) and theexists/not existscomposition. An incomplete or invalid filter yieldsnulland contributes no clause, so an unfinished pill is inert rather than matching nothing.buildEntitiesFilternow folds these clauses into the query.deriveFilterableProperties(data/property-filters/derive-filterable-properties.ts) derives the pickable properties from the same closed-entity-type / definitions data that builds the visible columns ("filter on the columns you see"). Properties that can't be filtered in v1 (lists, nested objects, multiple data types, unsupported kinds) are either omitted or surfaced disabled with a reason. The filterable interpretation wins when a base URL appears in multiple shapes across types.get-operators-for-kind.tscatalogs the operators available per value kind, their dropdown labels, pill connectors, and whether they require a value, with a sensible default operator per kind.UI
AddFiltersMenugains a "Property…" entry that opens an in-menuPropertyFilterPicker(searchable list of filterable properties, disabled rows with explanatory tooltips).PropertyFilterPillrenders each property filter in the ribbon with a kind icon, operator/value editor popover (operator changes apply immediately; value input is debounced before hitting shared state to avoid refetching on every keystroke), an active/incomplete visual state, and removal.FilterRibbonwires up add/change/remove handlers, auto-opens the editor for a just-added pill, wraps to multiple lines, and includes property filters in the "filters are default" / clear-all logic.incompletePillSxadded for the muted placeholder look of pills that don't yet contribute a clause.Data-type pool robustness (supporting change)
EntitiesTableDatanow bundles thedataTypeDefinitionspool alongside the rows it was generated from, unioned across paginated pages. This guarantees a row's value can always resolve its data type and fixesformatValuethrowing when a refetch narrowed the result set (e.g. a property filter matching nothing) before rows were regenerated.EntitiesTableno longer takesdefinitionsdirectly and reads the pool from the table data.getReferencedDataTypeIds(format-value.ts) is exposed so the table can cheaply check that every data type a value depends on is present before rendering, falling back to a "Not Found" cell instead of crashing the grid.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
number,string, andbooleanproperties. List, nested, and multiple-data-type properties are listed in the picker but disabled with an explanatory tooltip.equals/contains/startsWith/endsWith) is case-sensitive.🐾 Next steps
🛡 What tests cover this?
❓ How to test this?
📹 Demo
Screenshare.-.2026-05-29.2_10_00.PM.mp4