-
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
Disable proofreading actions for mapped meshes #8091
Disable proofreading actions for mapped meshes #8091
Conversation
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.
Nice, testing went well 🎉
I only found a very small improvement of your changes. But while looking at the code I found some duplications. It would be very nice if you could refactor some of the duplication away. For more details please see my comments below.
Besides that, this pr should be ready to be
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.
Thanks for incorporating my feedback.
Re testing still worked so lets
const getTooltip = (actionVerb: "merge" | "split", actionNeedsActiveSegment: boolean) => { | ||
return !isProofreadingActive | ||
? `Cannot ${actionVerb} because the proofreading tool is not active.` | ||
: maybeUnmappedSegmentId == null | ||
? "The mesh wasn't loaded in proofreading mode. Please reload the mesh." | ||
: meshFileMappingName != null | ||
? "This mesh was created for a mapping. Please use a meshfile that is based on unmapped oversegmentation data." | ||
: actionNeedsActiveSegment && activeSegmentMissing | ||
? "Select a segment first." | ||
: null; | ||
}; |
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.
Très bien! 🎉
const shouldAgglomerateSkeletonActionsBeDisabled = | ||
!isProofreadingActive || | ||
activeSegmentMissing || | ||
maybeUnmappedSegmentId == null || | ||
meshFileMappingName != null; |
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.
👯
URL of deployed dev instance (used for testing):
Steps to test:
(see this comment too: #7868 (comment))
Issues:
(Please delete unneeded items, merge only when none are left open)