Skip to content

Comments

fix: add cursor pointer to all button elements#2009

Merged
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
mohdyasin4:fix/cursor-pointer-on-buttons
Aug 26, 2025
Merged

fix: add cursor pointer to all button elements#2009
ahmetskilinc merged 2 commits intoMail-0:stagingfrom
mohdyasin4:fix/cursor-pointer-on-buttons

Conversation

@mohdyasin4
Copy link
Contributor

@mohdyasin4 mohdyasin4 commented Aug 26, 2025

Description

Fixed cursor pointer behavior on buttons throughout the mail application. Added cursor-pointer class to button elements that were missing proper hover cursor indication, making it clear to users which elements are clickable.

  • Add cursor-pointer to compose button in app-sidebar
  • Add cursor-pointer to three dots menu button in thread-display
  • Add cursor-pointer to hidden labels button in render-labels
  • Add cursor-pointer to clear filters button in mail-list
  • Add cursor-pointer to close dialog button in create-email
  • Add cursor-pointer to voice control buttons
  • Add cursor-pointer to sidebar menu button variants
  • Reorganize cursor-pointer class in button component

Fixes #1992


Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🎨 UI/UX improvement

Areas Affected

  • User Interface/Experience

Testing Done

Describe the tests you've done:

  • Manual testing performed

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

Screenshots/Recordings

Zero.mp4

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


Summary by cubic

Adds pointer cursor to all interactive buttons so click targets are clear across the Mail app. Fixes #1992 by updating missing spots and setting a default in shared components.

  • Bug Fixes
    • Sidebar Compose button
    • Thread three-dots menu
    • Hidden labels “+N” chip
    • Mail list “clear filters”
    • Create email dialog close
    • Voice control buttons
    • Sidebar menu button variants
    • Button component now defaults to cursor-pointer for consistency

Summary by CodeRabbit

  • Style
    • Improved visual affordance of clickable elements by showing a pointer cursor across the mail app.
    • Updates include: compose dialog close button, “clear filters” action in empty state, hidden-labels count trigger, thread options menu trigger, compose button in sidebar, sidebar menu buttons, and both states of the voice button.
    • No functional or behavioral changes; purely presentation/UX polish.

- Add cursor-pointer to compose button in app-sidebar
- Add cursor-pointer to three dots menu button in thread-display
- Add cursor-pointer to hidden labels button in render-labels
- Add cursor-pointer to clear filters button in mail-list
- Add cursor-pointer to close dialog button in create-email
- Add cursor-pointer to voice control buttons
- Add cursor-pointer to sidebar menu button variants
- Reorganize cursor-pointer class in button component

Fixes Mail-0#1992
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 26, 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

Adds the Tailwind class cursor-pointer to multiple interactive UI elements across Mail app components and adjusts base button classes ordering. No logic, state, or API changes.

Changes

Cohort / File(s) Summary
Interactive elements: add cursor-pointer
apps/mail/components/create/create-email.tsx, apps/mail/components/mail/mail-list.tsx, apps/mail/components/mail/render-labels.tsx, apps/mail/components/mail/thread-display.tsx, apps/mail/components/ui/app-sidebar.tsx, apps/mail/components/ui/sidebar.tsx, apps/mail/components/voice-button.tsx
Add Tailwind cursor-pointer to buttons/menu triggers/tooltip triggers; presentation-only changes.
Base button variants tweak
apps/mail/components/ui/button.tsx
Reorder utility classes in buttonVariants to include cursor-pointer earlier; no functional change.

Sequence Diagram(s)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Assessment against linked issues

