Fix: deletion toast Undo button misaligned#2007
Conversation
WalkthroughUpdated toast button classNames in apps/mail/components/ui/toast.tsx: switched justify-center to justify-between and added mr-1 on action/cancel/close buttons. No logic or behavior changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/mail/components/ui/toast.tsx (1)
24-38: Bigger tap targets and focus styles = happier humans.Buttons are
h-5(~20px). WCAG recommends ~44px for comfortable targets. Also add explicit focus-visible styles. Form follows function.Try this minimal bump and focus ring:
- actionButton: '${_btnBase} pointer-events-auto cursor-pointer', - cancelButton: _btnBase, - closeButton: _btnBase, + actionButton: `${_btnBase} h-7 px-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-500 pointer-events-auto cursor-pointer`, + cancelButton: `${_btnBase} h-7 px-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-500`, + closeButton: `${_btnBase} h-7 px-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-blue-500`,Verification checklist:
- Light/dark modes
- With/without icon, and long “Undo” label (i18n)
- Narrow widths to ensure no layout jitter with
shrink-0
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/mail/components/ui/toast.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{css,js,ts,jsx,tsx,mdx}
📄 CodeRabbit inference engine (.cursor/rules/tailwind-css-v4.mdc)
**/*.{css,js,ts,jsx,tsx,mdx}: Chain variants together for composable variants (e.g.,group-has-data-potato:opacity-100).
Use new variants such asstarting,not-*,inert,nth-*,in-*,open(for:popover-open), and**for all descendants.
Do not use deprecated utilities likebg-opacity-*,text-opacity-*,border-opacity-*, anddivide-opacity-*; use the new syntax (e.g.,bg-black/50).
Use renamed utilities:shadow-smis nowshadow-xs,shadowis nowshadow-sm,drop-shadow-smis nowdrop-shadow-xs,drop-shadowis nowdrop-shadow-sm,blur-smis nowblur-xs,bluris nowblur-sm,rounded-smis nowrounded-xs,roundedis nowrounded-sm,outline-noneis nowoutline-hidden.
Usebg-(--brand-color)syntax for CSS variables in arbitrary values instead ofbg-[--brand-color].
Stacked variants now apply left-to-right instead of right-to-left.
Files:
apps/mail/components/ui/toast.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes
Limit lines to 100 characters
Semicolons are required
Files:
apps/mail/components/ui/toast.tsx
**/*.{js,jsx,ts,tsx,css}
📄 CodeRabbit inference engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins
Files:
apps/mail/components/ui/toast.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/mail/components/ui/toast.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cubic · AI code reviewer
Description
When deleting a mail, the Undo button in the deletion toast was misaligned. This caused inconsistent UI alignment and a poor user experience.
Updated the actionButton class by replacing justify-center with justify-between
Type of Change
Please delete options that are not relevant.
Areas Affected
Please check all that apply:
Testing Done
Describe the tests you've done:
Security Considerations
For changes involving data or authentication:
Checklist
Additional Notes
Add any other context about the pull request here.
Screenshots/Recordings
Add screenshots or recordings here if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.
Summary by cubic
Fix misaligned Undo button in the deletion toast by adjusting toast button layout for consistent alignment and spacing. Addresses Linear #2003.
Summary by CodeRabbit