Skip to content

Fixes duplicate alert icon in storage banner

Vijay Hawoldar requested to merge vij-fix-storage-banner-icon into master

What does this MR do and why?

Fixes duplicate alert icon in storage banner

After the pajamas alert component update, we no longer need the inline alert icon.

No changelog as this banner is behind multiple disabled feature flags

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-10-30_at_13.53.04 Screenshot_2023-10-30_at_14.02.56

How to set up and validate locally

Try applying this patch:

diff
diff --git a/ee/app/components/namespaces/storage/limit_alert_component.rb b/ee/app/components/namespaces/storage/limit_alert_component.rb
index 1f536fc7f9c8..c74b59a64c3a 100644
--- a/ee/app/components/namespaces/storage/limit_alert_component.rb
+++ b/ee/app/components/namespaces/storage/limit_alert_component.rb
@@ -22,11 +22,11 @@ def initialize(context:, user:)
       attr_reader :context, :root_namespace, :user, :root_storage_size
 
       def render?
-        return false unless ::Gitlab::CurrentSettings.should_check_namespace_plan?
-        return false unless user.present?
-        return false unless user_has_access?
-        return false unless root_storage_size.enforce_limit?
-        return false if alert_level == :none
+        # return false unless ::Gitlab::CurrentSettings.should_check_namespace_plan?
+        # return false unless user.present?
+        # return false unless user_has_access?
+        # return false unless root_storage_size.enforce_limit?
+        # return false if alert_level == :none
 
         !user_has_dismissed_alert?
       end
@@ -95,6 +95,8 @@ def attention_required_alert_level?
       end
 
       def alert_level
+        return :error
+
         usage_thresholds = {
           none: 0.0,
           warning: 0.75,

And visiting Group Usage Quotas, e.g.: http://localhost:3000/groups/gitlab-org/-/usage_quotas#storage-quota-tab

MR acceptance checklist

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

Edited by Kos Palchyk

Merge request reports