Repository navigation
Improve toast layout - #7734
Improve toast layout#7734
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a625831de
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [data-sonner-toast][data-styled='true'].chat-model-loaded-toast { | ||
| padding-top: 14px !important; | ||
| padding-bottom: 14px !important; | ||
| [data-sonner-toast][data-styled='true']:has([data-button]) { |
There was a problem hiding this comment.
Include cancel-only toasts in the grid layout
When a toast uses Sonner's cancel option without an action (for example the model-loading toast in use-chat-model-runtime.ts and the document-indexing wait toast), Sonner renders the button as [data-cancel], not [data-button]. Because this new grid layout only applies to :has([data-button]) and the old absolute [data-cancel] positioning was removed, those cancel-only toasts keep the default inline layout and long progress/descriptive text can still compete with the Cancel button—the regression this change is trying to fix.
Useful? React with 👍 / 👎.
| tooltip={transcribing === "stop" ? "Transcribing…" : "Stop recording"} | ||
| aria-label="Stop recording" | ||
| variant="ghost" | ||
| onClick={discard} | ||
| className="size-8 rounded-full text-muted-foreground hover:text-foreground" | ||
| onClick={stop} | ||
| disabled={transcribing !== null} |
There was a problem hiding this comment.
Keep a visible discard path for touch users
On touch-only/mobile sessions there is no Escape key, so after this button changed from discard to stop, the recording bar only offers actions that transcribe the audio (and non-empty transcripts are also saved to Recent dictations). That removes the previous way to abandon an accidental or private recording without saving/transcribing it; please keep a visible discard/cancel control or expose an equivalent non-keyboard path.
Useful? React with 👍 / 👎.
The import-hoist step diffed $MERGE_BASE against HEAD. On a pull_request event HEAD is refs/pull/N/merge, so that range spans every base commit since the branch point, and the step lints files the PR never touched. It fails PRs that change no Python at all. #7734 touches only TypeScript and CSS and was failed by 3 blockers from #6880; the run reported "checking 78 file(s)". Pin the AFTER end to the PR head SHA so the range is the PR's own commits. The head is fetched via refs/pull/N/head, which exists for fork PRs too, and the verifier reads revisions with git show, so the shallow clone stands. A failure here also short-circuits the rest of the job, so every later lint step (debugger calls, shell parse, YAML/JSON parse, codespell, shellcheck, ruff format) is skipped. Co-authored-by: danielhanchen <[email protected]>
Lay toasts out on a grid so a long message and its action button get their own rows instead of competing for one, and drop the absolute positioning the cancel button used to need. The model loading toast keeps its dedicated progress bar spacing from unslothai#7683. The Firefox voice typing toast now uses Sonner's action instead of a hand rolled button in the description, so it flows through the same layout.
8a62583 to
77cac7e
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
actionrather than a hand rolled button inside the description, so it flows through the same layout.Notes
The composer spacing and send icon work that was originally on this branch has been dropped, so this is toast only now. #7683 has landed in
main, so the diff is just the three files above.Validation
npm run typecheck,npm test(242 passing) andnpm run buildinstudio/frontend.