-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Description
Implement a tag suggestion feature that displays existing tags in a dropdown when users are adding notes or tasks. This will help users select from existing tags instead of typing everything manually, promoting tag consistency across the application.
Requirements
Functionality
- Display a dropdown showing all available tags when the tag input field is focused
- Filter tags in real-time as the user types
- Allow users to select a tag from the dropdown by clicking
- Allow users to type and create a new tag if it's not in the list
- Fetch existing tags from the API endpoint:
${ApiConfig.homeUrl}/tasks/tags - Tags are returned as an array of strings, sorted alphabetically
Constraints
- Tasks and Notes can have only one tag
- The backend is already implemented and ready to receive tags
- No backend changes required
- No unit tests required for this feature
Technical Details
Files to modify:
client/src/views/NoteAdd/index.tsxclient/src/views/TaskAdd/index.tsx
API Integration:
- Endpoint:
${ApiConfig.homeUrl}/tasks/tags - Response format:
string[](array of strings, alphabetically sorted) - Reference: See Home view component for similar API call implementation
UI Framework:
- Bootstrap 5 (no custom components)
- Use Bootstrap dropdown or form components as appropriate
Implementation Suggestions
- Fetch tags when the component mounts or when the input is focused
- Store tags in component state
- Implement filtering logic to match user input against available tags
- Use Bootstrap's dropdown component to display filtered results
- Handle tag selection from dropdown
- Maintain ability to type custom tags not in the list
Acceptance Criteria
- Tag dropdown appears when input field is focused
- Dropdown displays all available tags initially
- Tags are filtered in real-time as user types
- User can select a tag by clicking from the dropdown
- User can still type and submit a custom tag not in the list
- Feature works consistently in both NoteAdd and TaskAdd views
- Selected tag is properly sent to the backend
- No console errors or warnings
Additional Notes
- The backend already supports this feature and requires no changes
- Focus on code reusability between NoteAdd and TaskAdd implementations
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels