-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(project-tree): search for product & project trees #32297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ropdown for only project/recent
Size Change: -3.19 kB (-0.09%) Total Size: 3.65 MB
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR enhances search functionality across product and project trees, adding search capability to the product tree and improving path-based searches to handle slashes correctly.
- Added
searchResults
selector infrontend/src/layout/panel-layout/ProductTree/productTreeLogic.tsx
to enable product tree searching - Modified
_apply_search_to_queryset
inposthog/api/file_system.py
to split path tokens on '/' for better path-based searching - Moved tree-specific logic from
projectTreeLogic
into separateproductTreeLogic
andgameTreeLogic
for better code organization - Added conditional rendering in
ProductTree.tsx
to switch betweensearchResults
andproductTreeItems
based on search term - Relocated
treeItemsCombined
fromprojectTreeLogic
toshortcutsLogic
for improved separation of concerns
9 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
values: [featureFlagLogic, ['featureFlags'], projectTreeLogic, ['folderStates', 'users']], | ||
actions: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: No actions defined but connected to projectTreeLogic - consider if any actions need to be shared between trees
(s) => [s.searchTerm, s.productTreeItems], | ||
(searchTerm, productTreeItems): TreeDataItem[] => { | ||
return productTreeItems.filter((item) => item.name.toLowerCase().includes(searchTerm.toLowerCase())) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Search implementation doesn't handle the slash-separated search terms mentioned in the PR description. Consider splitting searchTerm on '/' and matching each part independently to match the PR's stated goals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this code is for Products not Project (which is described in PR)
[waiting for this PR to merge, so i can rebase and clear stacked commits]
Problem
go/revenue
(searchinggo revenue
revenue go
worked though)ProductTree
problem: searching products

problem: Searching

go/revenue
Changes
/
and searches for each part (regardless of order)ProductTree
changes: searching products

changes: Searching

go/revenue
How did you test this code?
Manually