fix(dashboard): show all-day events correctly in calendar widget#8545
fix(dashboard): show all-day events correctly in calendar widget#8545stephan1827 wants to merge 1 commit into
Conversation
The CalendarWidget compared DTSTART timestamps with the current time, which caused all-day events (VALUE=DATE, stored as midnight UTC) to be excluded once the clock passed midnight — effectively hiding them all day. Additionally, all-day events were displayed with a time span like "in 10 hours" instead of a meaningful label. This fix detects all-day events by checking whether the DTSTART time component is 00:00:00 (standard VALUE=DATE) or 23:59:59 (used by some third-party providers as a compatibility signal). For these events: - Use a date-based comparison instead of a timestamp comparison so that today's all-day events are always shown. - Display "All day" as the subtitle instead of a formatted time span. Signed-off-by: Stephan Stricker <stephan@stricker.cloud> Signed-off-by: stephan1827 <stephan@stricker.cloud>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
The dashboard calendar widget had two bugs with all-day (VALUE=DATE) events:
DTSTART.timestamp >= now, which always fails after midnight UTC, effectively hiding today's all-day events for the entire day.formatTimeSpan(), showing e.g. "in 10 hours" instead of something meaningful.Changes
00:00:00(standardVALUE=DATE) or23:59:59(used by some third-partyICalendarproviders as a forward-compatibility signal).Y-m-d) instead of timestamp, so today's events are always included.Test plan
🤖 Generated with Claude Code