Commit a0387521 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '234087-do-not-render-k8s-feature-highlight' into 'master'

Do not render k8s feature highlight if not necessary

Closes #234087

See merge request gitlab-org/gitlab!39228
parents 638869fa 4974ff6b
......@@ -29,12 +29,6 @@
}
}
.is-showing-fly-out {
.feature-highlight {
display: none;
}
}
.feature-highlight-popover-content {
display: none;
......
......@@ -13,6 +13,7 @@ module UserCalloutsHelper
end
def show_gke_cluster_integration_callout?(project)
active_nav_link?(controller: sidebar_operations_paths) &&
can?(current_user, :create_cluster, project) &&
!user_dismissed?(GKE_CLUSTER_INTEGRATION)
end
......
---
title: Increase sidebar performance by not rendering k8s highlight when not needed
merge_request: 39228
author:
type: performance
......@@ -25,9 +25,23 @@ RSpec.describe UserCalloutsHelper do
allow(helper).to receive(:user_dismissed?).and_return(false)
end
context 'when active_nav_link is in the operations section' do
before do
allow(helper).to receive(:active_nav_link?).and_return(true)
end
it { is_expected.to be true }
end
context 'when active_nav_link is not in the operations section' do
before do
allow(helper).to receive(:active_nav_link?).and_return(false)
end
it { is_expected.to be false }
end
end
context 'when user dismissed' do
before do
allow(helper).to receive(:user_dismissed?).and_return(true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment