Use GlBroadcastMessage in Broadcast Message admin settings page
What does this MR do and why?
Closes #325352 (closed)
This MR intends to migrate to GlBroadcastMessage as defined in the gitlab-ui and Pajamas Design System.
The component itself was migrated to Rails version in shared/_broadcast_message.html.haml
.
The settings page has undergone a breaking change. Background color option was removed. Instead, there's a new option called Theme, which uses available themes from the GlBroadcastMessage component.
The visual design for the banner type has also changed and is now Pajamas-compliant. The notification type was left intact.
The messages configured prior to this change will receive a default indigo
theme.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
assigned to @slashmanov
4 Warnings caa4b941: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. Please add a merge request type to this merge request. You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the maintenancepipelines, maintenanceworkflow, documentation, QA labels.This merge request does not refer to an existing milestone. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
If needed, you can retry the
danger-review
job that generated this comment.Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Kassio Borges ( @kassio
) (UTC+0)Heinrich Lee Yu ( @engwan
) (UTC+8)frontend Dave Pisek ( @dpisek
) (UTC+11)Peter Hegman ( @peterhegman
) (UTC-7)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Generated by
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 3dbb300d and caa4b941
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.7 MB 3.7 MB - 0.0 % mainChunk 2.32 MB 2.32 MB - 0.0 %
Please look at the full report for more details
Read more about how this report works.
Generated by
DangerAllure report
allure-report-publisher
generated test report for 01af9dda!review-qa-reliable:
test report
review-qa-smoke: test report
review-qa-blocking: test reportHi @slashmanov,
Please add labels to your merge request if you can. Labels help us triage community merge requests.
Thanks for your help!
added auto updated label
added 1 commit
- caa4b941 - Use GlAlert in Broadcast Message admin settings page
added 893 commits
-
caa4b941...096ed6fd - 892 commits from branch
master
- 70f89741 - Use GlBroadcastMessage in Broadcast Message admin settings page
-
caa4b941...096ed6fd - 892 commits from branch
- A deleted user
added maintenanceremoval typefeature labels
1 Message This merge request adds or changes files that require a review from the Database team. This merge request requires a database review. To make sure these changes are reviewed, take the following steps:
- Ensure the merge request has database and databasereview pending labels. If the merge request modifies database files, Danger will do this for you.
- Prepare your MR for database review according to the docs.
- Assign and mention the database reviewer suggested by Reviewer Roulette.
The following files require a review from the Database team:
db/migrate/20220329095632_add_theme_to_broadcast_message.rb
db/migrate/20220329095632_add_theme_to_broadcast_message.rb
db/schema_migrations/20220329095632
db/structure.sql
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Sashi Kumar Kumaresan ( @sashi_kumar
) (UTC+0, 4 hours behind@slashmanov
)Thong Kuah ( @tkuah
) (UTC+12, 8 hours ahead of@slashmanov
)database Matt Kasa ( @mattkasa
) (UTC+0, 4 hours behind@slashmanov
)Mayra Cabrera ( @mayra-cabrera
) (UTC-5, 9 hours behind@slashmanov
)frontend Coung Ngo ( @cngo
) (UTC+1, 3 hours behind@slashmanov
)Peter Hegman ( @peterhegman
) (UTC-7, 11 hours behind@slashmanov
)~migration No reviewer available No maintainer available test Quality for spec/features/*
Sean Gregory ( @sgregory2
) (UTC-4, 8 hours behind@slashmanov
)Maintainer review is optional for test Quality for spec/features/*
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Generated by
Dangerchanged milestone to %14.10
added Category:Design System Migration backend component:broadcast-message database databasereview pending deprecation frontend typemaintenance + 1 deleted label and removed typefeature label
- Resolved by Stanislav Lashmanov
requested review from @xanf
added 1 commit
- 8aab2499 - Use GlBroadcastMessage in Broadcast Message admin settings page
added 1 commit
- 988376ec - Use GlBroadcastMessage in Broadcast Message admin settings page
added 1 commit
- 62a70e8b - Use GlBroadcastMessage in Broadcast Message admin settings page
added 140 commits
-
62a70e8b...e11d499a - 139 commits from branch
master
- 265c8221 - Use GlBroadcastMessage in Broadcast Message admin settings page
-
62a70e8b...e11d499a - 139 commits from branch
added 57 commits
-
265c8221...173060d1 - 56 commits from branch
master
- 7d9de264 - Use GlBroadcastMessage in Broadcast Message admin settings page
-
265c8221...173060d1 - 56 commits from branch
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 681a645a and 01af9dda
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.45 MB 3.43 MB -18.7 KB -0.5 % mainChunk 1.92 MB 1.91 MB -11.17 KB -0.6 % Significant Growth: 4Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.groups.security.compliance_dashboards 1.87 MB 1.94 MB +72.06 KB 3.8 % pages.projects.import.jira 1.07 MB 1.12 MB +55.09 KB 5.0 % pages.projects.jobs.show 1.26 MB 1.31 MB +52.99 KB 4.1 % jira_connect_app 271.49 KB 318.66 KB +47.17 KB 17.4 % Significant Reduction: 22Expand
Entrypoint / Name Size before Size after Diff Diff in percent pages.projects.commit.show 1.88 MB 1.48 MB -408.1 KB -21.2 % pages.projects.commit.pipelines 1.42 MB 1.05 MB -387.48 KB -26.6 % pages.projects.alert_management.details 1.41 MB 1.29 MB -130.05 KB -9.0 % pages.projects.threat_monitoring.alert_details 1.41 MB 1.29 MB -130.05 KB -9.0 % pages.profiles.preferences.show 456.39 KB 345.7 KB -110.69 KB -24.3 % pages.groups.dependency_proxies 897.21 KB 816.65 KB -80.56 KB -9.0 % pages.admin.runners.index 1.36 MB 1.32 MB -37.78 KB -2.7 % pages.import.bulk_imports.status 1.05 MB 1.02 MB -31.89 KB -3.0 % pages.import.bulk_imports.history 265.34 KB 233.54 KB -31.79 KB -12.0 % pages.import.history 268.22 KB 236.43 KB -31.79 KB -11.9 % The table above is limited to 10 entries. Please look at the full report for more details
Your MR has at least one entrypoint growing significantly (more > 1 KB or 2%). If you write new or extend existing features, this is expected and there is nothing to worry about.
Please consider pinging someone from the FE Foundations (
@dmishunov
,@justin_ho
,@mikegreiling
or@nmezzopera
) for review, if you are unsure about the size increase.Note: We do not have exact data for 681a645a. So we have used data from: f232e33f.
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
Dangeradded 1 commit
- 8692b4d5 - Use GlBroadcastMessage in Broadcast Message admin settings page
TODO: once this gets merged the docs should be updated as well.
removed review request for @xanf
@xanf
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
Setting label(s) devopsecosystem groupfoundations sectiondev based on ~"Category:Foundations" groupfoundations.
added groupfoundations sectiondev + 1 deleted label
- Resolved by Austin Regnery
@cdybenko hi!
Just wanted to make sure groupfoundations is aware of this change. Is it ok to have this breaking change regarding color option and some minor visual changes?
- Resolved by Stanislav Lashmanov
requested review from @cat
added 1 commit
- 7625a880 - Use GlBroadcastMessage in Broadcast Message admin settings page
added breaking change label
@slashmanov thanks for adding the breaking change label!
This merge request introduces breaking changes. Learn more about breaking changes.
It's important to identify how the breaking change was introduced. To estimate the impact, try to assess the following:
- Are there existing users depending on this feature?
- Are self-managed customers affected?
- To verify and quantify usage, use Grafana or Kibana.
- If you're not sure about how to query the data, contact the infrastructure team on their Slack channel, #infrastructure-lounge
- Was sufficient time given to communicate the change?
- Changes in the permissions, the API schema, and the API response might affect existing 3rd party integrations.
- Reach out to the Support team or Technical Account Managers and ask about the possible impact of this change.
- Are there existing users depending on this feature?
removed deprecation label
requested review from @aregnery
added UX label
added 1 commit
- e1a3ca14 - Use GlBroadcastMessage in Broadcast Message admin settings page
- Resolved by Stanislav Lashmanov
- Resolved by Stanislav Lashmanov
thought (non-blocking): Tried testing messages with a target path too, but I ran into a "problem" where they don't show up, this is an unrelated bug since we're not verifying that target_path starts with a
/
(only thecurrent_path
), maybe we should accept paths without a leading/
, or disallow this in the UI, or make the format clearer (not for this MR, but probably worth a follow-up)[34] pry(main)> BroadcastMessage.current_and_future_messages.banner.second.target_path => "admin" [35] pry(main)> BroadcastMessage.current_and_future_messages.banner.second.matches_current_path('admin') => nil [36] pry(main)> BroadcastMessage.current_and_future_messages.banner.second.target_path => "/admin" [37] pry(main)> BroadcastMessage.current_and_future_messages.banner.second.matches_current_path('admin') => #<MatchData "/admin">
mentioned in issue #357383 (closed)
One other question (wasn't saved inline due to #357383 (closed) and had to re-type it): Should we drop the color/font columns in a post-migration if we don't use them anymore? Or do we intend to drop them in a future issue/milestone for the extra "safety"?
added 1 commit
- 4a049ae4 - Use GlBroadcastMessage in Broadcast Message admin settings page
- Resolved by Stanislav Lashmanov
@cat everything should be sorted now, thanks for the suggestions!