Skip to content

Organizations List - Hide empty state header

Zack Cuddy requested to merge 427037-organization-empty-state into master

What does this MR do and why?

Closes #427037 (closed)
Follow up from !132418 (merged)

This change updates the Empty State on Organizations List to not show the header title or action. There was a layer of complexity to this change as we needed to move the GraphQL query up to the parent and utilize props.

This change is behind a feature flag (:ui_for_organizations)

Screenshots or screen recordings

Before After
Empty State Before After
Loading (no change) Loading_-_Before Loading_-_After
w/ Data (no change) Screenshot_2023-10-03_at_12.02.13_PM Screenshot_2023-10-03_at_12.03.11_PM

How to set up and validate locally

  1. Enable FF Feature.enable(:ui_for_organizations)
  2. We need to tell the UI to not return any data:
    • Locate this line (L27) in organizations/shared/graphql/resolvers.js
    • Update the line from nodes: organizations, to nodes: [],
  3. Refresh and Click Organizations Tab in left nav
  4. Ensure loading occurs and then empty state appears
  5. Ensure header text and action are hidden in empty state
  6. Undo local change to code on step 2
  7. Refresh and ensure Organizations are returned and the header text and action are there

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #427037 (closed)

Merge request reports