Skip to content

Unify namespace storage usage view

Ammar Alakkad requested to merge 375651-unify-namespace-storage-limit-view into master

What does this MR do and why?

It unifies the storage usage views for both free/paid tiers, any user will now have the same view.

Note: cleaning-up the backend helpers is being handled in !107382 (merged).

Note 2: the MR touches some QA related selectors, but it won't be a problem.

Screenshots or screen recordings

condition before after
paid namespace Screenshot_2022-12-19_at_17.36.41 Screenshot_2022-12-19_at_17.36.29
free namespace Screenshot_2022-12-19_at_17.56.10 Screenshot_2022-12-19_at_18.06.28

How to set up and validate locally

To see the old design (graph) for free namespaces
  1. Checkout master branch
  2. Enable namespace_storage_limit feature flag (bin/rails console then Feature.enable(:namespace_storage_limit)).
  3. Navigate to an owned free namespace
  4. From left sidebar > Settings > Usage Quotas > Storage
  5. Observe the storage top section with the graph view
To see the old design (old cards) for paid namespaces
  1. Checkout master branch
  2. Disable namespace_storage_limit feature flag (bin/rails console then Feature.disable(:namespace_storage_limit)).
  3. Enable automatic_purchased_storage_allocation setting (bin/rails console then ::Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true))
  4. Navigate to an owned paid namespace
  5. From left sidebar > Settings > Usage Quotas > Storage
  6. Observe the storage top section with the old cards view
To see the unified design for any namespace
  1. Checkout 375651-unify-namespace-storage-limit-view branch
  2. Disable namespace_storage_limit feature flag (bin/rails console then Feature.disable(:namespace_storage_limit)).
  3. Enable automatic_purchased_storage_allocation setting (bin/rails console then ::Gitlab::CurrentSettings.update(automatic_purchased_storage_allocation: true))
  4. Navigate to an owned free or paid namespace
  5. From left sidebar > Settings > Usage Quotas > Storage
  6. Observe the storage top section with the cards view

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 #375651

Edited by Ammar Alakkad

Merge request reports