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

Add search item tooltip #2523

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

chrjorgensen
Copy link
Collaborator

Changes

This PR will add tooltips to the items in the search result view:

Members:
billede

Streamfiles:
billede

Streamfiles - find:
billede

Included in the PR is a fix for invalid dates from the getMemberInfo and getMultipleMemberInfo functions...

How to test this PR

Examples:

  1. Run the test cases
  2. Search for some text in members and streamfile and check for tooltips in the result view.
  3. Find some streamfiles and check for tooltips in the result view.

Checklist

  • have tested my change

@worksofliam
Copy link
Contributor

@chrjorgensen any chance you can fix that conflict?

@worksofliam worksofliam self-requested a review February 19, 2025 18:16
@chrjorgensen chrjorgensen temporarily deployed to testing_environment February 19, 2025 19:14 — with GitHub Actions Inactive
@chrjorgensen
Copy link
Collaborator Author

@worksofliam Done - had to eat first... 😉

@chrjorgensen chrjorgensen self-assigned this Feb 19, 2025
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

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

The change makes sense, but we are going to need test cases for this branch new method. Those belong in content.test.ts.

* @param path
* @return IFSFile
*/
async getFileInfo(path: string): Promise<IFSFile> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we are going to need some new test cases for this method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will add some test cases...

@@ -110,9 +110,13 @@ export namespace Search {
});

if (grepRes.code == 0) {
const hits = parseGrepOutput(grepRes.stdout);
for (var i = 0; i < hits.length; i++) {
hits[i].file = await connection.content.getFileInfo(hits[i].path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this been testing with a large hits array length? I wonder if getFileInfo might be nicely suited to accept an array as parameter and then call stat with multiple paths? Is that possible?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It has not been tested, but both stat and ls supports multiple filenames, so I will change the function to accept an array of filenames and return an array of files info.

@worksofliam
Copy link
Contributor

@chrjorgensen Please update this branch with the changes from master, but make sure your fix to GetMbrInfo remains. Thanks!

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