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

Remove segment from list and add undo/redo for segments #6944

Merged
merged 14 commits into from
Apr 4, 2023

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Mar 27, 2023

… removing a segment.

Also, I renamed a bunch of cellId vars to segmentId to unify this mismatch a bit. For reviewing, it might be better to review that commit isolated.

URL of deployed dev instance (used for testing):

Steps to test:

  • create a volume annotation
  • brush or click a segment
  • remove that segment from the list
  • hit undo and redo
  • rename a segment
  • hit undo and redo

Issues:


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

  • Updated changelog
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@philippotto philippotto self-assigned this Mar 27, 2023
@philippotto philippotto changed the title [WIP] Remove segment from list and add undo/redo for segments Remove segment from list and add undo/redo for segments Mar 27, 2023
@philippotto philippotto marked this pull request as ready for review March 27, 2023 17:02
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 looks very good to me 👍

  • During testing I encountered some inconsistent behavior related to branching off from an earlier undo state. In that case the undo stack doesn't seem to be correctly pruned and one version of the old branch remains on the stack instead of the version that was branched from. See this gif, but let me know if you can't follow what's happening:
    segments_undo_redo_confusion
  • When removing a segment from the list which had an ad-hoc or precomputed mesh loaded and then undoing that, the mesh check mark is restored but the mesh is not. Maybe the mesh loading can be retriggered in that case? Otherwise, the check mark shouldn't be checked.
  • [Low-Pri] Unrelated to this PR, but maybe it's quick to fix. The cross hair and brush icon next to the segment ID are in italics as well, looking slightly weird.

@philippotto
Copy link
Member Author

Thanks for your review & testing! I fixed the issues you found and also refactored the code a bit which is why I would recommend to review the changes commit-by-commit (one of them just extracts a large chunk of code into a new module). I hope the comments are self-explanatory, otherwise, let me know! Took me quite a bit of diving today to get into the save saga again 🤿

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.

Please see my one question :) I'll test again once you say you're done with the PR.

frontend/javascripts/oxalis/model/sagas/undo_saga.ts 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 wonderfully for me 🎉

@philippotto philippotto enabled auto-merge (squash) April 4, 2023 08:15
@philippotto philippotto merged commit 255d02f into master Apr 4, 2023
@philippotto philippotto deleted the unregister-segment branch April 4, 2023 08:30
hotzenklotz added a commit that referenced this pull request Apr 4, 2023
…wings

* 'master' of github.com:scalableminds/webknossos:
  updates docs for docker installation (#6963)
  Fix misc stuff when viewing tasks/annotations of another user (#6957)
  Remove segment from list and add undo/redo for segments (#6944)
  Log all details on deleting annotation layer (#6950)
  fix typo
  Rename demo instance to wkorg instance (#6941)
  Add LOD mesh support for frontend (#6909)
  Fix layout of view mode switcher and move it (#6949)
  VaultPath no longer extends nio.Path (#6942)
  Release 23.04.0 (#6945)
  Use new zip.js version to allow zip64 uploads (#6939)
  Implement viewing sharded neuroglancer precomputed datasets (#6920)
  Reject dataset uploads if organization storage quota is exceeded (#6893)
  Refactor deprecated antd Dropdown menus (#6898)
hotzenklotz added a commit that referenced this pull request Apr 4, 2023
…come-toast

* 'master' of github.com:scalableminds/webknossos:
  updates docs for docker installation (#6963)
  Fix misc stuff when viewing tasks/annotations of another user (#6957)
  Remove segment from list and add undo/redo for segments (#6944)
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.

Remove segment from list
2 participants