Create component for reverting annotations#486
Merged
Conversation
e17ff94 to
04dfcd1
Compare
It isn't needed. The history is enough information.
This isn't hooked up to anything yet.
04dfcd1 to
5263052
Compare
Since we can't actually get the setting value without admin privileges, we guess based on the number of history entries and updated/created fields of the most recent entry.
Contributor
7addecf to
8e8e3d8
Compare
Create groups based on gaps between consecutive edits.
Contributor
Author
I think dfa387e addresses your concern here. Let me know if it needs to be tweaked further. |
manthey
reviewed
Jun 25, 2025
| delete this.annotation._meta; | ||
| delete this.annotation._styleFuncs; | ||
| } | ||
| this.annotation.trigger('revert:annotation', this.annotation, {}); |
Contributor
There was a problem hiding this comment.
In girder we prefix our own events with g: to give them some modest namespace. In some spots in HistomicsUI we prefix them with h:. I think I'd prefer to change this to h:revert:annotation
manthey
approved these changes
Jun 25, 2025
Contributor
undo_annotation.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix #459
This adds a new component to the edit annotation dialog which allows users to view the edit history for an annotation and revert back to any previous annotation version.
Annotation are grouped based on updated time. If more than one hour elapsed between edits, a new annotation group is created. Each group is represented by a collapsible list in the edit annotation dialog. Each entry contains the name of the user who made the edit, the edit time, the revision number, and the groups found in the annotation, as well as a button that can be used to revert to any that version.
On reverting an annotation, the dialog is closed and the annotations are refreshed.