Skip to content
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

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

Hailong-am
Copy link
Collaborator

Description

Support search dev tools by category name

image

Issues Resolved

Screenshot

Testing the changes

  1. enable workspace and new home page setting in your opensearch_dashboards.yml file
workspace.enabled: true
uiSettings:
  overrides:
    "home:useNewHomePage": true
  1. start OSD yarn start --no-base-path
  2. go to settings/data administration page or any workspace, search with dev tools it will match all sub apps under dev tool category

Changelog

  • feat: [workspace]support search dev tools by its category name

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.87%. Comparing base (539675e) to head (7ae96f2).
Report is 6 commits behind head on main.

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     
Flag Coverage Δ
Linux_1 29.02% <ø> (ø)
Linux_2 56.39% <ø> (ø)
Linux_3 37.90% <100.00%> (-0.01%) ⬇️
Linux_4 29.00% <ø> (ø)
Windows_1 29.03% <ø> (ø)
Windows_2 56.34% <ø> (ø)
Windows_3 37.90% <100.00%> (-0.01%) ⬇️
Windows_4 29.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 43 to 47
.filter(
(tool) =>
tool.title.toLowerCase().includes(query.toLowerCase()) ||
props.title.toLowerCase().includes(query.toLowerCase())
)
Copy link
Member

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?

Suggested change
.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(...)

Copy link
Collaborator Author

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 <ihailong@amazon.com>
@SuZhou-Joe SuZhou-Joe merged commit 1c744d6 into opensearch-project:main Nov 28, 2024
69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 28, 2024
* support search dev tools by category name

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* Changeset file for PR #8920 created/updated

* address review comments

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
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>
Hailong-am pushed a commit that referenced this pull request Nov 29, 2024
* support search dev tools by category name



* Changeset file for PR #8920 created/updated

* address review comments



---------



(cherry picked from commit 1c744d6)

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants