lab-cosmo / chemiscope

An interactive structure/property explorer for materials and molecules
http://chemiscope.org
BSD 3-Clause "New" or "Revised" License
127 stars 31 forks source link

Disable "more options" button in structure options by default #352

Closed sofiia-chorna closed 1 month ago

sofiia-chorna commented 1 month ago

Bug reproduction steps:

  1. Open Chemical Shieldings in the examples in chemiscope.org
  2. Open settings in one of the grid cells
  3. Click on "more options" button near color
  4. Click on "reset min/max" button -> exception

image

The proposed fix is to disable "more options" initially as color property is element by default => no color bar is available

Luthaf commented 1 month ago

This looks good! One small issue I found as well is that if the user selects another coloring, then open the extra settings, and switch again to element, the options are disabled, but still visible/expanded. Maybe we should automatically collapse it when switching back to element?

sofiia-chorna commented 1 month ago

This looks good! One small issue I found as well is that if the user selects another coloring, then open the extra settings, and switch again to element, the options are disabled, but still visible/expanded. Maybe we should automatically collapse it when switching back to element?

@Luthaf Thanks a lot for checking! I added a collapsing.