Commit 253e1ed
feat(page-filters): Use fzf for project search in ProjectPageFilter (#108725)
Use fzf for project search in ProjectPageFilter
The project dropdown previously used a simple case-insensitive substring
match
on the project slug. This replaces it with the fzf v1 algorithm (already
present
in the codebase at `sentry/utils/profiling/fzf/fzf`) via the
`searchMatcher` prop
introduced in the base branch.
With fzf, users can find projects using fuzzy/subsequence queries — e.g.
typing
`frd` will match `frontend` — and results are ranked by match quality so
the most
relevant projects float to the top.
The matcher is defined as a module-level function (no `useCallback`
needed) since
it has no dependency on component state or props.
Stacked on top of:
master...jb/compactselect/search-result
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6d2925e commit 253e1ed
File tree
2 files changed
+63
-1
lines changed- static/app/components
- core/compactSelect
- pageFilters/project
2 files changed
+63
-1
lines changedLines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
752 | 794 | | |
753 | 795 | | |
754 | 796 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| |||
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
79 | 98 | | |
80 | 99 | | |
81 | 100 | | |
| |||
431 | 450 | | |
432 | 451 | | |
433 | 452 | | |
| 453 | + | |
434 | 454 | | |
435 | 455 | | |
436 | 456 | | |
| |||
0 commit comments