ray-optics icon indicating copy to clipboard operation
ray-optics copied to clipboard

Nested lists in Examples

Open ricktu288 opened this issue 2 years ago • 1 comments

Currently, the "Examples" list is quite long. If some additional examples are added, it may not be visible on small screens.

I suggest using nested lists within the example dropdown. The current examples can be organized as follows:

Reflection of light

  • images-formed-by-two-mirrors.json
  • parabolic-mirror.json

Refraction of light

  • reflect.json (despite the name, it is more related to refraction)
  • internal-reflection.json
  • prisms.json
  • apparent-depth-of-an-object-under-water.json
  • chromatic-dispersion.json

Lens

  • concave-lens.json
  • convex-lens.json
  • lens-images.json
  • zoom-lens.json
  • spherical-aberration.json
  • compound-microscope.json

Miscellaneous

  • reflection-and-refraction-of-a-single-ray.json
  • spherical-lens-and-mirror.json

And I think there may be a way to make the addition of new examples to the lists easy.

ricktu288 avatar Sep 22 '22 02:09 ricktu288

+1

Le jeu. 22 sept. 2022 à 02:35, Yi-Ting Tu @.***> a écrit :

Currently, the "Examples" list is quite long. If some additional examples are added, it may not be visible on small screens.

I suggest using nested lists within the example dropdown. The current examples can be organized as follows:

Reflection of light

  • images-formed-by-two-mirrors.json
  • parabolic-mirror.json

Refraction of light

  • reflect.json (despite the name, it is more related to refraction)
  • internal-reflection.json
  • prisms.json
  • apparent-depth-of-an-object-under-water.json
  • chromatic-dispersion.json

Lens

  • concave-lens.json
  • convex-lens.json
  • lens-images.json
  • zoom-lens.json
  • spherical-aberration.json
  • compound-microscope.json

Miscellaneous

  • reflection-and-refraction-of-a-single-ray.json
  • spherical-lens-and-mirror.json

And I think there may be a way to make the addition of new examples to the lists easy.

— Reply to this email directly, view it on GitHub https://github.com/ricktu288/ray-optics/issues/54, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHRGDW6GRAWOQGNSKLHLDSLV7PAWVANCNFSM6AAAAAAQSTWTYY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Yibbou avatar Sep 22 '22 07:09 Yibbou

Other possible designs:

  1. Use a sidebar, instead of the dropdown, to show a nested list of the examples
  2. Sort the items according to the groups, with a label added before each group.

ricktu288 avatar Oct 19 '22 18:10 ricktu288

I am planning to replace the Examples menu by a gallery webpage, so this is no longer necessary.

ricktu288 avatar Nov 11 '22 21:11 ricktu288