scalableminds / webknossos

Visualize, share and annotate your large 3D images online
https://webknossos.org
GNU Affero General Public License v3.0
126 stars 23 forks source link

View TaskType Link is misleading, leads to error when no finished tasks exist #8138

Open dieknolle3333 opened 3 days ago

dieknolle3333 commented 3 days ago

If I click the "View" button of a task type in the task type view, wk tries to open an annotation and throws an error. <~ Annotation could not be found <~ We could not find finished annotations for this task type <~ no annotations image

MichaelBuessemeyer commented 3 days ago

I'd say this is actually expected behaviour. If you create a new task type you first need to create tasks for that task type and work on such tasks in order to get a viewable compound annotation of that task type. I'd suspect that you only created a task type and did not create tasks of that type which you worked on (potentially also them them to finished)?

MichaelBuessemeyer commented 3 days ago

Maybe the view link could be disabled in case the task type has no finished tasks or so. @fm3 This would mean another route, wouldn't it? Or else the frontend would need to prefetch the CompoundTaskType annotation for each entry in the task type list :thinking:

fm3 commented 3 days ago

The user-friendliest option would be to disable the button in case of zero finished matching annotations, and add a tooltip. However, adding this count to the task type list would add some complexity and runtime to the list query, which I don’t think this is currently worth.

I’d say We could not find finished annotations for this task type is an ok error message already. However, it being hidden in the “show more information” menu makes it hard to find. I wonder if the frontend could display a nice error message for this case. What do you think?

Also, a general tooltip for the “view” button could explain that this will show a compound annotation of all finished tasks for this tasktype. Then users may expect this behavior, rather than possibly a metadata view for the tasktype :thinking:

fm3 commented 3 days ago

I can confirm that the link still works as designed (if there are finished tasks, they are correctly displayed as compound annotation). However, I think that the naming and placement of this link in the tasktype list is misleading. I changed the issue title accordingly. Let’s consider options for how to make this clearer. As stated above, a tooltip may help a lot. Also, I’d probably move “View” down below “Projects”, above “Download”, which also only makes sense if there are actual finished tasks.

What do you think?

Also, @dieknolle3333 please stop us if you think we misunderstood the bug report and we should change the issue title back.

dieknolle3333 commented 21 hours ago

As this toast is what shows up when there is an actual error, showing this to the user when there is nothing really wrong doesnt feel like expected behaviour :sweat_smile: As you expected I didnt even know what to expect from this button. My intuition was a detail/setting view, not an annotation. Also because it is placed directly above "Edit", where you can edit the settings of the task type. Hence my initial naming of the "bug". Yours is better and more descriptive though! So I think moving the entry in the list also a tooltip will help. And a better error handling in the frontend, so a toast with a longer and maybe clearer message would be great.