Commit Graph

307 Commits

Author SHA1 Message Date
lenhanphung ffe204d60b refactor: stabilize calendar loading effects and menubar redirect
- Memoize calendar range strings and stabilize effect deps
- Guard updateDarkColor to avoid dispatch loops
- Add resilient cache-clear handling with refs
- Memoize calendar/temp ids to prevent rerenders
- Update event handler hooks with missing deps
- Add guards and dependency fixes across Calendar effects
2025-11-18 10:40:19 +01:00
lenhanphung 990e290066 feat: implement parallel calendar loading with batch processing
- Refactor getCalendarsListAsync to batch fetch getUserDetails
  - Deduplicate ownerIds before fetching
  - Process in batches of 20 with Promise.all
  - Add error handling with fallback data

- Implement batch loading for selected calendar events
  - Load events in batches of 5 calendars
  - Use sorted selectedCalendars to prevent infinite loops
  - Add cancellation support for cleanup

- Add prefetch mechanism for hidden calendars
  - Prefetch calendars not currently selected
  - Track prefetched state to avoid duplicate requests
  - Non-blocking background loading

- Apply batch loading to temp calendars
  - Separate cache tracking for temp calendars
  - Batch load temp calendar events
  - Clean up cache when temp calendars are removed
2025-11-18 10:40:19 +01:00
lenhanphung 2d9ff88c1b Update #325 calendar grid border color (#323) 2025-11-17 10:00:28 +01:00
lenhanphung e8374cc2a1 #272 fix:search spins forever in case of error (#302) 2025-11-14 13:28:05 +01:00
Camille Moussu 1bc9b0c160 [#268] changed timezone offset calculation (#306)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-14 08:52:02 +01:00
Camille Moussu 917954f7a5 [#310] fix color error + strenghtened test on missing apple:color (#314)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-14 08:51:44 +01:00
Camille Moussu 31c22bff95 [#248] added translation for event title when it's busy (#304)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-13 10:43:06 +01:00
Camille Moussu 85ccf8e14d [#271] abort truly goes through when removing user in cal search (#295)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-13 09:24:34 +01:00
Camille Moussu 3c26a81773 [#296] removed old condition that is no longer needed (#305)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:57:16 +01:00
Camille Moussu 1bb24b2672 [#297] added missing translation (#303)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:47:55 +01:00
Camille Moussu 6305f55d1a [#67] added export calendar functionnality (#294)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:42:35 +01:00
Camille Moussu f886846a2b [#265] prefills title + trad + test (#293)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 20:42:05 +01:00
Camille Moussu 991cb6e56e [#179] functionnal topbar when dialog expanded (#292)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-12 09:52:20 +01:00
Camille Moussu daed6d97ed [#69] added secret link for calendars (#284)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
Co-authored-by: Benoit TELLIER <btellier@linagora.com>
2025-11-07 08:30:47 +01:00
Camille Moussu 0647be551f [#206] removed autocomplete suggestions 2025-11-07 08:15:49 +01:00
Camille Moussu c05dac3f08 [#206] removed no option from display when no input + test 2025-11-07 08:15:49 +01:00
Camille Moussu ddc651f8ca [#230] added toast to copy visio link (#286)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-07 08:11:11 +01:00
Camille Moussu e085e4c893 [#276] remove false from all day date subtitle (#289)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-07 08:08:16 +01:00
Camille Moussu e7f8b62ac8 [#276] removed divider from event without actions (#288)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-06 15:50:09 +01:00
Camille Moussu 36bc027d6d [#82] added cozy-ui for internationnalisation (#267)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-06 15:46:58 +01:00
lenhanphung c1f37e3ebd feat: improve date/time fields UI and logic
- Change 'Start Date' label to 'Date' when only single date field is visible in normal mode
- Fix all-day slot display: show correct start/end dates for single click and multi-day drag
- Update API save logic: add +1 day to end date for all-day events (API requirement)
- Migrate from moment to dayjs for date handling with AdapterDayjs
- Remove manual date clamping logic - MUI/dayjs handles invalid dates automatically
- Add validation guard to prevent invalid dates from clearing field values
- Update test case to match new all-day event API behavior
2025-11-05 10:25:41 +01:00
lenhanphung 41b4c41215 Event form UX improvements:
- Add long date format display (Monday, April 23, 2024)
- Use 24h time format
- Show/hide time fields based on all-day state
- Remove auto-update of end date when start date changes
- Fix validation for all-day events
- Auto-expand for multi-day events
- Set default time when toggling off all-day from all-day slot
2025-11-05 10:25:41 +01:00
lenhanphung 61358c081a feat(ui): replace end date field with '...' button toggle
- Hide end date by default; reveal via '...' button in both modes
- Keep state/validation/API logic unchanged
- Normalize labels to use MUI TextField labels across modes
- Align button with fields; constrain widths for expanded mode
2025-11-05 10:25:41 +01:00
lenhanphung 5078128e10 test: fix test cases for MUI DatePicker and TimePicker migration
- Add data-testid attributes to DatePicker and TimePicker components in DateTimeFields
- Update test queries from getByLabelText to getByTestId for date/time inputs
- Fix assertions to use toHaveAttribute instead of toHaveValue for MUI pickers
- Add data-testid to occurrences-input in EventRepeat component
- Update RepeatEvent test to use data-testid for occurrences input
- Fix radio button queries using getAllByLabelText with type filter
2025-11-05 10:25:41 +01:00
lenhanphung 3c75a7e82e feat: replace TextField with MUI DatePicker and TimePicker in DateTimeFields
- Replace native HTML date/time inputs with MUI X Date Pickers components
- Add DatePicker for start/end dates
- Add TimePicker for start/end times
2025-11-05 10:25:41 +01:00
lenhanphung 01f79553c0 refactor: Split EventFormFields.tsx into smaller modules
- Extract helper functions to utils/dateTimeHelpers.ts and utils/dateTimeFormatters.ts
- Extract validation logic to utils/formValidation.ts
- Extract FieldWithLabel component to components/FieldWithLabel.tsx
- Extract DateTimeFields component to components/DateTimeFields.tsx
- Extract all-day toggle logic to hooks/useAllDayToggle.ts
- Update imports in EventModal.tsx, EventUpdateModal.tsx, EventDisplay.tsx, eventHandlers.ts
- Maintain all existing functionality without breaking changes
2025-11-05 10:25:41 +01:00
lenhanphung 701f2f2b71 feat: Split datetime fields
- Replace single datetime-local field with 4 separate fields:

- Add helper functions:
  * splitDateTime(): Split datetime string into date and time parts
  * combineDateTime(): Combine date and time into datetime string

- Implement internal state management:
  * startDate, startTime, endDate, endTime internal states
  * Sync effects to update internal states from start/end props
  * Change handlers for each field that combine values and call parent handlers

- Fix test cases:
  * Update EventModal.test.tsx, EventUpdateModal.test.tsx to use new field labels
  * Change from 'Start'/'End' to 'Start Date'/'Start Time'/'End Time'/'End Date'
2025-11-05 10:25:41 +01:00
Camille Moussu 4f5308fe08 [#80] added selected calendars local persistance + tests (#281)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-04 16:00:08 +01:00
Camille Moussu 838262fde3 [#277] fixed conditions to prevent blink in compact event chips (#280)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-04 14:18:55 +01:00
Camille Moussu 2d0803090a [#278] fixed unprefilled calendar and added test (#279)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-04 14:14:29 +01:00
Camille Moussu 2cf20e9655 [#269] fix selection error (#273)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-03 14:35:05 +01:00
Camille Moussu ec7230fa94 [#189] added custom event chip (#262)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-31 11:50:22 +01:00
Camille Moussu 39d8085766 [#205] added calendar list component (#258)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-31 04:44:54 +01:00
lenhanphung 2686b13885 fix(calendar) #263 : calculate dynamic week range for month view data loading (#264)
- Calculate exact number of weeks needed instead of fixed 6 weeks
- Compute weeks based on actual days from startDate to lastOfMonth
2025-10-29 11:26:37 +01:00
Camille Moussu fc962057c0 [#259] added check to prevent no applecolor from breaking the commponent (#260)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-29 11:25:20 +01:00
lenhanphung 2355ee8771 fix #253: trim long text without space (#256) 2025-10-27 11:53:01 +01:00
Camille Moussu cdaed8a7c1 [#254] fixed regression on other calendar display while no calendar available (#257)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-27 11:41:35 +01:00
Camille Moussu 42f5d8e1a9 #204 Error management (#237)
* added error snackbar for api fails
* improved error page to be shown only for userdata errors and to allow retrying
* fixed test breaking only in local because of timezone and reduced warnings for easier reading of tests results
* added error management for failure inside calendars imports
* added error snackbar for api fails
* improved error page to be shown only for userdata errors and to allow retrying
* added error management for failure inside calendars imports

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-27 11:23:38 +01:00
lenhanphung 4774e78543 feat: Update Event Preview Modal UI with custom MUI theme (#240)
- Add custom MUI theme
- Update ResponsiveDialog with actionsBorderTop prop for modal footer border
- Redesign EventDisplayPreview modal with improved typography and spacing
- Replace ButtonGroup with individual RSVP buttons (Accept/Maybe/Decline)
- Add pill-shaped buttons for RSVP actions
- Ensure backward compatibility with existing modals
2025-10-27 06:23:42 +01:00
lenhanphung 51c9d68be2 fix #252: sidebar width shift when hover (#255) 2025-10-27 06:15:56 +01:00
Camille Moussu 9c5abb7fbd [#242] fixed calendar color creation API call (#243)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-24 13:14:19 +02:00
Camille Moussu 8813bff48c Calendar subscription naming (#235)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-24 12:47:18 +02:00
Camille Moussu 34363562cc Color picker rework (#232)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-24 01:20:56 +02:00
lenhanphung 8681e88390 fix: preserve recurrence exceptions when RSVP to recurring events (#234)
When an attendee accepts/rejects/tentative a recurring event with
exceptions, only update the PARTSTAT without removing exception events.

Add removeOverrides: false parameter to updateSeriesAsync call in
handleRSVP function to preserve all recurrence exceptions.

Fixes: Recurrence exceptions being deleted when accepting/rejecting
all events in a recurring series

* fix: update PARTSTAT on all VEVENTs when RSVP to recurring events

When an attendee accepts/rejects/tentative a recurring event with exceptions,
update PARTSTAT on ALL VEVENTs (master + exceptions) to reflect the correct
attendance status across the entire series.

Changes:
- Add updateSeriesPartstat() in EventApi.ts to update PARTSTAT on all VEVENTs
- Update handleRSVP() to use new function instead of updateSeriesAsync
- Preserve exception times while updating PARTSTAT consistently
- Update test to verify new function is called correctly

Fixes: Exception events not accepting when user chooses 'Accept all events'
2025-10-23 05:36:34 +02:00
lenhanphung 1c8826facc Form validation for event create/update (#218)
* refactor: migrate EventModal to use shared EventFormFields component

* feat: add form validation for event create/update

- Validate title is required
- Validate end datetime must be after start datetime
- Disable save button when form is invalid
- Show error messages below invalid fields with red highlight (MUI)
- Title validation in create mode only shows error after field is touched
- Track touched state to avoid showing errors on initial load

* feat: improve event modal UX with auto-focus and default times

- Auto-focus title field when opening create/update event modal
- Set default datetime when creating event without selecting range:
  * Start time = current time + 1 hour (rounded to :00)
  * End time = start time + 1 hour
- Applied duplicate event to display datetime from original event
- Fix logic to detect empty event object vs valid event with uid

* fix: improve validation UX and add required field indicator

- Only show validation errors when modal is open (isOpen check)
- Add red asterisk (*) to Title label to indicate required field
- Prevent validation error flash when closing modal
- Fix TypeScript errors in EventUpdateModal
- Keep validation behavior: only show error after user types and deletes

* feat: auto-focus title field when toggling between normal and extended mode in event modal


* update: only validation when click on save button

* fix: prevent form data loss and validation errors in event modals

Fixes:
1. Form fields no longer clear when changing start/end dates
2. Extended mode stays active when modifying dates
3. No validation errors shown after successful save
2025-10-22 11:52:38 +02:00
lenhanphung a7a4bb4507 fix: double scrollbar left side (#236) 2025-10-22 11:48:06 +02:00
Camille Moussu 89ea554b1f [#142] prefill event creation for any way of creating (#226)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-21 14:12:08 +02:00
Camille Moussu e99c56f03f Handle long descriptions (#228)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-21 12:17:36 +02:00
Camille Moussu aa1dddc7ba Month view Revamp (#221)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-21 12:16:30 +02:00
lenhanphung c27a52f479 Calendar sidebar: padding via MUI, sticky Create Event button; DateCalendar width 100%; Create button full width (#227) 2025-10-21 12:16:08 +02:00