Commit Graph

87 Commits

Author SHA1 Message Date
Camille Moussu 2f2ee369fc [#525] adopted twake-i18n (#404)
* [#525] adopted twake-i18n 

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-12-09 11:10:44 +01:00
lenhanphung a5093f3fc4 feat: #524 implement logo click navigation to current week view (#402)
- Add logo click handler to navigate to current week view from any view (month, day, or week)
- Update MainTitle component to accept calendarRef and view change callbacks
- Implement handleLogoClick that changes view to week and navigates to current week
- Add comprehensive test cases for logo click behavior from all view types

Co-authored-by: Lê Nhân Phụng <lenhanphung@Phung-Mac-M4.local>
2025-12-09 11:08:25 +01:00
Camille Moussu 8a68280023 [#336] added logout logic to user menu (#380)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-12-02 10:07:41 +01:00
lenhanphung 1a85afc57d UI: #334 add config page language setting (#374)
* UI: #334 add config page language setting

* temporary remove logout button

* Unify fullscreen view class for dialog expanded and settings view

- Replace dialog-expanded and settings-view with single fullscreen-view class
- Update ResponsiveDialog to use fullscreen-view class
- Update CalendarLayout to use fullscreen-view class for settings view
- Consolidate CSS rules in Menubar.styl to use fullscreen-view
- Update test cases to use new class name

---------

Co-authored-by: Lê Nhân Phụng <lenhanphung@Phung-Mac-M4.local>
2025-11-28 14:25:06 +01:00
Benoit TELLIER 65c26f7627 [#318] implement SEQUENCE field for ICS events (#362)
- Add SEQUENCE property to ICS generation (starts at 1 for new events)
- Increment SEQUENCE on event updates (modal, drag & drop, resize)
- Handle SEQUENCE independently for recurring event instances
- Add comprehensive tests for SEQUENCE generation and incrementation
- Ensure proper event ordering for remote calendar participants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-27 08:58:31 +01:00
Camille Moussu d8c931e02e [#317] improved event error management + test (#358)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-25 15:46:30 +01:00
lenhanphung 9151ff5563 fix: preserve form data on API error and fix test cases (#338)
- Add temp storage utility (eventFormTempStorage.ts) to save/restore form data
- Implement error handling: close modal immediately, reopen on API failure with saved data
- Add event listeners in Calendar.tsx and EventDisplayPreview.tsx to reopen modals on error
- Fix calendar change logic in EventUpdateModal: use oldCalendar for update before move
- Update all test mocks to support .unwrap() method for Redux thunks
- Add sessionStorage.clear() in test beforeEach hooks
- Fix test timing issues with act() wrappers and increased timeouts
- Mock putEventAsync in TempUpdate test to ensure updateTempCalendar is called

- Fix update modal not reopening when API fails for recurring events (solo/all)
- Move update modal reopen logic from EventDisplayPreview to Calendar.tsx
- Use sessionStorage to persist update modal info across component unmounts
- Handle typeOfAction matching for recurring events (undefined vs solo/all)
- Fix error handling in updateEventInstanceAsync and updateSeriesAsync
- Ensure all API failures properly dispatch eventModalError event
2025-11-25 15:30:58 +01:00
Camille Moussu 25078c783e [#285] added duration enforcement to date and time in dateTimeFields (#343)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-25 11:16:45 +01:00
Camille Moussu 531d29f2ce [#313] removed withRights (#354)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-24 21:32:15 +01:00
lenhanphung 007266e7b0 Fix: #319 attendee role: use REQ-PARTICIPANT instead of CHAIR for nor… (#349)
- Change role from CHAIR to REQ-PARTICIPANT when adding attendees via PeopleSearch
- Keep CHAIR role only for organizers
2025-11-20 12:00:17 +01:00
lenhanphung bff1af31bd Fix: Preserve timezone used in create and update modal (#301)
- Fix timezone field display in event modals to show original timezone from server
- Fix formatDateToICal to use moment.utc(date).tz(timezone) for correct UTC instant preservation
- Fix parseCalendarEvent to convert event.start/end to ISO UTC strings after parsing
- Fix eventToFullCalendarFormat to ensure event times are ISO UTC before passing to FullCalendar
- Fix getEvent to normalize event.start/end to ISO UTC strings
- Ensure event.timezone is always set (defaults to Etc/UTC if not detected)
- Update eventUtils.test.ts to match new timezone conversion logic
- Fix event time shift issue on calendar grid display

This ensures:
- Events display in correct time slots on calendar grid
- Event times are correctly converted between timezones
- Original timezone from server is preserved and displayed
- All event times are stored as ISO UTC strings internally

* refactor: eliminate datetime format detection code duplication

- Add constants for datetime format strings and magic number (DATETIME_WITH_SECONDS_LENGTH, DATETIME_FORMAT_WITH_SECONDS, DATETIME_FORMAT_WITHOUT_SECONDS)
- Create shared detectDateTimeFormat() function to replace duplicated format detection logic
- Refactor convertFormDateTimeToISO, convertEventDateTimeToISO, and convertDateTimeStringToISO to use shared helper
- Add console.warn logging when invalid datetime is encountered (addresses silent fallback issue)
- Add comprehensive test coverage for dateTimeHelpers with full test suite
2025-11-20 09:32:15 +01:00
Camille Moussu 8e7b6e18eb [#311] preserve input on unfocus in peopleSearch (#346)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-19 16:09:09 +01:00
Camille Moussu 288d3d73a9 307 event modification reset user participation (#316)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-18 10:42:32 +01:00
Camille Moussu cb69455a9b [#239] refresh is triggered only on save (#329)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-11-18 10:41:58 +01:00
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 e8374cc2a1 #272 fix:search spins forever in case of error (#302) 2025-11-14 13:28:05 +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 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 c05dac3f08 [#206] removed no option from display when no input + test 2025-11-07 08:15:49 +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 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
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 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 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
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
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 0f82711d7d [#83] Change minicalendar lib to MUI (#211)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-16 10:36:59 +02:00
lenhanphung b9905cbb7a refactor(tests): use getByRole instead of getByText for interactive elements
- Refactor ~47 test cases across 7 test files to use getByRole
- Improve accessibility testing coverage following Testing Library best practices
- Make tests more robust against text changes (i18n, copy updates)
- Test elements as users (especially screen readers) interact with them
2025-10-16 10:36:28 +02:00
lenhanphung 4c18bf3a52 feat: Update event modal UI with header icons and improved actions layout
- Add expand and close icons to ResponsiveDialog header in normal mode
- Change 'Show More' button to 'More options' with Add icon
- Hide Cancel button in normal mode, show only in extended mode
- Add showHeaderActions prop to ResponsiveDialog for UI control
- Preserve EventDisplayPreview modal with old UI (no header icons)
- Update all affected test cases to match new UI behavior
2025-10-16 10:36:28 +02:00
lenhanphung ad56b71488 fix: update test imports and use main's EventDisplay tests
- Fix EventDisplayPreview import paths (moved to features/Events/)
- Use main's EventDisplay.test.tsx (matches new UI)
- Fix DuplicateEvent and EventRepetition test imports
2025-10-15 08:29:28 +02:00
lenhanphung 42c953ccf9 feat(events): align Update modal with Create; extract shared form fields
- ux: close Update modal immediately on Save; run API in background
- fix: remove stale single-instance when converting to repeating
- test: adjust EventDisplay expectations
- refactor: share form via components/Event/EventFormFields (used by Create/Update)
2025-10-15 08:29:28 +02:00
Camille Moussu f498309f44 BUGFIX : Minicalendar event toggle (#202)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-10 11:18:49 +02:00
Camille Moussu 066d37a29a Bug month navigation (#194)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-08 11:46:20 +02:00
Camille Moussu 481b59da23 [#181] removed numbers in week banner (#195)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-08 11:29:20 +02:00
Camille Moussu 3f8f3eff23 [#162] changed preview modal looks to follow figma (#163)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-07 11:20:09 +02:00
Camille Moussu 40c383c334 Revamp calendar dialog (#158)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-07 11:14:08 +02:00
lenhanphung ff54840ac8 fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-03 10:07:08 +07:00
lenhanphung 407290702f fix: resolve all failing test suites
- Fix RepeatEvent.test.tsx (15/15 tests): Update selectors to match actual UI text ('Day(s)', 'Week(s)', etc.) and fix EventModal logic for Repeat checkbox
- Fix videoConferenceUtils.test.ts (1/1 test): Mock window object for Node.js environment
- Fix EventModal.test.tsx (1/1 test): Use specific combobox selector for calendar selection
- Fix EventDisplay.test.tsx (1/1 test): Remove incorrect Repeat checkbox expectation
2025-10-02 18:11:55 +07:00
lenhanphung 4eb2c86771 fix: update test cases to match new UI labels
- Update RepeatEvent.test.tsx to use correct selectors and text matching
- Update EventDisplay.test.tsx to use 'Notification' instead of 'Alarm'
- Update EventModal.test.tsx to use new label names and fix description input tests
- Update Calendar.test.tsx to use new placeholder text 'Start typing a name or email'
- Fix EventDisplay.tsx to use 'Notification' label consistently
2025-10-02 14:19:05 +07:00
lenhanphung 7c6240442c feat: redesign event modal with responsive dialog and improved layout
Implemented a new ResponsiveDialog component and redesigned EventModal
with better UX for both normal and extended modes.

New Features:
- Created reusable ResponsiveDialog component (src/components/Dialog/)
  * Normal mode: 685px centered popup
  * Extended mode: fullscreen with 90px header preservation
  * Auto spacing via MUI Stack (16px normal, 24px extended)
  * Back arrow navigation in extended mode
  * No backdrop/shadow in extended mode for seamless integration
  * Configurable props for all dimensions and behaviors

EventModal Improvements:
- Replaced native checkbox with MUI Checkbox component
- Migrated from Popover to ResponsiveDialog
- Reorganized field layout

=> Comprehensive documentation in Dialog/README.md

Note: RepeatEvent integration tests need additional refactoring (tracked separately)
2025-10-02 14:19:05 +07:00
Camille Moussu 17c6bf7bce [#159] Can untoggle every calendars (#161)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-01 09:04:59 +02:00
Camille Moussu 475ab79731 Delete Calendars (#148)
* [#66] added delete popup and logic

* [#66] Homogenize Dialogs components between modify and delete to keep them coherent+ fixed tests

* [#66] added tests

* [#66] text adjusment

* fixup! [#66] added delete popup and logic

---------

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-30 10:27:47 +02:00
Camille Moussu b46be3af29 [#101] prettified code + added test 2025-09-30 06:42:31 +02:00
lenhanphung a4a61c779c fix prettier 2025-09-25 17:43:26 +07:00
lenhanphung e105e76f9e fix: update test cases for Menubar and Calendar components
- Update Menubar test cases to match component changes (logo instead of text)
- Add required currentView prop to all Menubar test cases
- Fix Calendar test cases by adding calendarRef wrapper component
- Convert babel.config.ts to babel.config.js for Node.js 24 compatibility
- All 146 tests now pass successfully
2025-09-25 17:33:58 +07:00
lenhanphung 5a9a34d0d3 fix: infinity loop cause by change layout, adjust style 2025-09-25 17:11:22 +07:00
lenhanphung 0f74ddfc27 fix: update tests for new Menubar UI implementation
- Remove refresh button test from Calendar.test.tsx
- Update Menubar tests to pass required props (calendarRef, onRefresh, currentDate)
- Update Calendar tests to pass calendarRef prop
- Remove outdated test cases from MiniCalendarColor.test.tsx that tested old headerToolbar
- Format code with prettier
2025-09-25 17:10:58 +07:00
lenhanphung 34cc7e117c Fix prettier 2025-09-25 17:09:20 +07:00