Commit 95871aae authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'justin_ho-fix-global-alert-when-on-fluid-layout' into 'master'

Fix global_alert when using fluid layout

See merge request gitlab-org/gitlab!79235
parents 2977f1d7 f96def74
......@@ -8,10 +8,9 @@
- close_button_class = local_assigns.fetch(:close_button_class, nil)
- close_button_data = local_assigns.fetch(:close_button_data, nil)
- icon = icons[variant]
- alert_root_class = 'gl-alert-layout-limited' if fluid_layout
- alert_container_class = [container_class, @content_class] unless fluid_layout || local_assigns.fetch(:is_contained, false)
%div{ role: 'alert', class: [alert_root_class, 'gl-alert-max-content', 'gl-alert', "gl-alert-#{variant}", alert_class], data: alert_data }
%div{ role: 'alert', class: ['gl-alert', "gl-alert-#{variant}", alert_class], data: alert_data }
.gl-alert-container{ class: alert_container_class }
= sprite_icon(icon, size: 16, css_class: "gl-alert-icon#{' gl-alert-icon-no-title' if title.nil?}")
- if dismissible
......
......@@ -49,12 +49,6 @@ RSpec.describe 'shared/_global_alert.html.haml' do
allow(view).to receive(:fluid_layout).and_return(false)
end
it 'does not add layout limited class' do
render
expect(rendered).not_to have_selector('.gl-alert-layout-limited')
end
it 'adds container classes' do
render
......@@ -74,10 +68,6 @@ RSpec.describe 'shared/_global_alert.html.haml' do
render
end
it 'adds layout limited class' do
expect(rendered).to have_selector('.gl-alert-layout-limited')
end
it 'does not add container classes' do
expect(rendered).not_to have_selector('.container-fluid.container-limited')
end
......
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