-
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
Add volume undo/redo support #4771
Conversation
@daniel-wer I just fixed the flow error and added a better type annotation for the |
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.
Wow, this is extremely cool! You did a very good job implementing this feature and structuring the code, kudos 🚀
I added some suggestions and asked for a couple of clarifications. I'll test next and will report back afterwards.
I also think that we should carefully measure the performance and memory impact of this. A good way would probably be to actually volume trace for 20 slices (as that is the current undo stack size), and undo/redo a couple of times in between and in the end. I would be interested in the memory overhead (using the dev console memory profiler) and whether undoing/redoing feels relatively smooth.
Very excited for this feature to land! ✨
frontend/javascripts/oxalis/model/bucket_data_handling/bucket.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/bucket_data_handling/bucket.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/bucket_data_handling/bucket.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/sagas/effect-generators.js.flow
Outdated
Show resolved
Hide resolved
Testing went mostly really well, I was pleasantly surprised by the performance, really cool! :) These are the issues I encountered:
|
I have two ideas for this:
Both are pretty simple solutions but have disadvantages.
Let me know what you think @daniel-wer. I just implemented the first option. |
Awesome, the first option sounds very good to me 👍 |
- notice every brush step as an undo step - undo triggers pushqueue - prevent undoing volume in merger mode
@daniel-wer I just fixed everything (CI, your feedback, etc.) Could you please check the 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.
Nice, thanks for thoroughly applying the feedback, I added a couple more comments, nothing major :)
frontend/javascripts/oxalis/model/bucket_data_handling/bucket.js
Outdated
Show resolved
Hide resolved
frontend/javascripts/oxalis/model/reducers/annotation_reducer.js
Outdated
Show resolved
Hide resolved
I tested again and can confirm that the undo of brush-clicking and the saving now works correctly 🎉 |
I just found another bug, that (i guess) was already existing:
-> I fixed this by caching the node radius in the settings component, thus preventing a reset to |
I simple mistake from my side. I just fixed that. Could you please check the newest version 🤓 📖 @daniel-wer ? |
@daniel-wer I just noticed I forgot to push the code. ^ Here is the fix |
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.
Everything worked beautifully during my testing 🎉 Great work!
@MichaelBuessemeyer Please add a changelog entry for this cool new feature :) |
This PR adds support for Undo / Redo of volume annotations, while still supporting skeleton undo in e.g. hybrid tracings.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
[ ] Updated (unreleased) migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment