Fleet UI: Align InfoBanner leading icon with first line of wrapped copy - #51446
Conversation
.icon carries `align-self: center`, which was overriding the `.info-banner__icon` container's `align-items: flex-start` and pulling the leading icon back to the vertical center whenever the banner text wrapped. Give .info-banner__leading-icon an `align-self: flex-start` + one-line-tall height so the 16px svg tracks the first line of copy — same technique as the toast icon fix in #50449.
`.icon` is `display: inline-flex`, so the taller `height` band was leaving the 16px svg pinned to the top. Add `align-items: center` so the svg sits centered inside the first-line band.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51446 +/- ##
========================================
Coverage 68.77% 68.77%
========================================
Files 4005 4005
Lines 259206 259206
Branches 13674 13831 +157
========================================
+ Hits 178265 178269 +4
+ Misses 65128 65124 -4
Partials 15813 15813
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. WalkthroughUpdated the InfoBanner leading-icon styles. The icon now aligns with the first line of wrapped text. The SVG centers within the line height. The icon does not shrink in the flex layout. Possibly related issues
Merge Risk: ⚪ Minimal · up to This change only adjusts the InfoBanner leading icon so it aligns with the first line of wrapped text; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes a Fleet UI layout bug where the InfoBanner leading icon becomes vertically centered when the banner message wraps to multiple lines. The change aligns the icon with the first line of text by overriding the global .icon { align-self: center; } behavior specifically for InfoBanner.
Changes:
- Adjusted
InfoBannerleading icon styling toalign-self: flex-start. - Added a one-line-tall height band so the icon visually tracks the first line on wrapped messages.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Issue
Closes #51395
Description
.iconcarriesalign-self: center(frontend/components/Icon/_styles.scss:6), which was overriding the.info-banner__iconcontainer'salign-items: flex-startand pulling every InfoBanner leading icon back to the vertical center whenever the copy wrapped to more than one line (Andrey's "End user is not notified…" repro)..info-banner__leading-iconits ownalign-self: flex-startplus a one-line-tallheightso the 16px svg sits centered inside the first-line band and visually tracks the first line of copy no matter how many lines the message wraps to. Same technique as the toast icon fix in Fleet UI: Align toast icon with first line of message #50449.Screenrecording
Screen.Recording.2026-08-18.at.11.48.44.AM.mov
Testing
Summary by CodeRabbit