Skip to content

refactor: improve filters UX #940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Aug 16, 2025

Related to #930

Before:-

  • When you hover over items the cursor was on default mode even though item was clickable
Screen.Recording.2025-08-16.at.9.42.59.PM.mov
  • If you select an option from customer filter then the complete filter container would have and there is some space before the label which doesn't look good

Screenshot 2025-08-16 at 9 53 11 PM

After:-

Cursor becomes pointer when you hover over dropdown items as items are clickable

Added checkbox instead of whitespace which also helps indicate user that multiple items can be selected for filtering

Screen.Recording.2025-08-16.at.9.58.32.PM.mov

Summary by CodeRabbit

  • Style
    • Dropdown menu items now show a pointer cursor to better indicate clickability.
    • Customer filter uses native checkboxes for clearer selection state, improved accessibility, and isolated click handling.
    • Conversation filters alignment adjusted for more consistent horizontal layout across screen sizes.

Copy link

vercel bot commented Aug 16, 2025

@Udit-takkar is attempting to deploy a commit to the Antiwork Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Aug 16, 2025

Walkthrough

This PR makes UI-only presentation changes: removes center justification in ConversationFilters, replaces a check icon with a native checkbox in CustomerFilter (preserving selection logic), and changes dropdown menu items’ cursor to pointer. No public APIs or data flows were modified.

Changes

Cohort / File(s) Summary
Conversation Filters
app/(dashboard)/[category]/list/conversationFilters.tsx
Removed justify-center class from the container div, altering horizontal alignment of children; layout, props, and handlers unchanged.
Customer Filter
app/(dashboard)/[category]/list/filters/customerFilter.tsx
Replaced lucide-react Check icon with a native <input type="checkbox"> bound to selection state; added aria-label and onClick={(e) => e.stopPropagation()} on the checkbox. Selection logic and data flow unchanged.
Dropdown Menu Components
components/ui/dropdown-menu.tsx
Updated className for DropdownMenuItem, DropdownMenuCheckboxItem, and DropdownMenuRadioItem from cursor-default to cursor-pointer; purely presentational.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • binary-koan

Poem

I’m a rabbit with a tiny patch of code,
I swapped a check for a checkbox on the road.
Cursors now point, and filters shift a mite,
A subtle tweak — the UI feels light.
I twitch, I hop — deploy and bite the byte! 🥕🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
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 240e1dc and 85e6f2e.

📒 Files selected for processing (1)
  • app/(dashboard)/[category]/list/filters/customerFilter.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/(dashboard)/[category]/list/filters/customerFilter.tsx
✨ 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.

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: 1

🧹 Nitpick comments (1)
components/ui/dropdown-menu.tsx (1)

87-91: Pointer cursor on menu items: good UX improvement; consider aligning SubTrigger too

The cursor-pointer updates on Item, CheckboxItem, and RadioItem align with user expectations for clickable rows.

For consistency, DropdownMenuSubTrigger (Line 27) still uses cursor-default. Consider switching it to cursor-pointer as well so all clickable rows share the same hover affordance.

Example update outside the changed hunk:

className={cn(
  "flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
  inset && "pl-8",
  className,
)}

Also applies to: 106-109, 132-135

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
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 196245c and 240e1dc.

📒 Files selected for processing (3)
  • app/(dashboard)/[category]/list/conversationFilters.tsx (1 hunks)
  • app/(dashboard)/[category]/list/filters/customerFilter.tsx (2 hunks)
  • components/ui/dropdown-menu.tsx (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.tsx

📄 CodeRabbit Inference Engine (.cursorrules)

Name component files in lowerCamelCase, e.g. conversationList.tsx

Files:

  • app/(dashboard)/[category]/list/conversationFilters.tsx
  • components/ui/dropdown-menu.tsx
  • app/(dashboard)/[category]/list/filters/customerFilter.tsx
🧠 Learnings (1)
📚 Learning: 2025-05-14T01:59:31.051Z
Learnt from: MJomaa
PR: antiwork/helper#351
File: app/(marketing)/help/page.tsx:49-50
Timestamp: 2025-05-14T01:59:31.051Z
Learning: In Next.js applications using Tailwind and shadcn/ui, apply button styles directly to Link components using `className={cn(buttonVariants(...))}` rather than nesting Button components inside Links with passHref. This pattern reduces component nesting and is the preferred approach for creating button-styled links.

Applied to files:

  • components/ui/dropdown-menu.tsx
🔇 Additional comments (1)
app/(dashboard)/[category]/list/conversationFilters.tsx (1)

126-126: Alignment change LGTM

Removing justify-center matches the PR objective and will left-align the filter row content. No logic changes introduced.

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.

1 participant