Skip to content
Snippets Groups Projects

Separates banners from alerts

Merged Sascha Eggenberger requested to merge banners-alerts-cleanup into master
All threads resolved!

What does this MR do and why?

Aims to separate banners from alerts. From a hierarchy perspective banners should always appear on top of the page. For alerts we currently have full width and container restricted alerts. These can appear together (like for example in onboarding new users). To simplify and make the overall experience more congruent this MR cleans up order of banners & alerts and shows all alerts in the page container (depending on the user setting).

  • Introduces a new wrapper to host banners independently of alerts
  • Unifies appearance of banners
  • Moves flash messages into alerts wrapper
  • Moves top bar out of alerts wrapper (bugfix)

Changelog: changed

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
before after
before2 after2

How to set up and validate locally

  1. Enable test patch to enable various banners & alerts (see below)
  2. Visit a page like project or a settings page
Test patch
diff --git a/app/views/shared/_outdated_browser.html.haml b/app/views/shared/_outdated_browser.html.haml
index e62e3bb4a6c6..229589e543b0 100644
--- a/app/views/shared/_outdated_browser.html.haml
+++ b/app/views/shared/_outdated_browser.html.haml
@@ -1,4 +1,4 @@
-- if outdated_browser?
+- if not outdated_browser?
   = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do |c|
     - c.with_body do
       = s_('OutdatedBrowser|GitLab may not work properly, because you are using an outdated web browser.')
diff --git a/app/views/shared/_token_expiration_banner.html.haml b/app/views/shared/_token_expiration_banner.html.haml
index e68fe613c22b..0af2478b1bf6 100644
--- a/app/views/shared/_token_expiration_banner.html.haml
+++ b/app/views/shared/_token_expiration_banner.html.haml
@@ -1,8 +1,8 @@
 - id = 'token_expiration'
 - cookie_key = 'hide_token_expiration_banner'
 
-- return unless show_token_expiration_banner?
-- return unless cookies[cookie_key].blank?
+-# - return unless show_token_expiration_banner?
+-# - return unless cookies[cookie_key].blank?
 
 - link = link_to('', help_page_path('security/tokens/token_troubleshooting'), target: '_blank', rel: 'noopener noreferrer')
 - message = safe_format(s_('AccessTokens|GitLab now enforces expiry dates on tokens that originally had no set expiration date. Those tokens were given an expiration date of one year later. Please review your personal access tokens, project access tokens, and group access tokens to ensure you are aware of upcoming expirations. Administrators of GitLab can find more information on how to identify and mitigate interruption in our %{link_start}documentation%{link_end}.'), tag_pair(link, :link_start, :link_end))
diff --git a/app/views/shared/projects/_inactive_project_deletion_alert.html.haml b/app/views/shared/projects/_inactive_project_deletion_alert.html.haml
index 8ac5c8b8defd..3cfb2e6ee9b9 100644
--- a/app/views/shared/projects/_inactive_project_deletion_alert.html.haml
+++ b/app/views/shared/projects/_inactive_project_deletion_alert.html.haml
@@ -1,7 +1,7 @@
-- if show_inactive_project_deletion_banner?(@project)
+- if not show_inactive_project_deletion_banner?(@project)
   - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('administration/inactive_project_deletion') }
   - link_end = '</a>'.html_safe
-  - deletion_date = inactive_project_deletion_date(@project)
+  - deletion_date = ''
   - title = _('Due to inactivity, this project is scheduled to be deleted on %{deletion_date}. %{link_start}Why is this scheduled?%{link_end}').html_safe % { deletion_date: deletion_date, link_start: link_start, link_end: link_end }
 
   = render Pajamas::AlertComponent.new(title: title, variant: :warning, dismissible: false)
diff --git a/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml b/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
index 70bc6d639638..490ad900c7b8 100644
--- a/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
+++ b/ee/app/views/shared/_namespace_user_cap_reached_alert.html.haml
@@ -1,7 +1,7 @@
 - return unless current_user
 - namespace = @project&.namespace || @group
 - return unless namespace.present?
-- return unless display_namespace_user_cap_reached_alert?(namespace)
+-# - return unless display_namespace_user_cap_reached_alert?(namespace)
 
 - root_namespace = namespace.root_ancestor
 - pending_users_link = pending_members_group_usage_quotas_path(root_namespace)
