Commit Graph

215 Commits

Author SHA1 Message Date
Camille Moussu 26e69091d9 [#137] added duration management when no end + added moment library to manage duration 2025-10-10 11:19:09 +02:00
Camille Moussu a00f179dbd [#121] added error handler and snackbar 2025-10-10 11:19:09 +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 9206fa8bab [#196] added check to prevent error when getting visibility when it's missing (#198)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-10-08 11:28:55 +02:00
Camille Moussu c86db8fa49 refactor recurring event modification (#173) 2025-10-07 18:16:00 +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 2fa1dbb76b Merge pull request #172 from linagora/UI/create-event-popup
UI/create event popup
2025-10-06 12:20:55 +07:00
lenhanphung f99b3fb223 css: fix prettier and hidden slot minor 2025-10-03 17:31:24 +07:00
lenhanphung 4ef3a887ee fix: resolve infinite loop and week calculation issues in EventModal
- Fix infinite loop in EventModal useEffect by using useRef for userPersonnalCalendars
- Fix weekStart calculation in putEventAsync to use Monday as first day (consistent with FullCalendar firstDay=1)
- Add computeWeekRange utility function for consistent week calculations
- Improve state reset logic when closing EventModal popup
- Ensure repeat checkbox state is properly reset to prevent stale repetition data
2025-10-03 17:22:19 +07:00
lenhanphung f245991816 feat: improve video conference UI in EventModal
- Replace 'Meeting link generated' text with 'Join Visio conference' button
- Button opens video conference link in new tab when clicked
- Use contained variant styling to match Save button appearance
- Maintain copy and delete functionality for meeting links
2025-10-03 14:51:40 +07:00
lenhanphung 04fa2d0629 feat: add byday field support for event repetition
- Add byday field to RepetitionObject interface in EventsTypes.ts
- Update calendarEventToJCal to handle byday field (array or null)
- Update parseCalendarEvent to parse byday from JCal format
- Fix all-day event dtend logic to increment by 1 day when start equals end
- Add comprehensive test cases for byday field handling
2025-10-03 11:32:42 +07:00
lenhanphung cea576e5e8 fix: improve video conference link positioning and null safety
- Fix calendarUtils.ts null safety for calendars[id] access
- Update video conference link to be added on line 2 instead of line 3
- Update regex in handleDeleteVideoConference to match new format
- Update all test cases for videoConferenceUtils to match new format
- Add null checks in updateCalsDetails function
2025-10-03 10:46:34 +07: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 298b69b3e1 feat: add video conference meeting link generation to event modal
- Add video conference utility functions for generating random meeting IDs
- Implement video meeting button with camera icon in EventModal
- Add copy and delete functionality with IconButton components
- Support X-OPENPAAS-VIDEOCONFERENCE field in CalendarEvent type
- Handle state management for editing events with/without video conference
- Add meeting link footer to event description
- Include comprehensive test suite for video conference utilities

Features:
- Generate random meeting links (format: xxx-xxxx-xxx)
- Copy meeting link to clipboard
- Remove video conference from events
- Proper state sync when editing different events
- Integration with existing JCal/ICS conversion
2025-10-02 16:16:04 +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 3261479874 refactor: improve EventModal UI labels and visibility controls
- Rename 'Alarm' to 'Notification' for better clarity
- Rename 'Attendees' to 'Participants' with updated placeholder text
- Replace 'Visibility' dropdown with 'Visible to' toggle buttons (All/Participants)
- Remove CONFIDENTIAL option, keep only PUBLIC and PRIVATE
- Add icons (PublicIcon/LockIcon) with fixed sizing for toggle buttons
- Rename 'Show as' to 'Show me as'
- Fix ResponsiveDialog scroll bar positioning in expanded mode
- Update PeopleSearch placeholder to 'Start typing a name or email'
2025-10-02 14:19:05 +07:00
lenhanphung 1228f0a50e Update calendar hover and slot label opacity logic
- Update hover effect to highlight 30-minute time slots instead of 1-hour slots
- Reset slot label opacity to full visibility when viewing other weeks/days
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
lenhanphung 65309bba18 resolve conflict 2025-10-02 14:19:05 +07:00
lenhanphung d7c33f105d feat: prepare project for cozy-ui migration
Build Configuration
- Add Stylus support via @rsbuild/plugin-stylus
- Add SVGR support via @rsbuild/plugin-svgr
- Update rsbuild.config.ts with custom configuration
- Add historyApiFallback for SPA routing

ESLint Configuration
- Create .eslintrc.json with react-app configuration
- Remove eslintConfig from package.json

CSS to Stylus Migration
Convert all 5 CSS files to Stylus (.styl) format:
  - src/App.css to src/App.styl
  - src/index.css to src/index.styl
  - src/components/Calendar/Calendar.css to src/components/Calendar/Calendar.styl
  - src/components/Calendar/CustomCalendar.css to src/components/Calendar/CustomCalendar.styl
  - src/components/Menubar/Menubar.css to src/components/Menubar/Menubar.styl
- Update all imports from .css to .styl
- Preserve all styling rules and values

MUI Styling Cleanup
- Replace all MUI sx props with standard style props across 15+ components
- Convert MUI spacing units (mr: 2 to marginRight: 16px)
- Convert MUI shorthand props (p: 2 to padding: 16px, mb: 1 to marginBottom: 8px)
- Remove MUI-specific syntax (&.Mui-checked selectors)
- Maintain exact visual appearance

FullCalendar Fixes
- Comment out problematic CSS rule in CustomCalendar.styl
- Fix display issues with timegrid slot labels

Files Modified
- Config: rsbuild.config.ts, .eslintrc.json, package.json
- Styling: 5 CSS to Stylus conversions, 15+ component sx to style updates
- Components: All components using MUI sx props updated

Development Workflow
- Continue using existing development commands
- Stylus files are now the source of truth for styling
- MUI components work with standard style props
- ESLint uses familiar react-app rules

Dependencies Added
- @rsbuild/plugin-stylus
- @rsbuild/plugin-svgr
2025-10-02 14:19:05 +07:00
lenhanphung 3870bceb6d feat: prepare project for cozy-ui migration (#157)
* feat: prepare project for cozy-ui migration

Build Configuration
- Add Stylus support via @rsbuild/plugin-stylus
- Add SVGR support via @rsbuild/plugin-svgr
- Update rsbuild.config.ts with custom configuration
- Add historyApiFallback for SPA routing

ESLint Configuration
- Create .eslintrc.json with react-app configuration
- Remove eslintConfig from package.json

CSS to Stylus Migration
Convert all 5 CSS files to Stylus (.styl) format:
  - src/App.css to src/App.styl
  - src/index.css to src/index.styl
  - src/components/Calendar/Calendar.css to src/components/Calendar/Calendar.styl
  - src/components/Calendar/CustomCalendar.css to src/components/Calendar/CustomCalendar.styl
  - src/components/Menubar/Menubar.css to src/components/Menubar/Menubar.styl
- Update all imports from .css to .styl
- Preserve all styling rules and values

MUI Styling Cleanup
- Replace all MUI sx props with standard style props across 15+ components
- Convert MUI spacing units (mr: 2 to marginRight: 16px)
- Convert MUI shorthand props (p: 2 to padding: 16px, mb: 1 to marginBottom: 8px)
- Remove MUI-specific syntax (&.Mui-checked selectors)
- Maintain exact visual appearance

FullCalendar Fixes
- Comment out problematic CSS rule in CustomCalendar.styl
- Fix display issues with timegrid slot labels

Files Modified
- Config: rsbuild.config.ts, .eslintrc.json, package.json
- Styling: 5 CSS to Stylus conversions, 15+ component sx to style updates
- Components: All components using MUI sx props updated

Development Workflow
- Continue using existing development commands
- Stylus files are now the source of truth for styling
- MUI components work with standard style props
- ESLint uses familiar react-app rules

Dependencies Added
- @rsbuild/plugin-stylus
- @rsbuild/plugin-svgr
2025-10-01 17:31:18 +02: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
Camille Moussu ac9db2b520 [#101] fixed regex for attendee mail cleanup 2025-09-30 06:42:31 +02:00
lenhanphung 0a134e4954 Merge pull request #156 from linagora/feat/calendar-extract-callback
refactor: extract calendar callbacks into separate modules
2025-09-26 17:31:45 +07:00
lenhanphung 573121947c refactor: create custom hooks for better organization
- Create useCalendarEventHandlers hook for event management
  * Wraps event handlers with useCallback for performance
  * Provides handleDateSelect, handleClosePopover, handleEventClick
  * Provides handleEventAllow, handleEventDrop, handleEventResize
  * Centralizes event handler logic and dependencies
- Create useCalendarViewHandlers hook for view lifecycle management
  * Wraps view handlers with useCallback for performance
  * Provides handleDayHeaderDidMount, handleDayHeaderWillUnmount
  * Provides handleViewDidMount, handleViewWillUnmount
  * Provides handleEventContent, handleEventDidMount
  * Centralizes view lifecycle logic and dependencies
2025-09-26 17:02:31 +07:00
lenhanphung f3787643e7 refactor: extract calendar utility functions and handlers
- Extract utility functions to utils/calendarUtils.ts
  * updateSlotLabelVisibility for slot label management
  * eventToFullCalendarFormat for event formatting
  * extractEvents for event filtering
  * updateCalsDetails for calendar detail updates
- Extract event handlers to handlers/eventHandlers.ts
  * handleDateSelect, handleClosePopover, handleEventClick
  * handleEventAllow, handleEventDrop, handleEventResize
- Extract mouse handlers to handlers/mouseHandlers.ts
  * handleMouseMove, handleMouseLeave
  * addMouseEventListeners, removeMouseEventListeners
- Extract view handlers to handlers/viewHandlers.ts
  * handleViewDidMount, handleViewWillUnmount
  * handleEventContent, handleEventDidMount
  * handleDayHeaderDidMount, handleDayHeaderWillUnmount
- Remove inline functions from Calendar.tsx
- Improve code organization and maintainability
2025-09-26 16:52:02 +07:00
Camille Moussu 77df90be27 [#149] fixed regressions (#150)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-25 16:53:11 +02:00
Camille Moussu 58324cd8e0 [#146] fix error in loading (#147)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-25 16:52:51 +02:00
lenhanphung fc77c8a2ec Merge pull request #130 from linagora/UI/style-main-grid
UI/style main grid
2025-09-25 17:57:25 +07: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 7b8a2e74a5 fix prettier 2025-09-25 17:16:12 +07:00
lenhanphung ca0fe4a4a8 feat: update menubar logo and remove text
- Replace calendar.svg with header-logo.svg for new Twake Calendar branding
- Remove text elements from MainTitle component, keeping only logo
- Update import path to use new header-logo.svg file
2025-09-25 17:12:09 +07:00
lenhanphung b9d7a8fa6b feat: enhance calendar with view sync, Redux fixes, and dynamic slot label dimming
- Sync calendar view state between Calendar and Menubar components
- Fix Redux serialization errors by using string dates instead of Date objects
- Add null checks for eventResize handler to prevent undefined errors
- Implement dynamic slot label dimming near current time indicator
- Slot labels fade to opacity 0.2 when now indicator is within 15 minutes
- Add smooth CSS transitions for better user experience
- Handle edge cases around midnight for proper time calculation
- Update slot label visibility on view changes and time updates
2025-09-25 17:12:07 +07:00
lenhanphung 24efa2b62e feat: get back 30mins divided 2025-09-25 17:11:24 +07:00
lenhanphung 57cc656d83 fix: sync calendar view state between Calendar and Menubar components
- Add onViewChange callback to CalendarAppProps interface
- Update CalendarLayout to manage currentView state and pass callbacks
- Modify Menubar to receive currentView from parent instead of local state
- Sync view changes when clicking day headers in week view
- Ensure dropdown in Menubar updates when calendar view changes
2025-09-25 17:11:24 +07:00
lenhanphung 3a9b87a41c fix: prettier 2025-09-25 17:11:24 +07:00
lenhanphung 5a9a34d0d3 fix: infinity loop cause by change layout, adjust style 2025-09-25 17:11:22 +07:00
lenhanphung 48ca3fb834 UI: adjust main layout 2025-09-25 17:10:58 +07:00
lenhanphung 7b0ff24c47 style: fix scroll table main grid 2025-09-25 17:10:58 +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 12dc0d7fe1 feat: move headerToolbar functionality to Menubar component
- Remove headerToolbar from FullCalendar and set to false
- Create CalendarLayout component to manage state between Menubar and Calendar
- Add navigation controls (prev/today/next) to Menubar left-menu using MUI ButtonGroup
- Add current date/time display (April 2024 format) to Menubar left-menu
- Add view selector (Month/Week/Day) to Menubar right-menu using MUI Select
- Implement real-time date synchronization between Calendar and Menubar
2025-09-25 17:10:56 +07:00
lenhanphung 5f02f77769 style: hidden first slot label 2025-09-25 17:09:20 +07:00
lenhanphung 3815a13ef9 feat(calendar): update week start day and scroll time
- Change firstDay from 0 (Sunday) to 1 (Monday) to start week on Monday
- Update scrollTime from current time to 12:00 PM for better user experience
- Remove dynamic scroll calculation in favor of fixed noon position
2025-09-25 17:09:20 +07:00