-
Notifications
You must be signed in to change notification settings - Fork 29
Moving and deleting multiple trees in skeletontracing #3457
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
Conversation
TODO:
|
…g occuring when moving
…bleminds/webknossos into moving-and-deleting-multiple-trees
@philippotto @daniel-wer This PR is ready for another review :) (200 line of code less 🎉 ) |
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.
Great PR @MichaelBuessemeyer :)
The simplifications were really worth it imo and the code reads very well! I made some suggestions.
After testing, I have some other UX improvement recommendations and ideas which could be best explained in a short call I think. Please let me know in slack, when you would be available for a 10min call in the next days :)
app/assets/javascripts/oxalis/model/actions/skeletontracing_actions.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/delete-group-modal-view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/delete-group-modal-view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
Just for the record, the action items from our call:
|
…bleminds/webknossos into moving-and-deleting-multiple-trees
@daniel-wer I applied your feedback: You can now only have either selected trees, an active group or an active tree. |
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.
@MichaelBuessemeyer This looks very good!
There seems to be a small bug when having an active tree and selecting the very same active tree using Ctrl + Click
. It then says, "Two Tree(s) selected", although probably nothing should have happened at all.
The "Delete Group and Subtrees" option of the group deletion modal can lead to inconsistent state, because subgroups and sub-subtrees are not properly deleted. This needs to be fixed.
There are a couple of cases where the user can end up with neither an activeTree nor an activeGroup, for example when clicking on "Clear Selection", and I can understand why you designed it that way. We'll have to see whether this confuses users and how heavily this feature will be used, I'd say it's fine for now :)
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
@daniel-wer I applied your feedback: I fixed the error with the inconsistent state after deleting a group with all subtrees. And I added better handling for the corner cases of the tree selection. |
…bleminds/webknossos into moving-and-deleting-multiple-trees
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.
Looking good, I've added two minor comments.
The only remaining issue I see is related to the group removal, see this example case:
- group1
- group2
- tree2
- tree1
- group2
In the current version, when removing group1 and selecting "Remove group and subtrees", group1 and tree1 will be removed, whereas group2 and tree2 will be moved up one level in the tree hierarchy. While the caption of this action is technically correct, I think this is going to confuse users. We should either:
- remove the option to delete subtrees completely (as it was before)
- delete all subtrees and subgroups recursively
I would prefer the second option, because I can imagine this functionality is useful, what's your opinion on this @philippotto?
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/oxalis/view/right-menu/trees_tab_view.js
Outdated
Show resolved
Hide resolved
Yes, that makes perfect sense. The two options should be either deleting a minimum or a maximum of reasonable trees. Deleting all children recursively appears to be the more frequent scenario. The caption of the confirm dialog needs to be adapted then, as well ("Do want to delete this group and keep its children or do you want to remove all children recursively?" or something like that). |
@MichaelBuessemeyer Awesome, works as expected for me :) @philippotto Maybe you could do a test run of the functionality as well, this PR has been open for a while and I want to avoid "Betriebsblindheit" :) If that is successful, ship it 🚢 |
I just tested this branch and it works pretty well 👍 The UI is very intuitive in my opinion and easy to grasp. However, I noticed one edge case: If there is only a group at the root level (which contains all other groups and trees), deleting that group recursively will result in a completely empty tracing. By itself, this sounds fine, however, the rest of WK assumes that there will always be at least one (empty) tree. In the other places we ensure that by adding an empty tree if the last tree was added (see the skeleton reducer for details). This would need to be fixed before merging, I think :) |
Without explicitly debugging this, but from reading the code, I think the bug is a little more subtle than this. The |
I pushed a fix for this issue and opted to fix it in the reducer itself as a safety measure against possible future bugs. When updating the tree groups, all trees with non-existing groupIds are moved to the root tree group ( |
This PR enables selecting multiple trees. Moving and deleting effect all selected trees.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated migration guide if applicable[ ] Needs datastore update after deployment