-
Notifications
You must be signed in to change notification settings - Fork 898
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
[Workspace]Support search dev tools by its category name #8920
[Workspace]Support search dev tools by its category name #8920
Conversation
Signed-off-by: Hailong Cui <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8920 +/- ##
==========================================
- Coverage 60.88% 60.87% -0.01%
==========================================
Files 3802 3802
Lines 91070 91072 +2
Branches 14374 14375 +1
==========================================
Hits 55444 55444
- Misses 32085 32086 +1
- Partials 3541 3542 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
.filter( | ||
(tool) => | ||
tool.title.toLowerCase().includes(query.toLowerCase()) || | ||
props.title.toLowerCase().includes(query.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.
Nit: Seems props.title.toLowerCase().includes(query.toLowerCase())
has nothing to do with the tools filter, would this look a bit more reasonable?
.filter( | |
(tool) => | |
tool.title.toLowerCase().includes(query.toLowerCase()) || | |
props.title.toLowerCase().includes(query.toLowerCase()) | |
) | |
const titleMatched = props.title.toLowerCase().includes(query.toLowerCase()) | |
const displayedTools = titleMatched ? tools : tools.filter((tool) => tool.title.toLowerCase().includes(query.toLowerCase())) | |
displayedTools.map(...) |
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.
thanks, it's more clear.
Signed-off-by: Hailong Cui <[email protected]>
* support search dev tools by category name Signed-off-by: Hailong Cui <[email protected]> * Changeset file for PR #8920 created/updated * address review comments Signed-off-by: Hailong Cui <[email protected]> --------- Signed-off-by: Hailong Cui <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 1c744d6) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Support search dev tools by category name
Issues Resolved
Screenshot
Testing the changes
yarn start --no-base-path
dev tools
it will match all sub apps under dev tool categoryChangelog
Check List
yarn test:jest
yarn test:jest_integration