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

Make hybrid annotations the default #4939

Merged
merged 17 commits into from
Dec 2, 2020
Merged

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Nov 11, 2020

  • by default, the "New Hybrid Tracing" will be shown in the dataset list (will create a hybrid with segmentation fallback)
  • a dropdown menu offers more options (e.g., skeleton, volume etc.)
  • if the current dataset, does not have a segmentation layer, the fallback options are not shown
  • if a segmentation layer exists, but is uint64, the default action will create an annotation without fallback data and in the dropdown the fallback-option is disabled (see Fully support uint64 segmentations and volume annotations #4852)
  • the "create annotation" button when viewing a dataset simply defaults to creating a hybrid (with fallback if possible)
  • I also refactored the flow types around the dataset so that isActive === true always means that dataLayers is an array. however, the back-end also needs to be adapted so that this is really true.
  • remove the workaround in the rest api I added to avoid errors with the previous todo

image

I think, we can change the wording later to "New Annotation" (without "Hybrid"), but let's get the users accustomed to the new UI first.

URL of deployed dev instance (used for testing):

Steps to test:

  • use the create annotation UI in dashboard and when viewing a dataset

Issues:


…also don't show fallback options when no segmentation layer exists)
@philippotto philippotto self-assigned this Nov 11, 2020
@philippotto philippotto changed the title [WIP] Make hybrid annotations the default Make hybrid annotations the default Nov 11, 2020
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.

Very cool, also the flow type refactoring 👍 I only left some very small suggestions regarding the code.

Regarding the UI, I agree with some of the points @fm3 already mentioned elsewhere and think there is some room for improvement. These are a couple of notes and ideas (feel free to ignore!):

  • The dropdown is misleading as it's not recognizable that only the arrow triggers the dropdown. Initially, I thought the button needed to be clicked to trigger the dropdown, however, that started a hybrid annotation. Usually one would solve this by separating the arrow:
    dropdown
    However, as we don't have the borders this doesn't really work 🤔 Sorry for not having a solution here, but I think we should try to find one.
  • A simple plus could work as an icon for the hybrid annotation
  • While we're at it, a cog wheel icon would work better for the "Edit" option in my opinion and one could also name it "Settings" instead of "Edit"
  • I think it would be fine to go with New Annotation directly instead of changing it again after a while, but no strong opinion

@fm3
Copy link
Member

fm3 commented Nov 12, 2020

  • The dropdown is misleading as it's not recognizable that only the arrow triggers the dropdown. Initially, I thought the button needed to be clicked to trigger the dropdown, however, that started a hybrid annotation. Usually one would solve this by separating the arrow. However, as we don't have the borders this doesn't really work thinking Sorry for not having a solution here, but I think we should try to find one.

How about something like this, with a vertical bar and a bit more space?
image

  • A simple plus could work as an icon for the hybrid annotation
  • While we're at it, a cog wheel icon would work better for the "Edit" option in my opinion and one could also name it "Settings" instead of "Edit"

I like that!

@philippotto
Copy link
Member Author

Thank you both for your feedback and ideas! I incorporated all the suggestions and regarding the dropdown/click target issue, I decided to make the entire "New Annotation" link a dropdown menu. One can directly click on it to create a new hybrid, but already hovering over it will show the dropdown with the other options. I think, this is the most idiomatic way and also antd's default menus support this. The fact that I had to manually tinker with the CSS before should have been a sign for me, that I did something weird 🙈

I updated the screenshot in the PR description (or check it out live).

@fm3
Copy link
Member

fm3 commented Nov 12, 2020

Ah yes that’s also a fair idea :D
I’m a bit worried, though, that this may make the original “main” button less attractive, if the user’s eye is immediately drawn to the much bigger drop down menu. Now I can imagine the user thinking the main button to be only a target to pop out the menu 🙈 …while actually we wanted the users to mostly use the hybrids from now on.

@philippotto
Copy link
Member Author

philippotto commented Nov 12, 2020

I’m a bit worried, though, that this may make the original “main” button less attractive, if the user’s eye is immediately drawn to the much bigger drop down menu. Now I can imagine the user thinking the main button to be only a target to pop out the menu

Argh, of course you are right, point taken. My first thought was to add redundancy (so the first menu item would be equal to the link), but now I'm considering the following:

image

What do you think?

/edit: I used the ItemGroup element of antd for it. So, it's not handrolled.

@fm3
Copy link
Member

fm3 commented Nov 12, 2020

Yeah definitely better 🤔 What do you think @daniel-wer?

@daniel-wer
Copy link
Member

I decided to make the entire "New Annotation" link a dropdown menu. One can directly click on it to create a new hybrid, but already hovering over it will show the dropdown with the other options. I think, this is the most idiomatic way and also antd's default menus support this.

I also thought about this but refuted the idea in my head with the argument @fm3 gave. However, I think you solved this nicely with the "Other options" divider. It's not perfect, but I think it's the best idea we have for now :)

@philippotto
Copy link
Member Author

philippotto commented Nov 13, 2020

Hmm, now, that I slept over it, I got more hesitant. I see two downsides:

  • as @fm3 pointed out, the dropdown is quite prominent even though we actually want to encourage the hybrid option
  • the dropdown won't work on touch systems as there is no hover.

the second point is not super dramatic in my opinion, but in combination with the first, it makes me really doubt the approach.

How about something like this, with a vertical bar and a bit more space?
image

I'll play around with that to see how this feels :)

@philippotto
Copy link
Member Author

Ok, I eventually went with your suggestion, @fm3. It currently looks like this:

image

This solution doesn't put too much emphasis on the dropdown, the UI should be easy to understand and it also works on mobile. Seems like the right way to go :)

@fm3
Copy link
Member

fm3 commented Dec 1, 2020

Great :) Thanks for looking into that!

I noticed that on some datasets I get the skeleton-only option twice? 🤔
image

Also, do you think it might make sense to offer the same options for the create-annotation button in the menu bar in view mode?

@philippotto
Copy link
Member Author

I noticed that on some datasets I get the skeleton-only option twice?
image

Good catch! Should be fixed now.

Also, do you think it might make sense to offer the same options for the create-annotation button in the menu bar in view mode?

Hm, strictly speaking, yes. I just tried adding that, but various problems arose which is why I wouldn't want to continue this, as the impact is rather low in my opinion 🙈

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.

Great work @philippotto and thanks @fm3 for the testing and ideas!

To me this looks good to be merged 🎉

There is one minor issue but feel free to ignore - For some reason the vertical alignment of the 4 elements (icon + text + divider + arrow) irritates my brain, but I can't quite make out what's wrong:

vertical_alignment

Maybe the arrow is too low, or the divider too high? As I said, feel free to ignore 🙈

@philippotto philippotto merged commit 2d3aa3e into master Dec 2, 2020
@philippotto philippotto deleted the refactor-new-annotation-links branch December 2, 2020 07:29
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.

Make hybrid tracings the default
3 participants