Always show Flux resource selector on the environment settings page

Proposal

Currently, we are only showing the Flux selector in the environments settings form once the namespace is selected. This lead to some of our users not knowing that the selector is there.

To fix this issue, always show the Flux selector, but make it disabled if the namespace was not selected.

Design proposal

Agent Agent , namespace agent , namespace
Screenshot_2024-08-12_at_12.22.51 Screenshot_2024-08-12_at_22.33.25 Screenshot_2024-08-12_at_12.22.24

Implementation guide

  1. Add a disabled prop to the environment_flux_resource_selector. It should be a Boolean, false by default.
  2. Add a tooltip to the GlCollapsibleListbox using GlTooltipDirective. Show the tooltip only when the selector is disabled. The text for the tooltip:

    Select a namespace to see available Flux resources.

  3. Update the environment_form component:
    • set the disabled prop (we can use the existing showFluxResourceSelector computed for it, we can rename it to something like enableFluxResourceSelector or fluxResourceSelectorEnabled)
    • use showNamespaceSelector computed to ensure the Flux resource selector is not rendered until the agent is selected.
  4. Update corresponding tests:
Edited by Anna Vovchenko