Limit the width of alerts on the MR page in fixed-width mode
What does this MR do and why?
For #421940 (closed)
When viewing the Changes tab, the page does not include the container-limited
class, which is used to identify the Fixed width user preference when used in combination with container-fluid
(yes, even in Fixed mode). Because this is the ONLY way that fixed-width mode is identified in CSS, this MR adds a special class for the Diffs (Changes) App when container-limited
is removed. This new class (diffs-container-limited
) is used to limit the alert width.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Add an alert at the bottom of the MR Tabs constructor:
createAlert({ message: "Test alert to be shown all times", variant: "warning", });
- Set your user preference for "Behavior" to "Fixed"
- Visit an MR that has code changes
- Move among the tabs, including the Changes tab
- Note that the alert has a static width
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.
Edited by Thomas Randolph