Repository navigation
Clamp notification cards to the width the screen has - #11034
SimonSchubert wants to merge 1 commit into
Conversation
7eb0d1e to
511d2c6
Compare
|
Reviewed at 511d2c6 and reproduced on a worker built from the Omarchy ISO, with the shell running from each tree under test. I set its display to 1280x800 portrait at scale 2.5, which is 320 logical pixels wide, and sent a toast. On current
The second opinion, Codex Medium, reviewed the diff and found no actionable defect; it agreed with the approach, and its independence from this review is not guaranteed. It did point out that when the screen is narrower than the gap plus the bar clearance, #12666 fixes the same overflow with Nothing is left for you to do here. This is waiting on the maintainer. |
|
This no longer merges, and the conflict can't be resolved by merging. The bug is still there. I linked current Codex Medium reviewed this separately and agreed on each point: the file is gone, the overflow persists on Next step is the maintainer's call: close this and bring the clamp to the new engine ( |
The deck's cards are 380 wide (up to 560 for one-line toasts) whatever the screen. On a screen narrower than that the deck, anchored right, runs off the left edge, cutting off the card's border and the first characters of every line. Cap each surface's card width at the room between its left and right margins, and give the left edge the same gap as the right, plus the bar's thickness when the bar sits there.
511d2c6 to
73180c7
Compare
[Medium impact] The PR appears safe to merge. SummaryCaps notification cards to the screen width minus both side margins.
No actionable issues found. This review checked code; it did not run tests or the UI. Reviews (1) · Last reviewed commit: "Clamp notification cards to the width th..." · Reviewed by Greptile |
|
On a disposable Omarchy ISO worker at 320 logical pixels wide, Codex High, Opus 5.5 High and muse-wonder via pi, thinking high reviewed the width and margin bindings and found no blocking defects. The second opinions agreed on the geometry, and their independence from this review is not guaranteed. The Tests and Check translation structure workflows still need a maintainer to approve them and let them run. |


What changes
Notification cards overflow any screen narrower than the card. The deck's cards are
Style.space(380)wide (up to 560 for one-line toasts) whatever the screen, and the deck is anchored right, so on a narrow screen it runs off the left edge: the border and the first characters of every line are cut off.This was first written against the old
NotificationCard.qml, which 4671ae2's new engine replaced, so it has been rewritten for the new engine:Delivery.cardWidthLimit(widest, screenWidth, margins)caps a card at the room between the deck's left and right margins, and leaveswidestalone wherever it fits.maxCardWidthpasses through it, and the toast'sbaseWidth(body and button cards) is capped by the same limit, so both the fixed column and one-line cards that fit their text stay on screen.Delivery.deckMarginsnow returns aleftmargin too: the same gap as the right edge, plus the bar's thickness when the bar is on the left.On screens wide enough for the card nothing changes.
Verification
test/shell.d/notifications-test.shpasses.logic.cjsnow checksleftindeckMarginsfor all four bar positions, andcardWidthLimitat a wide screen, at 320 px with the bar on top and on the left, at a fractional width, and at a zero width.test/headless, under a privatedbus-run-session), withHEADLESS-1at 640x480, scale 2 (320 logical px), and sent a toast overorg.freedesktop.Notifications:quattro(94c92b2):hyprctl layersputsomarchy-notificationsat x=-84, w=404. The card's left border and the first letter of each line are off-screen.Screenshots
320 logical px wide, the same toast:
quattro