Skip to content

Comments

improve: UI/UX of upcoming events calendar widget#2842

Merged
arkid15r merged 4 commits intoOWASP:mainfrom
ShashaankS:Improve-UI/UX-of-upcoming-events-calendar
Dec 10, 2025
Merged

improve: UI/UX of upcoming events calendar widget#2842
arkid15r merged 4 commits intoOWASP:mainfrom
ShashaankS:Improve-UI/UX-of-upcoming-events-calendar

Conversation

@ShashaankS
Copy link
Contributor

Proposed change

Refactored the existing CalendarButton component with minor changes.

Resolves #2840

Screencast.from.2025-12-10.01-43-28.webm
  • Open to suggestions

Checklist

  • I've read and followed the contributing guidelines.
  • I've run make check-test locally; all checks and tests passed.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 9, 2025

Summary by CodeRabbit

Release Notes

  • New Features
    • Calendar button now displays event date ranges directly with an interactive hover effect that dynamically changes the icon appearance for enhanced visual feedback.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Replaces the standalone calendar icon and separate date text with a single CalendarButton in the event metadata row; CalendarButton now accepts a full event object and label/showLabel props and manages hover state to swap icons between faCalendar and faCalendarPlus.

Changes

Cohort / File(s) Summary
Event date integration
frontend/src/app/page.tsx
Removed separate date span and top-right calendar icon; calls CalendarButton with a full event object (title, description, location, startDate, endDate, url) and passes label (formatted date range) and showLabel.
CalendarButton hover behavior
frontend/src/components/CalendarButton.tsx
Adds client-side isHovered state with onMouseEnter/onMouseLeave; conditionally renders faCalendar or faCalendarPlus based on hover. Icon styling updated (adds mr-1). No exported API removals.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify prop shape and required fields passed from page.tsx to CalendarButton.
  • Confirm hover handlers do not break click behavior, focus, or keyboard accessibility.
  • Ensure label formatting and showLabel behavior preserve prior visual layout and spacing.

Possibly related PRs

Suggested reviewers

  • kasya

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: improving the UI/UX of the calendar widget by replacing button placement and enhancing hover interactions.
Description check ✅ Passed The description clearly states the refactoring of CalendarButton, links to the resolved issue #2840, and provides visual evidence via screencast.
Linked Issues check ✅ Passed The PR successfully addresses all requirements from issue #2840: removes top-right button, repurposes event dates area as interactive element, adds hover icon change from fa-calendar to fa-calendar-plus, and maintains Google Calendar integration.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #2840 requirements: CalendarButton modifications and event page integration align with improving the calendar widget UI/UX.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec6e7ec and ff1a04b.

📒 Files selected for processing (1)
  • frontend/src/app/page.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/app/page.tsx (2)
frontend/src/components/CalendarButton.tsx (1)
  • CalendarButton (7-38)
frontend/src/utils/dateFormatter.ts (1)
  • formatDateRange (22-61)
⏰ 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). (3)
  • GitHub Check: Run backend tests
  • GitHub Check: Run frontend unit tests
  • GitHub Check: Run frontend e2e tests
🔇 Additional comments (1)
frontend/src/app/page.tsx (1)

182-195: Upcoming events date row correctly refactored to use CalendarButton.

This change cleanly moves the “add to calendar” interaction into the date row: the CalendarButton gets the full event payload, shows the formatted date range as the label, and leverages its internal hover state to swap the calendar icon. This aligns with the UX requirements (date area as the interactive element, hover icon change, click → Google Calendar) without introducing new complexity or layout regressions.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51f0709 and 91f0c10.

📒 Files selected for processing (2)
  • frontend/src/app/page.tsx (1 hunks)
  • frontend/src/components/CalendarButton.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
frontend/src/components/CalendarButton.tsx (1)
frontend/src/types/calendar.ts (1)
  • CalendarButtonProps (12-19)
frontend/src/app/page.tsx (2)
frontend/src/components/CalendarButton.tsx (1)
  • CalendarButton (7-38)
frontend/src/utils/dateFormatter.ts (1)
  • formatDateRange (22-61)
🔇 Additional comments (2)
frontend/src/components/CalendarButton.tsx (1)

1-34: LGTM! Clean hover state implementation.

The hover-driven icon transition from faCalendar to faCalendarPlus is implemented correctly. The logic preserves backward compatibility by allowing the optional icon prop to override the default behavior.

frontend/src/app/page.tsx (1)

182-195: Good integration of CalendarButton with event data.

The CalendarButton now consolidates the calendar icon and date display into a single interactive element, fulfilling the PR objective of using the event dates area as the clickable element for adding events to Google Calendar.

@arkid15r arkid15r enabled auto-merge December 9, 2025 22:44
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arkid15r arkid15r added this pull request to the merge queue Dec 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 9, 2025
@arkid15r arkid15r added this pull request to the merge queue Dec 10, 2025
Merged via the queue into OWASP:main with commit 66533c3 Dec 10, 2025
26 checks passed
nileshpahari pushed a commit to nileshpahari/Nest that referenced this pull request Dec 11, 2025
* improve: UI/UX of upcoming events calendar button

* fix: passing showLabel as boolean

* Update code

---------

Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve UI/UX of upcoming event add to calendar widget

2 participants