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 multi selection of datasets in folder tab #6683

Merged
merged 14 commits into from
Dec 13, 2022
Merged

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Dec 6, 2022

URL of deployed dev instance (used for testing):

Steps to test:

  • play around with selecting single datasets and multiple ones (by pressing CTRL)
  • test dragging datasets into another folder
  • the ctrl behavior is inspired by the way the gnome file explorer works
  • I tested the following cases:
Input state: none selected
	user action: click on A:
		output state: A is selected
			
	user action: ctrl click on A:
		output state: A is selected
			
	user action: drag on A:
		output state: A is selected
			
Input state: A selected
	user action: click on A
		output state: none is selected

	user action: ctrl click on A
		output state: none is selected

	user action: drag A
		output state: A is selected
		
	user action: click on B
		output state: B is selected
		
	user action: ctrl click on B
		output state: A + B is selected

	user action: drag B
		output state: B is selected
		
Input state: A + B selected
	user action: click on A
		output state: A is selected
		
	user action: ctrl click on A
		output state: B is selected

	user action: drag A
		output state: A + B is selected

	user action: click on C
		output state: should select C		

	user action: ctrl click on C
		output state: A, B, C are selected

	user action: drag C
		output state: C is selected
  • range select via shift is a bit simpler. I'm simply extending the current selection from the closest selected record. This differs from nautilus a bit, but only for special cases (e.g., there's already a range or scattered) and I think, this behaves quite intuitive for the most common cases.

Issues:


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

@philippotto philippotto self-assigned this Dec 6, 2022
@philippotto philippotto changed the base branch from master to folder-specific-search December 6, 2022 15:04
@philippotto
Copy link
Member Author

@daniel-wer If you can ignore 925a481 during review (e.g., by reviewing the commits before and after that commit separately), the diff should be easier to grasp 🙈

Base automatically changed from folder-specific-search to master December 8, 2022 14:24
@philippotto
Copy link
Member Author

@daniel-wer The branch is now merge-conflict free and also includes the range selection via shift+click. Feel free to review and test now :)

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.

Code LGTM, this will be very helpful to a lot of users!

Notes from my testing:

  • The shift + left click selection behaves weirdly inside a folder (even after a reload). See this gif:
    strange-shift-selection-in-folder
  • Selecting datasets with ctrl + left click rather often does not work. The same sometimes happens even without the ctrl modifier. I click into the large white space in the tags column. Ah, I think the culprit might be this overly large div in the tags column (that I seem to hit pretty accurately 😅):
    image
  • When selecting multiple datasets, the context menu is a little misleading as it only executes the action for the dataset that was right-clicked on, although one could expect it to be executed for all selected datasets (e.g. "Reload"). This is also what happens in my file explorer when having selected multiple files. Maybe the context menu should be disabled for the multi-selection case.

@philippotto
Copy link
Member Author

@daniel-wer Thank you for your testing feedback 🙏 I incorporated everything now. Please have another look :)

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 very well! 👍

I found one more minor issue which could be fixed:

  • When moving datasets into the same folder they already are in, the progress modal and success toast still appear. This should be ignored or one could show a warning toast. I'm leaning towards the warning toast to notify the user that the last action didn't make any sense and was probably unintended - but no hard opinion.

@philippotto philippotto enabled auto-merge (squash) December 13, 2022 14:55
@philippotto
Copy link
Member Author

I found one more minor issue which could be fixed:

  • When moving datasets into the same folder they already are in, the progress modal and success toast still appear. This should be ignored or one could show a warning toast. I'm leaning towards the warning toast to notify the user that the last action didn't make any sense and was probably unintended - but no hard opinion.

Done :) Will merge now unless you veto.

@daniel-wer
Copy link
Member

🚢 it!

@philippotto philippotto merged commit 24271cc into master Dec 13, 2022
@philippotto philippotto deleted the multi-select branch December 13, 2022 15:07
hotzenklotz added a commit that referenced this pull request Dec 15, 2022
…cing

* 'master' of github.com:scalableminds/webknossos:
  Respect mail.smtp.auth setting (#6692)
  Implement multi selection of datasets in folder tab (#6683)
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