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

Fix clip histogram button if ideal mag does not exist #6433

Merged
merged 8 commits into from
Sep 15, 2022

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Aug 30, 2022

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • test the clip histogram button with a dataset where one layer only has mag 1 and another layer has higher mags
  • zoom out very far (e.g., mag 8) and use the clip-histogram for the layer which only has mag 1
  • --> a toast should explain that the action didn't succeed and to zoom in
  • zoom in further (e.g., mag 4) --> the button should work (for me, it loaded 80 MB of data which is quite a lot but alright for this edge case in my opinion)

Issues:


@philippotto philippotto self-assigned this Aug 30, 2022
@philippotto
Copy link
Member Author

@fm3 I couldn't really reproduce the exact error scenario you experienced in your issue (do you happen to have an error message?). Initially, I thought that a non existent mag was used, but the code did actually deal with that correctly. However, I noticed that there was no guard against loading very large volumes of data (e.g., only mag 1 exists, but you click on the layer in mag 32). Therefore, I adapted the code to gracefully handle this situation. I hope this helps!

@fm3
Copy link
Member

fm3 commented Aug 31, 2022

I couldn't really reproduce the exact error scenario you experienced

For the record, as discussed in slack, my issue was not tested on the latest master and would with the newer code have instead triggered exactly what this issue solves 👍

@philippotto
Copy link
Member Author

@fm3 maybe you can have a look at the diff :)

Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

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

Works for me :)

@philippotto philippotto enabled auto-merge (squash) September 15, 2022 08:21
@philippotto philippotto merged commit 69c49d0 into master Sep 15, 2022
@philippotto philippotto deleted the fix-clip-hist-for-missing-mags branch September 15, 2022 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-Clip histogram while layer is not rendered due to missing mag breaks core UI
2 participants