Skip to content

Add customizable AST-based search patterns to DataProvider and entity search components - #176

Draft
AlexeyMz wants to merge 9 commits into
masterfrom
lookup-patterns
Draft

AlexeyMz wants to merge 9 commits into
masterfrom
lookup-patterns

Conversation

@AlexeyMz

@AlexeyMz AlexeyMz commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

TODO:

  • Change link direction selector to a button group
  • Add JSDoc to newly exported types, components and functions
  • Add tests for SparqlDataProvider.lookup() and RdfDataProvider.lookup()
  • Add CHANGELOG description
  • Add custom search criteria (entities from SPARQL query) example (in the follow-up)

…ty search components:

`DataProvider` changes:
* Support AST-based `LookupPattern` via `SparqlDataProvider.lookup()`;
* Add `lookupElementTypes()`, `lookupPropertyTypes()` and `lookupLinkTypes()` methods to `DataProvider`;
* Refactor `SparqlDataProvider` query generation into separate module `SparqlGenerator`;
* Always compute counts for implicit element/link/property types in `RdfDataProvider`;

`InstancesSearch`/`SearchSectionEntities` changes:
* Add `SearchPattern` (separate from `LookupPattern`) to allow customizable search pattern dispaly and editors;
* Add built-in search criterion options: `SearchCriterionAllOf`, `SearchCriterionAnyOf`, `SearchCriterionHasType`
  `SearchCriterionConnectedTo`, `SearchCriterionFromValues`, `SearchCriterionHasProperty`;
* Add utility 'building blocks" for custom search criterions: `SearchCriterionBlock`,
  `SearchCriterionWhereGroup`, `SearchCriterionWhere`;

Utility changes:
* Use `@floating-ui/react-dom` for properly placed dropdown floating panels;
* Add base `Autocomplete` component based on `Dropdown` and `SearchInput`;
* Refactor `SearchInput` and its usages to have proper slots to display additional components inside;
* Add `EntitySelect` component based on `Autocomplete` to lookup one or multiple entities by label;
* Add `SchemaTypeSelect` component with default suggestions for select element/property/link types;
* Extract `SchemaTypeView` from class tree to display an element/property/link type;
* Add `ErrorMessage` component to display a formatted error message from an exception when possible;
* Add block display mode to `InlineEntity`;
* Add `useCombinedRef()`, extract `useFetchStatus()` hook;
* Clarify `useAsync()` behavior on `undefined` return value from `load` callback;
@AlexeyMz
AlexeyMz force-pushed the lookup-patterns branch 2 times, most recently from b26ddc8 to cb0cd3c Compare November 9, 2026 23:13
@AlexeyMz
AlexeyMz force-pushed the lookup-patterns branch 2 times, most recently from 6c7f969 to db095e1 Compare November 14, 2026 23:03
…`links()` and `lookup()` in `RdfDataProvider`
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.

1 participant