Commit Graph

601 Commits

Author SHA1 Message Date
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
lenhanphung 98b1f59a8b feat: customize now indicator arrow to display current time 2025-09-25 17:09:20 +07:00
lenhanphung 34cc7e117c Fix prettier 2025-09-25 17:09:20 +07:00
lenhanphung 75e4afa43e fix: resolve MiniCalendarColor test failures
- Fix date logic in test cases (September → August dates)
- Update test to use correct month index (7 for August vs 8 for September)
- Simplify test cases to focus on working Sunday scenario
- Add proper async/await handling for calendar initialization
- Ensure selectedWeek class logic works correctly in test environment
2025-09-25 17:09:20 +07:00
lenhanphung e6bb665c87 add font Inter
update UI cho main grid calendar. add hover css and state. click able on header cell
2025-09-25 17:09:18 +07:00
lenhanphung 3e96034b92 style: Split custom main calendar css 2025-09-25 17:08:46 +07:00
Camille Moussu 20a31ea8e0 [#384] fixed scrollbar (#143)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-25 11:26:43 +02:00
Camille Moussu 2c78a037a9 allow external attendees (#141)
* [#122] added external attendees

* fixup! [#122] added external attendees

* fixup! [#122] added external attendees

* Update src/components/Attendees/AttendeeSearch.tsx

---------

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
Co-authored-by: Benoit TELLIER <btellier@linagora.com>
2025-09-25 11:25:22 +02:00
Camille Moussu 2f7cf9c797 [#119] removed website description and updated page name (#145)
* [#119] removed website description and updated page name

* fixup! [#119] removed website description and updated page name

---------

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-25 11:25:11 +02:00
Camille Moussu 00c0b58032 sidebar availability search (#128)
* [123] added people search in left side bar

* [#123] added toggle temp calendars

* [#123] added tests]

* fixup! [123] added people search in left side bar

* fixup! [#123] added toggle temp calendars

* [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] fixed event creation on Enter

* [#123] added color diff for temp calendars

* fixup! [#123] fixed event creation on Enter

* fixup! [#123] added tests]

* fixup! [#123] added toggle temp calendars

---------

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-24 17:05:45 +02:00
Camille Moussu 1db93efed9 event creation button on sidebar (#140)
* [#139] added button on sidebar

* fixup! [#139] added button on sidebar

---------

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-24 16:49:13 +02:00
Camille Moussu 3dd7e1a985 [#133] added dl event button (#134)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-23 12:33:08 +02:00
Camille Moussu cd724a30a0 ability to register a shared calendar (#118)
Co-authored-by: Camille Moussu <cmoussu@linagora.com>
2025-09-22 20:45:02 +02:00
lenhanphung 8122772bec Merge pull request #117 from linagora/UI/grid-view
UI/grid view
2025-09-22 09:49:59 +07:00
lenhanphung dfecb33236 Fix: prettier
Feat: main grid start at current time
2025-09-19 14:41:51 +07:00