Skip to content

Add search functionality to calendar with icon toggle and yellow highlighting#440

Merged
ideav merged 3 commits intomainfrom
issue-439-c50d21fb2311
Feb 12, 2026
Merged

Add search functionality to calendar with icon toggle and yellow highlighting#440
ideav merged 3 commits intomainfrom
issue-439-c50d21fb2311

Conversation

@konard
Copy link
Copy Markdown
Collaborator

@konard konard commented Feb 12, 2026

🔍 Search Functionality for Calendar

This pull request implements a comprehensive search feature for the calendar page as requested in issue #439.

📋 Issue Reference

Fixes #439

✨ Features Implemented

  1. Search Icon Display

    • Added a search icon (🔍) next to the "Today" button in the FullCalendar toolbar
    • Matches the existing button styling and theme
  2. Toggle Behavior

    • Clicking the search icon shows the search input field and hides the icon
    • The search input automatically receives focus when displayed
    • When focus is lost and the input is empty, the field is hidden and icon is shown again
  3. Search Input with Close Button

    • Search input field with placeholder "Поиск по задачам..."
    • Close icon (✕) button next to the input to manually hide the search
    • Real-time search as user types (no need to press Enter)
  4. Comprehensive Search

    • Searches across all task fields:
      • Task name (Задача)
      • Description (Описание)
      • Client (Клиент)
      • Executor (Исполнитель)
      • Status (Статус)
      • Task type (Тип задачи)
      • Deadline (Срок)
    • Case-insensitive search
    • Partial match support
  5. Visual Highlighting

    • Matched tasks are highlighted with a yellow box-shadow
    • Gradient background blend with existing event colors (overdue, important, custom)
    • Clear visual distinction for search results

🛠️ Technical Implementation

CSS Additions:

  • .fc-search-container - Container for search UI elements
  • .fc-search-icon - Search icon button styling
  • .fc-search-input-wrapper - Wrapper for input and close button
  • .fc-search-input - Search input field styling
  • .fc-search-close - Close button styling
  • .fc-event.event-search-match - Yellow highlight for matched tasks

JavaScript Functions:

  • addSearchToToolbar() - Injects search UI into FullCalendar toolbar
  • showSearchInput() - Shows search input and hides icon
  • hideSearchInput() - Hides search input and shows icon (when empty)
  • setupSearchInputBlur() - Manages blur event for auto-hide behavior
  • performSearch() - Triggers search and re-renders events
  • taskMatchesSearch(task, query) - Checks if task matches search query
  • Updated renderEvents() - Filters tasks based on search query
  • Updated convertTaskToEvent() - Adds highlight class to matched tasks

🧪 Testing

Created comprehensive test suite in experiments/test-search-implementation.js:

  • ✅ Search by task name
  • ✅ Search by client
  • ✅ Search by executor
  • ✅ Search by status
  • ✅ Empty search returns all tasks
  • ✅ No matches returns empty results

All tests pass successfully.

📸 User Experience

Before Search:

  • Calendar displays all tasks based on current filters
  • Search icon visible next to "Today" button

During Search:

  • User clicks search icon → input appears with focus
  • User types query → tasks are filtered in real-time
  • Only matching tasks are displayed on calendar
  • Matched tasks have yellow highlight for easy identification

After Search:

  • User clicks close icon → search clears, all tasks shown again
  • User clears input and clicks away → search field auto-hides

🎨 Design Considerations

  • Maintains consistent visual style with existing calendar controls
  • Smooth transitions and hover effects
  • Responsive to user interactions
  • Non-intrusive: search UI only visible when needed
  • Yellow highlighting is distinct but not overwhelming

🔧 Code Quality


Ready for review and testing! 🚀

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #439
@konard konard self-assigned this Feb 12, 2026
…lighting

Implemented search feature for templates/calendar.html as specified in issue #439:
- Added search icon (🔍) next to the "Today" button in FullCalendar toolbar
- Clicking the icon shows search input field and hides the icon
- Search input receives focus automatically when shown
- Close icon (✕) next to search input hides the field and shows search icon
- Search input auto-hides on blur if empty
- Search filters tasks by any field (task name, description, client, executor, status, type, deadline)
- Matched tasks are highlighted with yellow box-shadow for visibility
- Search updates results in real-time as user types

Implementation details:
- Added CSS styles for search container, icon, input, and close button
- Added search state management with searchQuery variable
- Implemented taskMatchesSearch() function to search across all task fields
- Modified renderEvents() to filter tasks based on search query
- Updated convertTaskToEvent() to apply highlight class to matched tasks
- Added setupSearchInputBlur() to handle focus management

Testing:
- Created test-search-implementation.js with comprehensive search test cases
- All tests pass successfully

Fixes #439

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] templates/calendar.html Добавить иконку поиска рядом с кнопкой Сегодня Add search functionality to calendar with icon toggle and yellow highlighting Feb 12, 2026
@konard konard marked this pull request as ready for review February 12, 2026 13:02
@konard
Copy link
Copy Markdown
Collaborator Author

konard commented Feb 12, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $1.001098
  • Calculated by Anthropic: $1.275470 USD
  • Difference: $0.274372 (+27.41%)
    📎 Log file uploaded as Gist (547KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@ideav ideav merged commit 0abb2fb into main Feb 12, 2026
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.

templates/calendar.html Добавить иконку поиска рядом с кнопкой Сегодня

2 participants