webknossos icon indicating copy to clipboard operation
webknossos copied to clipboard

All modals should be closeable by clicking gray backdrop

Open fm3 opened this issue 3 years ago • 3 comments

Detailed Description

Many modals, e.g. NML import can be closed when clicking outside of the modal area, e.g. on the gray back drop. This does not work for all modals, though. I noticed this on the user list view for

  • Change Experiences
  • Change Teams & Permissions and on dashboard for the “archive all” confirm modal. There are probably others.

Context

The gray area around a modal offers a huge click target which allows for faster navigation. Also, this being possible for some modals but not all is confusing

fm3 avatar Apr 07 '21 08:04 fm3

Just some food for thought: I think we should check twice before doing this for all modals. For example, doing some batch editing of experience domains can take several minutes within the modal. If one clicks accidentally on the "huge click target", this can be very annoying to the user as all the work is lost then. I even vaguely remember a "bug report" for this (not sure, though).

philippotto avatar Apr 07 '21 13:04 philippotto

Fair point :thinking: Do you know if there is an easy way to search the code for the information which modals have this and which don’t? Then we could discuss if it should be added to any specific one. However, that’s a low priority then.

fm3 avatar Apr 07 '21 14:04 fm3

The antd modal property is called maskClosable. A quick search reveals these components:

image

I vote to make the following closable:

  • downsample_volume_modal
  • experiences_modal_view
  • dataset_add_view

hotzenklotz avatar Oct 21 '22 12:10 hotzenklotz