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

Implement folder specific search for datasets #6677

Merged
merged 32 commits into from
Dec 8, 2022

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Dec 2, 2022

  • folder-specific search with optional recursion
  • folder path displayed as tag

image
image

URL of deployed dev instance (used for testing):

Steps to test:

  • create some folders to have a folder hierarchy
  • move some datasets
  • use the global search to find a dataset
  • customize the search to only search a specific folder and check that the search-subfolders option works
  • check that the paths next to the dataset names look good
  • switching to another folder while the search is active should change the folder that is searched (earlier versions cleared the search instead)
  • if the global search is enabled, there shouldn't be an active folder. activating a folder in that case, should switch automatically to the folder-specific search.
  • when going from global search to folder-specific search, the most recently active folder should be activated again (the same goes for clearing the search box)

Issues:


(Please delete unneeded items, merge only when none are left open)

@philippotto philippotto self-assigned this Dec 2, 2022
@philippotto philippotto changed the title [WIP] Implement folder specific search for datasets Implement folder specific search for datasets Dec 5, 2022
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Cool stuff :) I added some suggestions, only concerning code style in the backend.

app/controllers/DataSetController.scala Show resolved Hide resolved
app/models/binary/DataSet.scala Outdated Show resolved Hide resolved
app/models/binary/DataSet.scala Outdated Show resolved Hide resolved
Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

Works beautifully! Not much to add from my side :)

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

Great improvements! 🥇 I'll test once the CI is ready.

frontend/javascripts/dashboard/folders/folder_tree.tsx Outdated Show resolved Hide resolved
frontend/javascripts/libs/react_hooks.ts Outdated Show resolved Hide resolved
@daniel-wer
Copy link
Member

daniel-wer commented Dec 7, 2022

Currently, the deployed dev branch fails to render with TypeError: Cannot read properties of undefined (reading 'key') at folder_tree.tsx:64:87. I think there needs to be a check whether treeData is empty.

Edit: Ironically, this is the line I commented with "Great 👍" 😅

@philippotto
Copy link
Member Author

Currently, the deployed dev branch fails to render with TypeError: Cannot read properties of undefined (reading 'key') at folder_tree.tsx:64:87. I think there needs to be a check whether treeData is empty.

Fixed now :)

Edit: Ironically, this is the line I commented with "Great +1" sweat_smile

🤣 I relied too much on TS and didn't test the last code change obviously.

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

It's a pleasure to use this feature, especially with the newest improvements! 👍

@philippotto philippotto enabled auto-merge (squash) December 8, 2022 14:05
@philippotto philippotto merged commit e027579 into master Dec 8, 2022
@philippotto philippotto deleted the folder-specific-search branch December 8, 2022 14:24
hotzenklotz added a commit that referenced this pull request Dec 12, 2022
…cing

* 'master' of github.com:scalableminds/webknossos:
  fixes infinite loop in getLineCount (#6689)
  Catch Malformed Json Exceptions (#6691)
  Implement folder-specific search for datasets (#6677)
  Fix s3fs region access, s3 url styles (#6679)
  Swagger annotation for shortLinkByKey (#6682)
  Improve layout of dashboard
  Provide valid JSON schema (#6642)
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.

3 participants