feat(calendar): Add endTime display to calendar event items#39930
feat(calendar): Add endTime display to calendar event items#39930VedantGupta-DTU wants to merge 1 commit intoRocketChat:developfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx`:
- Around line 60-63: The displayed time range in OutlookEventItem currently only
shows the end time (using formatTime(endTime)), which is ambiguous for cross-day
events; update the rendering logic in OutlookEventItem to detect when endTime's
date differs from startTime's date and, in that case, render the end date plus
time (e.g., use formatDateAndTime(endTime) or compose formatDate(endTime) +
formatTime(endTime)) instead of just formatTime(endTime), otherwise keep the
existing " - formatTime(endTime)" behavior; ensure you reference startTime and
endTime and reuse the existing formatDateAndTime and formatTime helpers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9b315273-2f1a-4e8b-a28d-5b942e663218
📒 Files selected for processing (1)
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx
🧠 Learnings (1)
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.
Applied to files:
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx
🔇 Additional comments (1)
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx (1)
8-8: Nice, clean wiring for optionalendTimesupport.The new prop destructuring and
useFormatTimeusage are consistent, and the fallback behavior remains safe whenendTimeis missing.Also applies to: 26-26, 30-30
apps/meteor/client/views/outlookCalendar/OutlookEventsList/OutlookEventItem.tsx
Show resolved
Hide resolved
|
@KevLehman @pierre-lehnen-rc hi kevin and other maintainers this is a small issue i have found so i raise pr for it |
Proposed changes (including videos or screenshots)
Currently, in the Outlook Events sidebar, only the
startTimeof an event is displayed to the user. This leaves out critical context regarding the meeting's duration.This PR updates
OutlookEventItem.tsxto conditionally display theendTimeright next to thestartTime(e.g.,March 28, 2026 10:00 AM - 11:00 AM). We utilize theuseFormatTimehook so only the time portion of theendTimeis displayed, preventing repetitive date text rendering. Note that this falls back gracefully ifendTimeis undefined (which is supported inICalendarEvent).(This PR is raised as an initial contribution towards the GSoC Personal Calendar project proposal).
Issue(s)
N/A (Related to Google Summer of Code 'Personal Calendar' Preparation)
Steps to test or reproduce
Further comments
This is a small UI/UX enhancement to better support the upcoming Personal Calendar features!
Summary by CodeRabbit