diff --git a/ee/app/views/shared/_new_user_signups_cap_reached_alert.html.haml b/ee/app/views/shared/_new_user_signups_cap_reached_alert.html.haml
index b58bcf1b8fa4..8d9d75fbd1f5 100644
--- a/ee/app/views/shared/_new_user_signups_cap_reached_alert.html.haml
+++ b/ee/app/views/shared/_new_user_signups_cap_reached_alert.html.haml
@@ -1,4 +1,4 @@
-- return unless show_new_user_signups_cap_reached?
+-# - return unless show_new_user_signups_cap_reached?
 
 - user_cap_help_url = help_page_path('administration/settings/sign_up_restrictions')
 - help_link_start = '<a class="gl-link" href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: user_cap_help_url }

Related to #469616 (closed)

Edited by Sascha Eggenberger

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Sascha Eggenberger
  • Sascha Eggenberger changed the description

    changed the description

  • Sascha Eggenberger changed the description

    changed the description

  • requested review from @jeldergl

  • added 1 commit

    • bee0483c - Seperates banners from alerts

    Compare with previous version

  • mentioned in merge request gitlab-ui!4496 (merged)

  • Sascha Eggenberger
  • Bundle size analysis [beta]

    This compares changes in bundle size for entry points between the commits c797d65b and edc0dbfd

    :sparkles: Special assets

    Entrypoint / Name Size before Size after Diff Diff in percent
    average 4.33 MB 4.33 MB - 0.0 %
    mainChunk 3.27 MB 3.27 MB - 0.0 %

    Note: We do not have exact data for c797d65b. So we have used data from: e5042b0e.
    The intended commit has no webpack pipeline, so we chose the last commit with one before it.

    Please look at the full report for more details


    Read more about how this report works.

    Generated by :no_entry_sign: Danger

  • Sascha Eggenberger changed the description

    changed the description

  • Jeremy Elder approved this merge request

    approved this merge request

  • added pipelinetier-2 label and removed pipelinetier-1 label

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • Jeremy Elder removed review request for @jeldergl

    removed review request for @jeldergl

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for edc0dbfd

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Create      | 128    | 0      | 16      | 0     | 144   | ✅     |
    | Govern      | 71     | 0      | 0       | 0     | 71    | ✅     |
    | Verify      | 44     | 0      | 2       | 0     | 46    | ✅     |
    | Plan        | 73     | 0      | 0       | 0     | 73    | ✅     |
    | Data Stores | 31     | 0      | 1       | 0     | 32    | ✅     |
    | Manage      | 1      | 0      | 1       | 0     | 2     | ✅     |
    | Secure      | 3      | 0      | 0       | 0     | 3     | ✅     |
    | Package     | 20     | 0      | 12      | 0     | 32    | ✅     |
    | Fulfillment | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Release     | 5      | 0      | 0       | 0     | 5     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 388    | 0      | 32      | 0     | 420   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Sascha Eggenberger requested review from @kkloss

    requested review from @kkloss

  • Sascha Eggenberger added 522 commits

    added 522 commits

    Compare with previous version

  • Sascha Eggenberger requested review from @kkloss

    requested review from @kkloss

  • added 1 commit

    • 457f5a03 - Seperates banners from alerts

    Compare with previous version

  • added 1 commit

    • 4ffa7a51 - Seperates banners from alerts

    Compare with previous version

  • Kev Kloss approved this merge request

    approved this merge request

  • Kev Kloss requested review from @pburdette

    requested review from @pburdette

  • Payton Burdette approved this merge request

    approved this merge request

  • Payton Burdette resolved all threads

    resolved all threads

  • Payton Burdette removed review request for @kkloss

    removed review request for @kkloss

  • Payton Burdette removed review request for @pburdette

    removed review request for @pburdette

  • Payton Burdette requested review from @ayufan

    requested review from @ayufan

  • Kamil Trzciński approved this merge request

    approved this merge request

  • Kamil Trzciński removed review request for @ayufan

    removed review request for @ayufan

  • Sascha Eggenberger added 1078 commits

    added 1078 commits

    Compare with previous version

  • Sascha Eggenberger reset approvals from @ayufan, @pburdette, and @kkloss by pushing to the branch

    reset approvals from @ayufan, @pburdette, and @kkloss by pushing to the branch

  • requested review from @ayufan and @pburdette

  • Kamil Trzciński resolved all threads

    resolved all threads

  • Kamil Trzciński approved this merge request

    approved this merge request

  • Kamil Trzciński enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Kamil Trzciński added this merge request to the merge train at position 4

    added this merge request to the merge train at position 4

  • mentioned in commit c566b21a

  • added workflowstaging label and removed workflowcanary label

  • Scott de Jonge mentioned in merge request !165461 (merged)

    mentioned in merge request !165461 (merged)

  • Justin Ho Tuan Duong
  • Justin Ho Tuan Duong resolved all threads

    resolved all threads

  • mentioned in merge request !167898 (merged)

  • Please register or sign in to reply
    Loading