FE: layermanager is missing default text on select box

Check for example the multidimension select demo, if there are no layers the select box is empty: http://localhost:5000/?path=/story/components-multidimensionselect--elevation-dimension-demo-with-dark-theme

Screenshot_2021-10-22_at_11.32.01

Preliminary layout for this can be found: Layer manager (medium) missing data (does this still need iteration?)

Steps toward solving this issue:

  1. As a dev, check the root cause for the bug. For example, clarify these open questions.
    1. Is the layer id (name) defined in code/presets (storybook, or production presets) something that server does not provide any more, and therefore drop down shows the empty select box value? For example, layer has existed and been part of getcapabilities before but not anymore.
    2. If there are other layers included into drop down list, they are still in the list for selection? In other words, is it so that the empty selection is limited to the layers that do not have corresponding content in WMS service getcapabilities reponse?
    3. What happens if the server GetCapabilities response is empty for all layers? For example, if service is limited to some workspace such as Radar-workspace, and it would have been renamed to rad. Is the drop down totally empty then? (Notice, the backend response may be error if unsupported workspace is used.) In theory, if all layers are missing then all select boxes should currently show empty layer, if 1.1. and 1.2. are correct assumptions.
  2. Based on the 1. results, you may ask UX designer how to handle empty case. (Layout done for 2.1.)
    1. For example, should we have some default warning/error placeholder string, and it is up to user to use delete button to remove content.
    2. For example, should empty layer been hidden from the list automatically? And, should it be removed from presets if presets are saved by using GeoWeb UI while layer automatically hidden?
  3. Depending on the available information in code/preset vs. GetCapabilities
    1. Maybe empty drop box option may show layer "Title" or "id/name" or empty string? In addition, the error info mentioned in layout completes the row. What if only empty string in drop box (title and id/name missing), is empty ok as default or "-" or something else?
    2. If the empty row is deleted by user? Is the missing layer still included in the selection? Why would it be because it is not included in GetCapabilities either?
Edited by Ville Karppinen