-
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
Added shorthand to mark branch points from context menu #6012
Conversation
…nchpoints_shortcut * 'master' of github.com:scalableminds/webknossos: use allDataBlocking and temporary files for explorative download (#6009)
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.
Great stuff! Code looks perfect. The only thing I'm hesitant about is:
I decided against the option to "remove" as branch point because that cause wK to jump to a different location which I felt was weird... or at least unintuitive when interacting with a single node.
I agree, that it would be unintuitive to use the normal "pop branchpoint" behavior by default, but it also seems weird that a branchpoint cannot be removed from the context menu even though it was created via that menu. I imagine that users might be having a hard time to remove a branchpoint then.
I think, it should be simple to remove a branchpoint from the context menu which does not change the current position. For this, you would need to make setting activeNodeId
here conditional: https://github.com/scalableminds/webknossos/blob/master/frontend/javascripts/oxalis/model/reducers/skeletontracing_reducer.js#L602
The condition itself would be contained in the action deleteNodeAction
which could be changed to:
// in skeletontracing_actions.js:
export const deleteNodeAction = (
nodeId?: number,
treeId?: number,
jumpToPrevious: boolean = true,
timestamp: number = Date.now(),
): DeleteNodeAction => ({
type: "DELETE_NODE",
nodeId,
treeId,
timestamp,
jumpToPrevious,
});
The third spot which would need to be adapted is probably in skeletontracing_saga.js
in centerActiveNode
which should do if (action.type == "DELETE_BRANCHPOINT" && !action.jumpToPrevious) return;
so that no re-centering is performed.
What do you think?
I agree that having "unmark as branch point" would be nice as well and good style. However, I think the implementation is not as easy as outlined. The |
Ah, good catch. Then, I assume, we would need a new action with a separate reducer. Let me know if you want to talk about it or whether you want to delegate this. |
@philippotto I added the "unmark as branch point" functionality. Please review / check. Thanks |
…nchpoints_shortcut * 'master' of github.com:scalableminds/webknossos: For empty volume tracings, serve header-only zip (#6022)
The code looks good 👍 I'd only rename the action from Also, the CI fails (due to prettier?) currently. When it succeeds, I'll do testing round :) |
@philippotto I applied your PR feedback and renamed the action. CI should also be fixed. |
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.
* 'master' of github.com:scalableminds/webknossos: Log legacy route usages (#6024) Change GET routes with side effects to POST (#6023) More api swagger annotations (#5989) add shorthand for deleting trees (#6013) Added shorthand to mark branch points from context menu (#6012) Map node group context menu to right-click (#6021) For empty volume tracings, serve header-only zip (#6022) use allDataBlocking and temporary files for explorative download (#6009)
I added the option to mark a node as branch point directly from the context menu.
I felt like this was missing. I decided against the option to "remove" as branch point because that cause wK to jump to a different location which I felt was weird... or at least unintuitive when interacting with a single node.
Any not sure if there was an active design decision to not include it, that I am not aware of?
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
(Please delete unneeded items, merge only when none are left open)