Natural Language Sync Widget#256
Open
tharropoulos wants to merge 7 commits into
Open
Conversation
- implement `connectNaturalLanguageSync` connector for handling natural language ui state synchronization - add `naturalLanguageSync` widget for automatic natural language search integration - create tokenizer and parser for typesense filter expressions - map parsed filters to instantsearch ui state (refinementlist, numericmenu, sortby) - export widgets from main adapter for easy access - add test suite covering filter parsing, widget integration, and edge cases - include testground example with natural language search demo
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.
TLDR
Adds natural language search widget for automatic UI state synchronization and proper module exports for widgets.
Change summary
Added Features:
New Widget in
src/widgets/naturalLanguageSync.js:connectNaturalLanguageSync(): Connector function that handles natural language UI state synchronization logicnaturalLanguageSync(): Headless widget that automatically applies natural language search results to InstantSearch UI stateWidget Export System:
widgets.js: Main export file for all widgets at package rootsrc/widgets/index.js: Internal widget aggregation filesrc/TypesenseInstantsearchAdapter.jsto re-export widgets for easy accessCode Changes:
In
package.json:/widgetsentry pointwidgets.jsandwidgets.d.ts^2.1.0-8to^2.1.0-13In
src/widgets/index.d.ts:NaturalLanguageUiState,NaturalLanguageSearchResults, and widget parameter typesTest Coverage:
test/natural_language_search.test.js:Documentation and Examples:
In
test/support/testground/natural_language_search.html:In
test/support/testground/src/natural_language_search.js:Build System Updates:
test/support/testground/package.json:The natural language search widget automatically detects when search results contain parsed natural language data and applies the corresponding UI state changes to InstantSearch widgets without requiring manual intervention from developers.