Skip to content

fix(ui): add cursor-pointer to interactive elements (#1003)#1093

Open
Yaohua-Leo wants to merge 1 commit intof:mainfrom
Yaohua-Leo:fix/1003-cursor-pointer
Open

fix(ui): add cursor-pointer to interactive elements (#1003)#1093
Yaohua-Leo wants to merge 1 commit intof:mainfrom
Yaohua-Leo:fix/1003-cursor-pointer

Conversation

@Yaohua-Leo
Copy link

@Yaohua-Leo Yaohua-Leo commented Mar 21, 2026

Summary

Fixes #1003 - Adds cursor: pointer to various interactive elements for better UX and accessibility.

Changes

Header

  • Theme toggle button
  • Language selector button (logged out users)
  • Language selector menu item (logged in users)

Prompts Page

  • Upvote button (all sizes: circular, sm, default)
  • Copy prompt button
  • Run prompt button (mobile and desktop)
  • Platform selection buttons (mobile sheet)
  • Chat/Code tab buttons
  • Dropdown sub-menu triggers
  • Clear filters button

Promptmasters Page

  • Sort by button (total/per prompt toggle)
  • Tabs (All Time, This Month, This Week)

UI Components

  • TabsTrigger (shared component)

CSS

  • Added .cursor-pointer utility class to globals.css

Testing

All modified components are interactive elements that should show cursor pointer. No breaking changes - purely visual enhancement that improves accessibility by indicating clickable elements.

Summary by CodeRabbit

  • Style
    • Added pointer cursor styling to interactive elements including buttons, dropdowns, and tabs throughout the application to improve visual feedback and interface clarity.

Add cursor: pointer to various interactive elements for better UX:

Header:
- Theme toggle button
- Language selector button (logged out)
- Language selector menu item (logged in)

Prompts page:
- Upvote button (all sizes)
- Copy prompt button
- Run prompt button (mobile & desktop)
- Platform selection buttons (mobile)
- Chat/Code tab buttons
- Dropdown sub-menu triggers
- Clear filters button

Promptmasters page:
- Sort by button (total/per prompt)
- Tabs (All Time, This Month, This Week)

Also added .cursor-pointer utility class to globals.css

Fixes f#1003
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

A new cursor-pointer CSS utility class is introduced and applied across multiple interactive UI components including buttons, dropdowns, and tabs to provide visual feedback indicating clickable elements.

Changes

Cohort / File(s) Summary
Core Utility
src/app/globals.css
Added .cursor-pointer utility class with cursor: pointer property in utilities layer.
Navigation Components
src/components/layout/header.tsx
Applied cursor-pointer class to theme toggle button, language submenu trigger, and language selector button.
UI Primitives
src/components/ui/tabs.tsx
Updated TabsTrigger component to include cursor-pointer utility in className.
Prompts Page Components
src/components/prompts/copy-button.tsx, src/components/prompts/prompt-filters.tsx, src/components/prompts/run-prompt-button.tsx, src/components/prompts/upvote-button.tsx
Applied cursor-pointer class to multiple interactive elements: copy button, clear filters button, platform options, menu triggers, tab buttons, run button, and upvote controls.
Promptmasters Page
src/components/promptmasters/promptmasters-content.tsx
Added cursor-pointer class to sort mode toggle button.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A cursor points where fingers may click,
From buttons bright to toggles quick—
The rabbit knows what users need:
A pointer's promise, action's creed!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(ui): add cursor-pointer to interactive elements' clearly and concisely describes the main change across all modified files.
Linked Issues check ✅ Passed The PR implementation addresses all coding objectives from issue #1003: cursor-pointer added to theme toggle, language selector, upvote button, copy button, run button, filter controls, sort button, and tabs.
Out of Scope Changes check ✅ Passed All changes are directly related to adding cursor-pointer styling to interactive elements as specified in issue #1003; no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

Copy link

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

🧹 Nitpick comments (1)
src/app/globals.css (1)

141-145: Consider removing redundant utility class.

Tailwind CSS already provides a built-in cursor-pointer utility class out of the box. This custom definition duplicates existing functionality and can be safely removed. All the className="cursor-pointer" usages throughout the PR will continue to work with Tailwind's native utility.

♻️ Suggested removal
 `@layer` utilities {
   /* Dense text utilities */
   .text-balance {
     text-wrap: balance;
   }
   
   /* Gradient text animation */
   .animate-gradient-text {
     animation: gradient-flow 20s ease infinite;
   }
-  
-  /* Cursor pointer for interactive elements (`#1003`) */
-  .cursor-pointer {
-    cursor: pointer;
-  }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/globals.css` around lines 141 - 145, Remove the redundant custom CSS
rule for the .cursor-pointer class in globals.css because Tailwind already
supplies the same utility; locate the .cursor-pointer block and delete that rule
so existing className="cursor-pointer" usages continue to rely on Tailwind's
native utility without duplication.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/app/globals.css`:
- Around line 141-145: Remove the redundant custom CSS rule for the
.cursor-pointer class in globals.css because Tailwind already supplies the same
utility; locate the .cursor-pointer block and delete that rule so existing
className="cursor-pointer" usages continue to rely on Tailwind's native utility
without duplication.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0b33893e-5949-4ac1-ac8a-8b3045f245f0

📥 Commits

Reviewing files that changed from the base of the PR and between 08e85a3 and 6bd50fd.

📒 Files selected for processing (8)
  • src/app/globals.css
  • src/components/layout/header.tsx
  • src/components/promptmasters/promptmasters-content.tsx
  • src/components/prompts/copy-button.tsx
  • src/components/prompts/prompt-filters.tsx
  • src/components/prompts/run-prompt-button.tsx
  • src/components/prompts/upvote-button.tsx
  • src/components/ui/tabs.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report: Missing cursor: pointer CSS properties on Categories, Tags, Language Selector etc.

1 participant