Skip to content

Comments

cleanup of ui elements#1999

Merged
ahmetskilinc merged 7 commits intostagingfrom
08-20-cleanup_of_ui_elements
Aug 22, 2025
Merged

cleanup of ui elements#1999
ahmetskilinc merged 7 commits intostagingfrom
08-20-cleanup_of_ui_elements

Conversation

@ahmetskilinc
Copy link
Contributor

@ahmetskilinc ahmetskilinc commented Aug 22, 2025

READ CAREFULLY THEN REMOVE

Remove bullet points that are not relevant.

PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.

  • Pull requests that do not follow these guidelines will be closed without review or comment.
  • If you use AI to write your PR description your pr will be close without review or comment.
  • If you are unsure about anything, feel free to ask for clarification.

Description

Please provide a clear description of your changes.


Type of Change

Please delete options that are not relevant.

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature with breaking changes)
  • 📝 Documentation update
  • 🎨 UI/UX improvement
  • 🔒 Security enhancement
  • ⚡ Performance improvement

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.


By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.


Summary by cubic

Fixes the Button variant configuration and cleans up the NavUser UI. Variants now apply correctly, avatar sizing is consistent, and add-connection actions use the shared Button with better hover/active styles.

  • Bug Fixes

    • Button: pass variants config to cva to restore variant/size styling.
  • Refactors

    • Replace ad-hoc add-connection button with shared Button; add light/dark hover styles.
    • Increase Avatar from size-6 to size-7 for consistency.
    • Simplify active-account outline classes (remove redundant "outline").

Summary by CodeRabbit

  • New Features

    • New “dropdownItem” variant and size for buttons, enabling consistent styling of dropdown items across the app.
  • Style

    • Simplified active-item outlines for cleaner focus states.
    • Increased avatar sizes (e.g., active account from 6 to 7) for better visibility.
    • Improved dark mode check indicator styling.
    • Replaced inline buttons with the Button component in connection and pricing actions, enlarging hit areas and unifying hover/pressed states (including dark mode).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Added a new dropdownItem variant and size to the shared Button component and updated NavUser to use Button for certain actions, along with class and size tweaks for avatars, outlines, and dark-mode styles. No functional logic changes; adjustments are presentational and component substitution.

Changes

Cohort / File(s) Summary
UI Button component updates
apps/mail/components/ui/button.tsx
Added dropdownItem to buttonVariants for variant and size. ButtonProps implicitly expanded via VariantProps. Minor render and class reformatting; no behavioral logic changes.
NavUser styling and Button adoption
apps/mail/components/ui/nav-user.tsx
Replaced inner plain buttons with Button component for add-connection and pricing actions. Tweaked outlines, avatar sizes (to size-7), dark-mode check indicator background, and hover styles. No control-flow changes.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Minor Fixes #1343 — Also modifies the shared Button component; overlaps with variant/props usage.
  • fix #996 — Changes the same NavUser component to integrate pricing dialog; adjacent to current pricing button updates.
  • Staging #929 — Adjusts NavUser avatars/display; intersects with current avatar sizing/styling edits.

Suggested labels

design

Suggested reviewers

  • nizzyabi
  • MrgSub
  • needleXO

Poem

New buttons land with stealthy grace,
Dropdown dreams in a sleeker space.
Avatars grow, outlines align,
Dark mode whispers, “looking fine.”
Clicks feel crisp, UX sublime—
Tiny tweaks, rocket-time. 🚀

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 08-20-cleanup_of_ui_elements

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.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ahmetskilinc ahmetskilinc marked this pull request as ready for review August 22, 2025 12:46
@coderabbitai coderabbitai bot requested review from MrgSub and nizzyabi August 22, 2025 12:48
@coderabbitai coderabbitai bot added the design Improvements & changes to design & UX label Aug 22, 2025
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.

1 issue found across 2 files

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

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 (2)
apps/mail/components/ui/button.tsx (1)

20-22: Tailwind v4 renames: use outline-hidden, not outline-none; also prefer rounded-xs over rounded-sm

