Skip to content

Comments

Fix: deletion toast Undo button misaligned#2007

Merged
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
pryxnsu:fix/toast-btn
Aug 25, 2025
Merged

Fix: deletion toast Undo button misaligned#2007
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
pryxnsu:fix/toast-btn

Conversation

@pryxnsu
Copy link
Contributor

@pryxnsu pryxnsu commented Aug 25, 2025

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.

  • 🐛 Bug fix (non-breaking change which fixes an issue)

Areas Affected

Please check all that apply:

  • Email Integration (Gmail, IMAP, etc.)
  • User Interface/Experience
  • Authentication/Authorization
  • Data Storage/Management
  • API Endpoints
  • Documentation
  • Testing Infrastructure
  • Development Workflow
  • Deployment/Infrastructure

Testing Done

Describe the tests you've done:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Security Considerations

For changes involving data or authentication:

  • No sensitive data is exposed
  • Authentication checks are in place
  • Input validation is implemented
  • Rate limiting is considered (if applicable)

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix/feature works
  • All tests pass locally
  • Any dependent changes are merged and published

Additional Notes

Add any other context about the pull request here.

Screenshots/Recordings

Add screenshots or recordings here if applicable.
image


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.

  • Bug Fixes
    • Replaced justify-center with justify-between for action, cancel, and close buttons.
    • Added mr-1 to these buttons to prevent crowding in the toast.

Summary by CodeRabbit

  • Style
    • Improved alignment and spacing of action, cancel, and close buttons in toast notifications for clearer layout.
    • Enhanced visual balance and readability without altering colors, sizes, or existing styling themes.
    • No changes to behavior, loading states, icons, or error handling.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

Updated 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

Cohort / File(s) Summary
Toast UI styles
apps/mail/components/ui/toast.tsx
Adjusted button classNames for action/cancel/close to use justify-between and add mr-1; preserved existing styles; no control-flow or state changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Possibly related PRs

Suggested labels

design

Suggested reviewers

  • ahmetskilinc
  • MrgSub

Poem

Little toasts now spread their wings,
Buttons spaced like Saturn’s rings.
Justify-between, margins tight,
Tiny tweak, cleaner sight.
Ship it fast—onwards, light-speed flight. 🚀

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai bot requested review from MrgSub and ahmetskilinc August 25, 2025 21:31
@coderabbitai coderabbitai bot added the design Improvements & changes to design & UX label Aug 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 906a02c and 681675e.

📒 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 as starting, not-*, inert, nth-*, in-*, open (for :popover-open), and ** for all descendants.
Do not use deprecated utilities like bg-opacity-*, text-opacity-*, border-opacity-*, and divide-opacity-*; use the new syntax (e.g., bg-black/50).
Use renamed utilities: shadow-sm is now shadow-xs, shadow is now shadow-sm, drop-shadow-sm is now drop-shadow-xs, drop-shadow is now drop-shadow-sm, blur-sm is now blur-xs, blur is now blur-sm, rounded-sm is now rounded-xs, rounded is now rounded-sm, outline-none is now outline-hidden.
Use bg-(--brand-color) syntax for CSS variables in arbitrary values instead of bg-[--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

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@ahmetskilinc ahmetskilinc merged commit 9365ef2 into Mail-0:staging Aug 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design Improvements & changes to design & UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants