Skip to content

feat(site): add search + filter tabs for template builder modules#26674

Open
aqandrew wants to merge 7 commits into
mainfrom
aqandrew/devex-491-module-filteringgrouping
Open

feat(site): add search + filter tabs for template builder modules#26674
aqandrew wants to merge 7 commits into
mainfrom
aqandrew/devex-491-module-filteringgrouping

Conversation

@aqandrew

Copy link
Copy Markdown
Contributor

ref DEVEX-491

Adds a useFuzzySearch hook based on the logic in IconsPage.tsx, and Storybook stories for ModuleSelectStep to verify filter tab count behavior.

c16e0d9 and b6ee218 co-written with Claude Code

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

DEVEX-491

@@ -0,0 +1,51 @@
import { useMemo } from "react";
import uFuzzy from "ufuzzy";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BIG TIL!

}, [allItems, query, searchProperties]);

return searchedItems;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably good to move this hook to the TemplateBuilder/ package since we are the only consumer right now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the hook is based on IconsPage,

const [map, info, sorted] = fuzzyFinder.search(

I was thinking of replacing IconsPage's fuzzy search logic with this hook. But that would require extending the hook to handle highlighting logic with mark elements, so that should probably be a separate PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, out of scope for this PR for sure, but that's a great idea!

@jeremyruppel jeremyruppel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one! just the nit about relocating the hook but then this is good to ship!

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.

2 participants