Repository navigation
Two-button toasts wrap their buttons; bell dismiss no longer covers the timestamp - #401
Merged
Merged
Conversation
…ell dismiss replaces the timestamp Sonner lays icon, text and buttons out in one row, so a notification with two actions squeezed its title and body into a narrow column. With a cancel slot present the text takes the full row and the buttons wrap below, right-aligned. The bell card's hover dismiss button sat over the 'time ago' label. The label now fades out while the card is hovered (or the button has keyboard focus), and the button takes its place, aligned with the title row.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #399 and #400. These are layout fixes only; no behaviour changes.
Toast layout
Sonner puts the icon, the text and the buttons in a single flex row. With two actions (Open + Retry, Open settings + Retry, Open + Rebase or merge…), the buttons took about 150px, so the title and body wrapped every few words.
Now, when a toast has a
cancelslot (that is, two buttons):Sonner gives every button an auto start margin, which split the space between the two buttons on their own row. Only the first button keeps it now. One-button toasts are unchanged and stay inline. The change is CSS only, in
globals.css, next to the existing toast description override, with the same specificity prefix.Bell card
The ✕ that appears on hover sat on top of the "time ago" label. Now the label fades out while the card is hovered, or while the ✕ has keyboard focus, and the ✕ takes its place, aligned with the title row. The ✕ also gains an
aria-label.Tested
In
bun run dev(Chrome):bun run ci:localis green. The Linux and Windows app jobs were skipped locally.Not tested
dev:appor a release build).:has()is supported there (Safari 15.4+), but I only checked in Chrome.