Fix subscription banner spacing
What does this MR do and why?
Subscription banner contained old container classes updated in !163612 (merged) to use gap
spacinfg.
- Update CSS selector to first child decendants
- Remove vertical spacing on Open SSL banner
- Remove container classes from subscription banner
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- View admin settings e.g. https://gdk.test:3443/admin/application_settings/general
- Enable alerts to display, or edit conditons e.g.
diff --git a/ee/app/views/layouts/header/_ee_subscribable_banner.html.haml b/ee/app/views/layouts/header/_ee_subscribable_banner.html.haml
index 9104b92ff992..a2c9bb597e8d 100644
--- a/ee/app/views/layouts/header/_ee_subscribable_banner.html.haml
+++ b/ee/app/views/layouts/header/_ee_subscribable_banner.html.haml
@@ -2,19 +2,18 @@
- message = gitlab_subscription_message_or_license_message
- subject = gitlab_subscription_subject_or_license_subject
-- if message.present? && subscribable.present?
- .js-gitlab-ee-license-banner.hidden
- = render Pajamas::AlertComponent.new(variant: :danger,
- title: subject,
- alert_options: { data: { license_expiry: subscribable.expires_at, defer_links: "true", testid: 'subscribable_banner' }}) do |c|
- - c.with_body do
- = message
- - c.with_actions do
- - if subscribable.block_changes?
- = link_to_button_style(path: renew_subscription_path, track_property: 'renew')
- - elsif subscribable.expired?
- = link_to_button_style(path: upgrade_subscription_path, track_property: 'upgrade')
- - else
- = link_to_button_style(path: renew_subscription_path, track_property: 'renew')
- = render Pajamas::ButtonComponent.new(category: :secondary, button_options: { class: 'js-close gl-mb-2', 'aria-label': _('Dismiss'), data: { track_event: 'click_text', track_label: 'subscribable_action', track_property: 'thats_ok' } }) do
- = _("That's OK, I don't want to renew")
+.js-gitlab-ee-license-banner.hidden
+ = render Pajamas::AlertComponent.new(variant: :danger,
+ title: subject,
+ alert_options: { data: { license_expiry: subscribable.expires_at, defer_links: "true", testid: 'subscribable_banner' }}) do |c|
+ - c.with_body do
+ = message
+ - c.with_actions do
+ - if subscribable.block_changes?
+ = link_to_button_style(path: renew_subscription_path, track_property: 'renew')
+ - elsif subscribable.expired?
+ = link_to_button_style(path: upgrade_subscription_path, track_property: 'upgrade')
+ - else
+ = link_to_button_style(path: renew_subscription_path, track_property: 'renew')
+ = render Pajamas::ButtonComponent.new(category: :secondary, button_options: { class: 'js-close gl-mb-2', 'aria-label': _('Dismiss'), data: { track_event: 'click_text', track_label: 'subscribable_action', track_property: 'thats_ok' } }) do
+ = _("That's OK, I don't want to renew")
Edited by Scott de Jonge