Skip to content

Conversation

@ShivaGupta-14
Copy link
Contributor

@ShivaGupta-14 ShivaGupta-14 commented Nov 20, 2025

Description

This PR introduces a new TagSelector component that enhances the tagging workflow across the application.
The previous free-text tag input has been replaced with a searchable multi-select dropdown that also supports creating new tags directly from the selector.

Key Changes

  • New TagSelector Component

    • Adds a searchable dropdown to quickly find existing tags.
    • Supports selecting multiple tags with a clean UI.
    • Includes the ability to create new tags when no matching tag exists.
  • Integration in Task Dialogs

    • Replaced manual tag entry fields in Add Task and Edit Task dialogs.
    • Ensures consistent tagging behavior across the app.
  • Tag Management Improvements

    • Integrates existing user-defined tags (uniqueTags) into the selector.
    • Prevents inconsistent or typo-prone tags by removing free-text inputs.
  • Popover Fix

    • Removed Popover.Portal because it caused cursor detection and interaction issues when the selector was used inside dialogs.
  • Testing

    • Updated unit tests to mock TagSelector.
    • Added checks verifying:
      • New tag creation flow
      • Proper tag selection state updates
      • Correct rendering of existing tags

Checklist

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Video : Link

Screenshots :

Screenshot 2025-11-20 at 5 33 15 PM Screenshot 2025-11-20 at 5 33 27 PM Screenshot 2025-11-20 at 5 33 40 PM

};

// Handle adding a tag
const handleAddTag = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code was removed because we no longer use the manual tag-input flow.

The new TagSelector component now handles all tag interactions - searching, selecting, creating, and toggling tags, so the previous tagInput state and handleAddTag() function were unused.

Removing this avoids duplicated logic and keeps the tagging workflow unified under the new component. and I thought this one is a good way.

@@ -0,0 +1,138 @@
import * as React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

i dont think this file belongs here, as these are mostly auto-generated via shadcn, is this from shadcn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This component isn’t auto-generated by shadcn - it’s a custom UI component I built using shadcn primitives (popover, command, button, etc.).

Since it behaves like our other reusable UI components (such as multiSelect.tsx and date-picker.tsx), it fits naturally inside the components/ui folder.

That’s why I placed tagSelector.tsx there.

Copy link
Collaborator

@its-me-abhishek its-me-abhishek left a comment

Choose a reason for hiding this comment

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

Please fix

Copy link
Contributor Author

@ShivaGupta-14 ShivaGupta-14 left a comment

Choose a reason for hiding this comment

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

@its-me-abhishek Thanks for the review! I’ve responded to the inline comments with my reasoning, but I’m open to any suggestions if you feel a different approach or structure would work better.

};

// Handle adding a tag
const handleAddTag = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code was removed because we no longer use the manual tag-input flow.

The new TagSelector component now handles all tag interactions - searching, selecting, creating, and toggling tags, so the previous tagInput state and handleAddTag() function were unused.

Removing this avoids duplicated logic and keeps the tagging workflow unified under the new component. and I thought this one is a good way.

@@ -0,0 +1,138 @@
import * as React from 'react';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This component isn’t auto-generated by shadcn - it’s a custom UI component I built using shadcn primitives (popover, command, button, etc.).

Since it behaves like our other reusable UI components (such as multiSelect.tsx and date-picker.tsx), it fits naturally inside the components/ui folder.

That’s why I placed tagSelector.tsx there.

@ShivaGupta-14 ShivaGupta-14 force-pushed the feat/210-tag-dropdown-selection branch 4 times, most recently from 8fec9c4 to cff668e Compare November 25, 2025 12:01
Implemented new TagSelector component with searchable dropdown and create-tag support.
Replaced manual tag input in Add Task and Edit Task dialogs.
Integrated existing user-defined tags (uniqueTags) into the selector.
Removed Popover.Portal to fix cursor and interaction issues inside dialogs.
Updated tests to mock TagSelector and verify new tag state updates.

Improves tagging UX and prevents inconsistent or typo-prone tags.

Fixes: CCExtractor#210
@ShivaGupta-14 ShivaGupta-14 force-pushed the feat/210-tag-dropdown-selection branch from cff668e to ec2cec0 Compare November 28, 2025 22:05
@ShivaGupta-14 ShivaGupta-14 force-pushed the feat/210-tag-dropdown-selection branch from ec2cec0 to 46b78b3 Compare November 28, 2025 22:06
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.

Reusable tags for Editing or Adding a task

2 participants