Objective Addressed Explanation
Cursor changes to pointer on buttons across the app (#1992) Several components updated, but not verified across all buttons. Scope coverage uncertain.

Assessment against linked issues: Out-of-scope changes

Possibly related PRs

Suggested labels

design

Suggested reviewers

  • MrgSub
  • nizzyabi
  • ahmetskilinc

Poem

Click, click—rockets lift with flair,
Tiny cursors point everywhere.
Buttons now signal, clear as light,
Hand icons say, “Yeah, tap right.”
UX boost, minimal thrust—
Ship it fast; in pointers we trust. 🚀🖱️

✨ Finishing Touches
🧪 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 added the design Improvements & changes to design & UX label Aug 26, 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: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
apps/mail/components/create/create-email.tsx (1)

212-218: Add button type on DialogClose trigger

Explicit is better than implicit. Prevents unintended form submission and fixes the Biome finding.

Apply this diff:

-              <button className="dark:bg-panelDark flex items-center gap-1 rounded-lg bg-[#F0F0F0] px-2 py-1.5 cursor-pointer">
+              <button type="button" className="dark:bg-panelDark flex items-center gap-1 rounded-lg bg-[#F0F0F0] px-2 py-1.5 cursor-pointer">
apps/mail/components/ui/app-sidebar.tsx (1)

202-215: Add type='button' + aria-label for the Compose trigger — prevents accidental form submits and improves SR UX

Let’s make this bulletproof. Without an explicit type, a button defaults to submit inside forms. Also, when collapsed, the trigger is icon-only, so give it an accessible name.

Apply this diff:

       <DialogTrigger asChild>
-        <button className="relative mb-1.5 inline-flex h-8 w-full items-center justify-center gap-1 self-stretch overflow-hidden rounded-lg border border-gray-200 bg-[#006FFE] text-black dark:border-none dark:text-white cursor-pointer">
+        <button
+          type="button"
+          aria-label={state === 'collapsed' && !isMobile ? m['common.commandPalette.commands.newEmail']() : undefined}
+          className="relative mb-1.5 inline-flex h-8 w-full items-center justify-center gap-1 self-stretch overflow-hidden rounded-lg border border-gray-200 bg-[#006FFE] text-black dark:border-none dark:text-white cursor-pointer"
+        >
           {state === 'collapsed' && !isMobile ? (
             <PencilCompose className="mt-0.5 fill-white text-black" />
           ) : (
apps/mail/components/voice-button.tsx (2)

32-37: Icon-only button needs an accessible name; also fix Tailwind arbitrary color typo

Right now SRs will announce nothing useful here. Add an aria-label (and a title for hover) and fix dark:bg[#141414]dark:bg-[#141414].

-        <button type="button" onClick={handleStartConversation} className="cursor-pointer">
-          <div className="dark:bg[#141414] flex h-7 items-center justify-center rounded-sm bg-[#262626] px-2">
+        <button
+          type="button"
+          onClick={handleStartConversation}
+          aria-label="Start voice"
+          title="Start voice"
+          className="cursor-pointer"
+        >
+          <div className="dark:bg-[#141414] flex h-7 items-center justify-center rounded-sm bg-[#262626] px-2">
             <Mic className="h-4 w-4 text-white dark:text-[#929292]" />
           </div>
         </button>

43-58: Same story for the “connected” state: add aria-label and fix the dark bg class

Let’s keep accessibility and styling consistent under all states.

-      <button type="button" onClick={endConversation} className="cursor-pointer">
-        <div className="dark:bg[#141414] flex h-7 items-center justify-center rounded-sm bg-[#262626] px-2">
+      <button
+        type="button"
+        onClick={endConversation}
+        aria-label="End voice"
+        title="End voice"
+        className="cursor-pointer"
+      >
+        <div className="dark:bg-[#141414] flex h-7 items-center justify-center rounded-sm bg-[#262626] px-2">
           {isInitializing && (
             <div className="flex items-center justify-center gap-2">
               <Loader2 className="h-4 w-4 animate-spin" />
             </div>
           )}
📜 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 9365ef2 and 6332e85.

📒 Files selected for processing (8)
  • apps/mail/components/create/create-email.tsx (1 hunks)
  • apps/mail/components/mail/mail-list.tsx (1 hunks)
  • apps/mail/components/mail/render-labels.tsx (1 hunks)
  • apps/mail/components/mail/thread-display.tsx (1 hunks)
  • apps/mail/components/ui/app-sidebar.tsx (1 hunks)
  • apps/mail/components/ui/button.tsx (1 hunks)
  • apps/mail/components/ui/sidebar.tsx (1 hunks)
  • apps/mail/components/voice-button.tsx (2 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/mail/mail-list.tsx
  • apps/mail/components/mail/render-labels.tsx
  • apps/mail/components/voice-button.tsx
  • apps/mail/components/create/create-email.tsx
  • apps/mail/components/ui/app-sidebar.tsx
  • apps/mail/components/mail/thread-display.tsx
  • apps/mail/components/ui/sidebar.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/mail/mail-list.tsx
  • apps/mail/components/mail/render-labels.tsx
  • apps/mail/components/voice-button.tsx
  • apps/mail/components/create/create-email.tsx
  • apps/mail/components/ui/app-sidebar.tsx
  • apps/mail/components/mail/thread-display.tsx
  • apps/mail/components/ui/sidebar.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/mail/mail-list.tsx
  • apps/mail/components/mail/render-labels.tsx
  • apps/mail/components/voice-button.tsx
  • apps/mail/components/create/create-email.tsx
  • apps/mail/components/ui/app-sidebar.tsx
  • apps/mail/components/mail/thread-display.tsx
  • apps/mail/components/ui/sidebar.tsx
  • apps/mail/components/ui/button.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENT.md)

Enable TypeScript strict mode

Files:

  • apps/mail/components/mail/mail-list.tsx
  • apps/mail/components/mail/render-labels.tsx
  • apps/mail/components/voice-button.tsx
  • apps/mail/components/create/create-email.tsx
  • apps/mail/components/ui/app-sidebar.tsx
  • apps/mail/components/mail/thread-display.tsx
  • apps/mail/components/ui/sidebar.tsx
  • apps/mail/components/ui/button.tsx
🧠 Learnings (1)
📚 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/voice-button.tsx
🪛 Biome (2.1.2)
apps/mail/components/mail/mail-list.tsx

[error] 971-971: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

apps/mail/components/mail/render-labels.tsx

[error] 54-54: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

apps/mail/components/create/create-email.tsx

[error] 212-212: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

apps/mail/components/ui/app-sidebar.tsx

[error] 203-203: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

apps/mail/components/mail/thread-display.tsx

[error] 876-876: Provide an explicit type prop for the button element.

The default type of a button is submit, which causes the submission of a form when placed inside a form element. This is likely not the behaviour that you want inside a React application.
Allowed button types are: submit, button or reset

(lint/a11y/useButtonType)

⏰ 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.

1 issue found across 8 files

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 bbc3cc0 into Mail-0:staging Aug 26, 2025
2 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.

Cursor doesn’t change to pointer on buttons

2 participants