-
Notifications
You must be signed in to change notification settings - Fork 24
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
Improving the selection of the next active tree after tree deletion #4370
Improving the selection of the next active tree after tree deletion #4370
Conversation
@daniel-wer Could you please review this PR? |
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.
Nice, worked well in my tests 👍
One thing I noticed is that this method doesn't work if users sorted trees by name (and technically it's not even correct if trees are sorted by timestamp, which is the default, because the code is looking at ids [but id and timestamp order mostly corresponds]). I also see, however, that choosing the correct tree in these circumstances would be harder since the sorting state is most likely component state. Do you have an opinion on this @philippotto?
frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer_helpers.js
Outdated
Show resolved
Hide resolved
Co-Authored-By: Daniel <[email protected]>
I'd say, taking sorting by name into account would be nice to have, but given that the prior behavior was tolerated for so long, this PR should be a sufficient improvement. Since id and timestamp order corresponds, the major use case should be covered by this. However, groups are probably disturbing the behavior, too, right? In that case, the global sorting is neither by id nor by name. But as I said: this PR should be an improvement, nevertheless, and we have other issues with higher priority in my opinion :) |
@@ -230,6 +230,7 @@ class DatasetTable extends React.PureComponent<Props, State> { | |||
/> | |||
<Column | |||
title="Data Layers" | |||
key="dataLayers" |
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.
I just noticed that react was complaining because the key prop was missing. I just added it here, as an own PR for this change would be overkill.
@daniel-wer Could you please check my newest changes? |
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.
LGTM 👍
This PR improves the selection for the next active tree after deleting a tree.
For further information: Link to Discuss
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment