Global search: Indexer#370
Conversation
97384aa to
b9318e2
Compare
There was a problem hiding this comment.
This is just a DevTool that will get removed again once we have filters and the result list in place.
cbdef65 to
b336c7f
Compare
b336c7f to
0544ff9
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a global search indexer for a Framer plugin that builds a searchable index of WebPageNodes, ComponentNodes, and Collection items. The indexer crawls through nodes, extracts relevant content (text, names, fields), and provides a foundation for search functionality.
- Implements
GlobalSearchIndexerclass with event-driven architecture for indexing Framer nodes and collections - Creates React context and provider components to manage indexer state and integration
- Adds developer tools interface to inspect indexed entries and debug the indexing process
Reviewed Changes
Copilot reviewed 15 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
plugins/global-search/src/utils/indexer/indexer.ts |
Core indexer implementation with node crawling and batch processing |
plugins/global-search/src/utils/indexer/IndexerProvider.tsx |
React provider for indexer state management |
plugins/global-search/src/utils/indexer/types.ts |
Type definitions for index entries and node filtering |
plugins/global-search/src/components/DevToolsScene.tsx |
Developer tools interface for inspecting indexed data |
plugins/global-search/src/utils/indexer/strip-markup.ts |
Utility function to remove HTML markup from text |
plugins/global-search/src/App.tsx |
Main app component updated to use indexer and dev tools |
plugins/global-search/package.json |
Dependencies updated to React 18 and added error boundary support |
0544ff9 to
dfc1427
Compare
niekert
left a comment
There was a problem hiding this comment.
Overall LGTM just a few nits and questions
| ) | ||
|
|
||
| return ( | ||
| <div className="flex flex-col h-full"> |
There was a problem hiding this comment.
I'm not investing time into this for now, as it stays only for a matter of days...
| if (isWebPageNode(value)) return true | ||
| if (isComponentNode(value)) return true | ||
|
|
||
| return false |
There was a problem hiding this comment.
nit: kinda feel like it would be nice to somehow make this exhaustive so we get notified when we add support for new node types while upgrading the plugin version
There was a problem hiding this comment.
will do that and make the types as narrow as they need to be once the results are visible and it's easier to rule out additional, no needed data as well
f029f04 to
12cc32c
Compare
12cc32c to
815e0ea
Compare


Description
This introduces the indexer. In order for the search to function, a
filtererwill follow after this. This is the good old Map/Reduce.WebPageNodes andComponentNodes. For the nodes it indexes, see theIndexedNodetype.Testing
CollectionItemand the fields asTextNodewhen they exist on a page)