You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per-User State in Annotations: Camera, Visibility Toggles (#8542)
In shared annotations with multiple authors, some changes are now stored
per user. This means that other users won’t see all those changes if
their own diverge. This includes the current position and zoom,
visibilities of trees, bounding boxes, and segments (as specified with
the checkboxes in the lists), as well as which groups are expanded in
the lists. The annotation owner’s user state is used as a fallback for
users who haven’t explicitly changed these values themselves.
<details>
<summary> User-Specific state for annotations and tracings </summary>
- Annotation
- Camera (editPos/rot/zoomLevel)
- Skeleton
- activeNodeId
- Tree visibilities
- TreeGroup expanded states
- boundingBox visibilities
- Volume
- activeSegmentId
- SegmentGroup expanded states
- boundingBox visibilities
- segment visibilities
</details>
<details>
<summary> Update actions that now mutate (only) the user state
</summary>
- UpdateCameraAnnotationAction
- UpdateSegmentGroupsExpandedStateVolumeAction
- UpdateSegmentVisibilityVolumeAction
- UpdateTreeGroupVisibilitySkeletonAction
- UpdateTreeGroupsExpandedStateSkeletonAction
- UpdateTreeVisibilitySkeletonAction
- UpdateUserBoundingBoxVisibilitySkeletonAction
- UpdateUserBoundingBoxVisibilityVolumeAction
- UpdateActiveNodeSkeletonAction
- UpdateActiveSegmentIdVolumeAction
</details>
https://annotationuserstate.webknossos.xyz/
### Steps to test:
**Note: since new update actions are introduced here, annotations that
are edited on this branch cannot be loaded after switching back to
master. Refresh your db to be sure everything is clean**
- Edit annotation with multiple users, user-state should be saved and
used after reload
- Annotation owner’s state should be used as a fallback (per element)
- Layer Deletion/Addition (bbox visibilities should be moved to user
state of new precedence layer)
- NML download should “render” the visibilities etc so that it matches
what the requesting user also sees in the browser
- Merging annotations should preserve user states (despite id remapping
of segments/trees etc)
- Duplicating annotations should preserve the user state for the
requesting user (who will be owner of the new annotation).
### TODOs:
<details>
<summary>Backend</summary>
- [x] User state in annotation, skeleton, volume proto
- [x] Define new update actions
- [x] Annotation
- [x] Skeleton
- [x] Volume
- [x] Implement applying new update actions
- [x] When layer precedence changes, move relevant user states (bbox
visibilities)
- [x] Better Naming (now we have class UpdateUserStateSkeletonAction and
trait UserStateVolumeUpdateAction…)
- [x] Render user state for NML writing
- [x] Camera
- [x] Skeleton specifics
- [x] Volume specifics
- [x] Update with the new `UpdateSegmentGroupVisibilityVolumeAction` and
`UpdateSegmentVisibilityVolumeAction`
- [x] discuss what NML parser should do (create a user state? or use old
properties?)
- [x] discuss what duplicate should do (the owner changes, should user
state be mutated?)
- [x] check other tracingstore routes for potential interactions with
user state
- [x] Merge User State when merging Annotations (beware of remapped ids)
- [x] merge skeleton user states
- [x] merge volume user states
- [x] adapt user states to new owner if needed
- [x] add unit tests for render logic
- [x] add unit tests for merge logic
- [x] Refresh snapshots (blocked by
#8541)
- [x] Cleanup
- [x] Make sure that everything still behaves as expected after #8492 is
merged
</details>
<details>
<summary>Frontend</summary>
- [x] Read relevant properties from user state, with fallback hierarchy
- [x] Create new update actions
- [x] Don’t update everything immediately after load
- [x] fix tests
</details>
### Issues:
- fixes#8531
------
- [x] Updated
[changelog](../blob/master/CHANGELOG.unreleased.md#unreleased)
- [x] Removed dev-only changes like prints and application.conf edits
- [x] Considered [common edge
cases](../blob/master/.github/common_edge_cases.md)
- [x] Needs datastore update after deployment
---------
Co-authored-by: Philipp Otto <philipp.4096@gmail.com>
- In shared annotations with multiple authors, some changes are now stored per user. This means that other users won’t see all those changes if their own diverge. This includes the current position and zoom, visibilities of trees, bounding boxes, and segments (as specified with the checkboxes in the lists), as well as which groups are expanded in the lists. The annotation owner’s user state is used as a fallback for users who haven’t explicitly changed these values themselves. [#8542](https://github.com/scalableminds/webknossos/pull/8542)
14
15
- Added the ability to duplicate trees in skeleton annotations. Users can create a copy of any tree (including all nodes, edges, and properties) via the context menu in the skeleton tab. [#8662](https://github.com/scalableminds/webknossos/pull/8662)
15
16
- Meshes are now reloaded using their previous opacity value. [#8622](https://github.com/scalableminds/webknossos/pull/8622)
0 commit comments