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

Disable compute-meshfile-button for volume annotations and datasets without segmentation #5648

Merged
merged 10 commits into from
Aug 4, 2021

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Aug 2, 2021

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • open a dataset with the following properties (with enabled jobs):
    • no segmentation layer / view mode (should be disabled)
    • no segmentation layer / with volume annotation (should be disabled)
    • segmentation layer / view mode (should be enabled)
    • segmentation layer / with volume annotation (should be disabled)
    • one of the above, but without enabled jobs (should be disabled)
  • ensure that the "compute mesh file" button is enabled/disabled correctly (including plausible tooltip explanation)

Issues:


@philippotto philippotto self-assigned this Aug 2, 2021
title = "Computation jobs are not enabled for this webKnossos instance.";
} else if (this.props.hasVolume) {
title =
"Meshes cannot be computed for volume annotations. Please open this dataset in view mode to compute a mesh file";
Copy link
Member

Choose a reason for hiding this comment

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

Why should view mode help here? View mode will not convert the volume annotation into a segmentation, right?

Also, if the toast supports HTML links, this should be a clickable link.

Copy link
Member Author

Choose a reason for hiding this comment

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

Why should view mode help here? View mode will not convert the volume annotation into a segmentation, right?

I changed the tooltip to Meshes cannot be precomputed for volume annotations. However, you can open this dataset in view mode to precompute meshes for the dataset's segmentation layer.. I hope this makes it clearer?

Also, if the toast supports HTML links, this should be a clickable link.

It's a tooltip, so, no clickable link possible..

Copy link
Member

Choose a reason for hiding this comment

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

This assumes that there is a segmentation layer to begin with in view mode. Depending on your dataset this is not the case. I am not sure if this already considered for this conditional. If so, than I guess its fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this case is already handled.

return (
<Menu>
<Menu.Item onClick={startComputingMeshfile} disabled={disabled}>
<Tooltip title={title}>Compute Mesh File</Tooltip>
Copy link
Member

Choose a reason for hiding this comment

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

I am also not a big fan of the button title. What is a mesh file? This is very technical. How about something more descriptive. "Computes Mesh for (whole) dataset" or "Pre-compute meshes for all segments" or "Compute all meshes". Or any such combination.

I find it hard to find the difference between the button "Compute Mesh" and "Compute Mesh File". Likely the other button should be called something like "Compute for Mesh for (active) Segment" or "Compute single mesh" or "compute temporay mesh" ...

Copy link
Member

Choose a reason for hiding this comment

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

@normanrz Any comments?

Copy link
Member

Choose a reason for hiding this comment

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

I don't have a strong opinion re mesh file.
I agree that meshes vs isosurfaces is quite confusing. They are essentially the same but have different names.

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the button labels to:

  • Precompute Meshes (tooltip: Precompute meshes for all segments of this dataset so that meshes for segments can be loaded quickly afterwards from a mesh file.)
  • Load Precomputed Mesh
  • Compute Mesh (ad hoc)

I hope this makes it clearer. I also hide the "Compute Mesh (ad hoc)" button automatically, if a mesh file is already available (since there is no benefit in using the ad-hoc part).

I agree that meshes vs isosurfaces is quite confusing. They are essentially the same but have different names.

I went through the code and changed the last user-facing "isosurface" bits to "mesh", but there were quite rare (mainly, in the download/reload buttons of the mesh list). I hope I caught them all.

};

const getComputeMeshFileButton = () => {
const { disabled, title } = getComputeMeshFileTooltipInfo();
Copy link
Member

Choose a reason for hiding this comment

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

Do theses till tip infos apply to the "Compute Mesh" button as well? I think they do, right? A single mesh also needs a segmentation layer and won't work with volume annotations.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now, the ad-hoc mesh button also has a tooltip. It needed slightly different code (e.g., it doesn't depend on jobsEnabled) and wording.

Copy link
Member

Choose a reason for hiding this comment

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

@hotzenklotz @philippotto I am a bit confused here, should the ad-hoc isosurface computation really be disabled for volume annotations? There exists the /volume/:tracingId/isosurface request in the tracingstore, which is now inaccessible?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, good catch. I'll open a PR to fix this.

Copy link
Member

Choose a reason for hiding this comment

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

For the record, fixed by @philippotto’s PR #5689 – thanks for the quick reaction! 🚀

@hotzenklotz
Copy link
Member

On a more high-level note: Do we really want to show these button if the can not do anything, i.e. the "error" toasts? Alternatively, we could not show the buttons at all and have the "error"/help texts directly in the segmentation tab/pane. Not sure how I feel about that though...

@philippotto
Copy link
Member Author

On a more high-level note: Do we really want to show these button if the can not do anything, i.e. the "error" toasts? Alternatively, we could not show the buttons at all and have the "error"/help texts directly in the segmentation tab/pane. Not sure how I feel about that though...

This might feel better, but I think, the disabled buttons convey quite well what the user can expect if the conditions are met. If we decide to change this, we should do this in a different PR and focus on the polish. The current PR was only meant as a hotfix for scenarios where meshes are simply not supported.

@philippotto
Copy link
Member Author

@daniel-wer feel free to review now :) I'm sorry that the PR got quite big. The last commit (26cedef) is the major contributor to this. In that commit, I extracted some code from the huge render method to make it a bit simpler. You could review the commit individually to get a better diff experience.

@daniel-wer
Copy link
Member

@philippotto Could you annotate your testing instructions with when the button should be enabled or disabled? This would help me to review and test this PR :)

@philippotto
Copy link
Member Author

Sure, just updated it!

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

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

Works exactly as described and the tooltip explanations are very helpful and descriptive 👍

@philippotto philippotto enabled auto-merge (squash) August 4, 2021 08:06
@philippotto philippotto merged commit 3de0a3e into master Aug 4, 2021
@fm3 fm3 deleted the disable-compute-mesh-for-volume-annotation branch August 25, 2021 09:47
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.

5 participants