We’re shipping v4 conventions. outline-noneoutline-hidden; rounded-smrounded-xs per guidelines. Minor, but it prevents subtle focus-style regressions and keeps the design system consistent.

Apply this diff:

-        dropdownItem:
-          'cursor-default select-none gap-2 rounded-sm text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground hover:bg-accent',
+        dropdownItem:
+          'cursor-default select-none gap-2 rounded-xs text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground hover:bg-accent',
apps/mail/components/ui/nav-user.tsx (1)

448-450: Color token consistency in dark mode

Swapping dark:bg-[#141414] to dark:bg-black changes contrast and may diverge from your DS tokens. Prefer a semantic token or stick to the existing neutral if that was intentional.

If there’s a neutral like bg-muted/bg-background for dark, align to that. Otherwise, confirm with design.

♻️ Duplicate comments (2)
apps/mail/components/ui/nav-user.tsx (2)

510-515: Heads-up: your Button classes won’t apply until the Button merge bug is fixed

These custom classes rely on className being merged. Right now, due to the CVA merge issue in Button, none of these styles will land. After fixing Button, this block looks good.

No action here; just re-check visuals once the Button fix is in.


520-521: Same as above for the pricing button

Custom hover/DM classes will be ignored until the Button composition fix lands. Re-verify after the fix.

📜 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 a164e86 and 015a310.

📒 Files selected for processing (2)
  • apps/mail/components/ui/button.tsx (3 hunks)
  • apps/mail/components/ui/nav-user.tsx (3 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/nav-user.tsx
  • apps/mail/components/ui/button.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/nav-user.tsx
  • apps/mail/components/ui/button.tsx
**/*.{js,jsx,ts,tsx,css}

📄 CodeRabbit inference engine (AGENT.md)

Use Prettier with sort-imports and Tailwind plugins

Files:

  • apps/mail/components/ui/nav-user.tsx
  • apps/mail/components/ui/button.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENT.md)

Enable TypeScript strict mode

Files:

  • apps/mail/components/ui/nav-user.tsx
  • apps/mail/components/ui/button.tsx
🧠 Learnings (2)
📚 Learning: 2025-05-07T16:55:46.513Z
Learnt from: danteissaias
PR: Mail-0/Zero#902
File: apps/mail/components/connection/add.tsx:77-77
Timestamp: 2025-05-07T16:55:46.513Z
Learning: For the "Upgrade" link in AddConnectionDialog, using a proper <button> element instead of a <span> with onClick is recognized as an accessibility improvement but was deferred as out of scope in PR #902 (CSS variables PR).

Applied to files:

  • apps/mail/components/ui/nav-user.tsx
📚 Learning: 2025-08-03T20:42:04.207Z
Learnt from: CR
PR: Mail-0/Zero#0
File: .cursor/rules/tailwind-css-v4.mdc:0-0
Timestamp: 2025-08-03T20:42:04.207Z
Learning: Applies to **/*.{css,js,ts,jsx,tsx,mdx} : Chain variants together for composable variants (e.g., `group-has-data-potato:opacity-100`).

Applied to files:

  • apps/mail/components/ui/button.tsx
🧬 Code graph analysis (1)
apps/mail/components/ui/nav-user.tsx (2)
apps/mail/components/icons/icons.tsx (1)
  • Plus (1587-1598)
apps/mail/components/connection/add.tsx (1)
  • AddConnectionDialog (21-144)
⏰ 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
🔇 Additional comments (1)
apps/mail/components/ui/nav-user.tsx (1)

395-401: Avatar size bump looks good — confirm layout in tight widths

size-7 improves consistency; just sanity-check truncation/overflow at min sidebar widths to avoid layout jitter.

You could snapshot-test this at the two sidebar breakpoints if you have visual tests.

ahmetskilinc and others added 4 commits August 22, 2025 13:53
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@ahmetskilinc ahmetskilinc merged commit e67c76a into staging Aug 22, 2025
5 of 6 checks passed
@ahmetskilinc ahmetskilinc deleted the 08-20-cleanup_of_ui_elements branch August 22, 2025 13:00
@qasimstatic
Copy link

Great work ahmet ;)

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