Skip to content

Fix note color#17

Merged
Gabry848 merged 10 commits intomasterfrom
fix/note_color
Feb 13, 2026
Merged

Fix note color#17
Gabry848 merged 10 commits intomasterfrom
fix/note_color

Conversation

@Gabry848
Copy link
Copy Markdown
Collaborator

This pull request introduces estimated task duration support to the calendar and task management components, improves the sticky note color picker UI, and ensures consistent note positioning by syncing canvas viewport state. The most important changes are grouped below:

Task Duration Support

  • Added a duration selector to the AddTask modal, allowing users to choose preset or custom durations for tasks; duration is now passed through task creation and stored in the backend. (src/components/Task/AddTask.tsx, [1] [2] [3] [4] [5] [6]
  • Updated Calendar20View to use server-provided duration_minutes if available, or compute it from start/end times, ensuring accurate duration display and storage. (src/components/Calendar20/Calendar20View.tsx, [1] [2] [3]
  • Enhanced AgendaView to visually display task durations with a badge and improved formatting. (src/components/Calendar20/AgendaView.tsx, [1] [2] [3]

Sticky Note UI Improvements

  • Replaced the inline color picker with a modal overlay for better UX, including improved styling and accessibility. (src/components/Notes/StickyNote.tsx, [1] [2] [3]
  • Added logic to prevent accidental editor opening when palette or delete buttons are pressed, and ensured color changes are saved to the server immediately. (src/components/Notes/StickyNote.tsx, [1] [2] [3] [4] [5]

Notes Canvas Synchronization

  • Synced canvas viewport state in NotesCanvas to a shared module, enabling consistent note positioning and scaling across the app. (src/components/Notes/NotesCanvas.tsx, [1] [2]

…icker modal

- Fix false warning on new note creation when server returns undefined title
- New notes now appear at the center of the user's current viewport
- Color picker moved to a full-screen Modal to prevent keyboard/editing conflicts
- Added button tap guard to prevent tap gesture from firing on palette/delete press
- Document new duration_minutes field (1-10080 minutes range)
- API endpoints reference and examples
- Migration details (13_20260212145848_add_duration_to_tasks.py)
- Validation rules and common duration values
- Backward compatibility notes
- Future extension possibilities
- Add duration_minutes field to Task interface (API v2.1.0)
- Support duration in addTask() and updateTask() methods
- Pass duration_minutes to backend API when provided
- Update types.ts with optional duration_minutes field
- Supports null value to remove duration
- Add duration presets (15min, 30min, 1h, 2h, 4h) with chip UI
- Custom duration input with numeric keyboard (1-10080 minutes)
- Clear duration button for removing selection
- State management for duration_minutes in both AddTask and TaskEditModal
- Pass duration to onSave callback and task service
- Add DurationDisplay component with formatted output (e.g., '1 ora', '2h 30min')
- Integrate duration display in TaskHeader next to days remaining
- Add duration container and text styles (durationContainer2, durationText)
- Add form styles for duration chips and custom input (durationChip, durationChipActive)
- Helper function formatDuration() for consistent formatting
- Remove expand button (only expand on description tap if description exists)
- Add duration_minutes to task edit data flow
- Include duration_minutes in hasChanged detection for optimistic updates
- Prevent expansion when task has no description
- Add formatDuration() helper function for card view
- Display duration badge in task card when duration_minutes is set
- Remove redundant time info display (start/end time)
- Format: '15 min', '1 ora', '2h 30min' based on duration value
AgendaView:
- Display duration badge with hourglass icon next to time info
- Format duration consistently (e.g., '1 ora', '2h 30min')
- Add duration badge styling (gray background, rounded)

Calendar20View:
- Use server-provided duration_minutes if available
- Fallback to computed duration from start/end dates
- Pass durationMinutes parameter to onSave callback
- Support duration in task creation flow
- Add durationMinutes parameter to handleAddTaskFromForm
- Pass duration_minutes to task data when creating new tasks
- Support optional duration in task creation flow
- Maintain backward compatibility (duration is optional)
@Gabry848 Gabry848 merged commit 815231f into master Feb 13, 2026
1 check failed
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