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

Avoid that an unsaved state is shown when loading an annotation #6972

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

daniel-wer
Copy link
Member

@daniel-wer daniel-wer commented Apr 6, 2023

The functionality to "hide" some changes to the 3d viewport from time tracking (so from the save queue) was already there, but in this spot the boolean was not set. Since this piece of code is only triggered when changing the size of the viewports or when changing the zoom (which triggers an update action, anyways) or clipping distance, it's not relevant for time tracking.

I've also added that the save queue entries won't be compressed in the dev environment. This eases debugging and one cannot forget to revert the change before committing any longer. Let me know if you think that's an issue.

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • Open or create an annotation. The save button shouldn't show any unsaved changes.
  • Move, zoom or rotate in the 3D viewport -> There should be unsaved changes.
  • Other changes should still show unsaved changes and be saved across reloads.

Issues:


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

@daniel-wer daniel-wer self-assigned this Apr 6, 2023
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, works great :)

I agree with your compress suggestion 👍 One could even think about having a variable exposed in window (or GET parameter) so that we can switch the behavior on prod instances ad-hoc. However, I think, this is something for a future PR (I have some other ideas for such debug-related use cases).

@daniel-wer daniel-wer merged commit 3756619 into master Apr 12, 2023
1 check passed
@daniel-wer daniel-wer deleted the avoid-diff-on-annotation-load branch April 12, 2023 08:28
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.

Creating new annotation immediately leads to "unsaved" state
2 participants