Skip to content

Add Events page from Google Calendar#632

Merged
hami-robot[bot] merged 14 commits into
Project-HAMi:masterfrom
fishman:events-calendar
Jul 23, 2026
Merged

Add Events page from Google Calendar#632
hami-robot[bot] merged 14 commits into
Project-HAMi:masterfrom
fishman:events-calendar

Conversation

@fishman

@fishman fishman commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
  • Create new Events page with 2-week calendar grid, agenda view, and category filters

Co-authored-by: deepseek deepseek@users.noreply.github.com
Signed-off-by: Reza Jelveh fishmangit@dynamia.ai

What type of PR is this?

/kind documentation
/kind feature

What this PR does / why we need it:

This is based on the vLLM events page. https://vllm.ai/events

Summary by CodeRabbit

  • New Features
    • Added an Events page accessible from the main navigation.
    • Displays upcoming community events in a two-week calendar and agenda view.
    • Added week navigation, “Today” shortcut, category filters, event details, locations, and tags.
    • Supports recurring events, localized Chinese and English date/time formatting, dark mode, and responsive layouts.
    • Added a community call calendar and a Discord invitation call to action.

Copilot AI review requested due to automatic review settings July 22, 2026 12:04
@hami-robot

hami-robot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@fishman: The label(s) kind/documentation, kind/feature cannot be applied, because the repository doesn't have them.

Details

In response to this:

  • Create new Events page with 2-week calendar grid, agenda view, and category filters

Co-authored-by: deepseek deepseek@users.noreply.github.com
Signed-off-by: Reza Jelveh fishmangit@dynamia.ai

What type of PR is this?

/kind documentation
/kind feature

What this PR does / why we need it:

This is based on the vLLM events page. https://vllm.ai/events

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 908b1e4
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a612096ed75e60009ca07e5
😎 Deploy Preview https://deploy-preview-632--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mesutoezdil, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 3 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6fdc25d7-847a-4e59-aef2-a7682c459e97

📥 Commits

Reviewing files that changed from the base of the PR and between b9a6eb4 and 908b1e4.

📒 Files selected for processing (2)
  • i18n/zh/docusaurus-theme-classic/navbar.json
  • src/pages/events.js
📝 Walkthrough

Walkthrough

Adds ICS calendar ingestion through a Docusaurus plugin, publishes expanded events as global data, and introduces a localized two-week events page with filtering, navigation, agenda rendering, responsive styling, and an Events navbar link.

Changes

Events calendar

Layer / File(s) Summary
ICS ingestion and event publishing
package.json, docusaurus.config.js, src/plugins/events/index.js
Adds node-ical, configures a Community Call ICS source, expands recurring events over six months, and publishes sorted event data globally.
Localized event page data
src/utils/date.js, src/pages/events.js
Adds locale-aware date/time formatters and derives the Sunday-anchored 14-day window, category filters, and per-day event mapping.
Events page rendering and navigation
src/pages/events.js, docusaurus.config.js
Renders filters, week controls, day cards, agenda entries, empty states, CTA content, and the Events navigation link.
Responsive events page styling
src/pages/events.module.css
Adds page, calendar, agenda, CTA, dark-mode, and mobile-responsive styles.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CalendarSource
  participant EventsPlugin
  participant GlobalData
  participant EventsPage
  CalendarSource-->>EventsPlugin: provide ICS feed
  EventsPlugin->>EventsPlugin: parse and expand VEVENT entries
  EventsPlugin->>GlobalData: publish sorted events
  EventsPage->>GlobalData: read events
  EventsPage-->>EventsPage: filter and group by local day
  EventsPage-->>Visitor: render calendar and agenda
Loading

Suggested labels: enhancement

Suggested reviewers: windsonsea, copilot

Poem

I nibbled the dates into neat little rows,
With moonlit reminders wherever life goes.
The calendars bloom, the agendas take flight,
Two weeks of gatherings sparkle just right.
Hop through the weeks—this bunny says “cheers!” 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a new Events page backed by Google Calendar integration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an Events feature to the HAMi Docusaurus site by ingesting a public Google Calendar ICS feed at build time and rendering a new /events page with a two-week grid, agenda list, and category filtering.

Changes:

  • Introduces a custom Docusaurus plugin (plugin-events) to fetch/expand ICS events and expose them via global data.
  • Adds a new Events page (/events) with a two-week grid + agenda view, plus styling.
  • Wires the plugin and navbar route into docusaurus.config.js, and adds node-ical as a dependency.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/plugins/events/index.js New Docusaurus plugin to fetch and expand calendar events from ICS sources into global data.
src/pages/events.js New Events page consuming plugin global data and rendering a 2-week grid + agenda + filters.
src/pages/events.module.css Styling for the Events page layout, grid cards, agenda list, and responsive behavior.
docusaurus.config.js Registers the events plugin with a Google Calendar ICS source and adds “Events” to the navbar.
package.json Adds node-ical dependency required by the events plugin.
package-lock.json Locks node-ical (and transitive deps) into the dependency graph.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread docusaurus.config.js Outdated
Comment thread src/plugins/events/index.js Outdated
Copilot AI review requested due to automatic review settings July 22, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (5)

src/pages/events.js:10

  • dateKey() uses toISOString() (UTC) to build the YYYY-MM-DD key, but the rest of the page logic (startOfDay, sameDay) works in local time. In non-UTC timezones this can shift the key by a day and mis-bucket events.
const dateKey = (d) => d.toISOString().slice(0, 10);

src/pages/events.js:146

  • The previous-period nav button only renders an arrow glyph; title isn’t a reliable accessible name for screen readers. Add an aria-label so the control is announced clearly.
                <button
                  className={styles.navArrow}
                  onClick={() => setWeekOffset((o) => o - 1)}
                  disabled={weekOffset <= 0}
                  title={isZh ? "前两周" : "Previous two weeks"}

src/plugins/events/index.js:1

  • This new file isn’t formatted consistently with the repo’s Prettier config (singleQuote: false), which will cause npm run format:check to fail. Reformat the file (or run npm run format) before merging.
import ical from 'node-ical';

src/pages/events.js:160

  • The next-period nav button only renders an arrow glyph; title isn’t a reliable accessible name for screen readers. Add an aria-label so the control is announced clearly.
                <button
                  className={styles.navArrow}
                  onClick={() => setWeekOffset((o) => o + 1)}
                  title={isZh ? "后两周" : "Next two weeks"}

package.json:45

  • node-ical@^0.27.1 currently resolves to a release that requires Node >=22 (per the lockfile), but this repo’s CI/Netlify builds run Node 20. This dependency range will break installs/builds on the current infrastructure.
    "node-ical": "^0.27.1",

Comment thread src/pages/events.js Outdated
Comment thread src/plugins/events/index.js Outdated
Comment thread src/plugins/events/index.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/plugins/events/index.js Outdated
Comment thread src/plugins/events/index.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread package-lock.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 9 comments.

Comment thread src/plugins/events/index.js Outdated
Comment thread src/plugins/events/index.js
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
Comment thread src/pages/events.js Outdated
The grid derives from new Date() at render time, so the build-time
server markup could differ from the client's first render and
break hydration. Gate the dynamic calendar section behind
useIsBrowser, keeping the hero and CTA server-rendered.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Copilot AI review requested due to automatic review settings July 22, 2026 18:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (4)

src/pages/events.js:119

  • The category filter buttons behave like a toggle group, but they don’t expose state to assistive tech. Add aria-pressed to communicate which filter is active.
                      <button
                        className={`${styles.filterPill} ${activeCategory === null ? styles.filterPillActive : ""}`}
                        onClick={() => setActiveCategory(null)}
                      >
                        {isZh ? "全部" : "All"}

src/pages/events.js:126

  • The per-category filter buttons should also expose their pressed state (aria-pressed) so screen readers can tell which category is active.
                        <button
                          key={cat}
                          className={`${styles.filterPill} ${activeCategory === cat ? styles.filterPillActive : ""}`}
                          onClick={() => setActiveCategory(activeCategory === cat ? null : cat)}
                        >

src/pages/events.js:195

  • key={${ev.start}-${ev.summary}} can collide (same title + start time), causing React to reuse DOM nodes incorrectly and log key warnings. Include more fields (end/location/categories) to make the key more unique, or pass through a UID from the ICS source.
                              <div key={`${ev.start}-${ev.summary}`} className={styles.agendaEvent}>

src/plugins/events/index.js:54

  • The catch block logs only err.message, which can be undefined for non-Error throws and drops useful stack/context for debugging build failures. Log the full error object instead.
        } catch (err) {
          console.warn(
            `plugin-events: failed to parse "${src.name}" (${src.icsUrl}), skipping:`,
            err.message,
          );
        }

Comment thread src/pages/events.js Outdated
toLocaleDateString output is not guaranteed stable across ICU
builds, so derive the local YYYY-MM-DD key from date fields
directly.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Copilot AI review requested due to automatic review settings July 22, 2026 19:00
Without it the Chinese site shows the English label.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil

Copy link
Copy Markdown
Contributor

/lgtm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/pages/events.js:120

  • The category filter pills act like toggle buttons, but they don’t expose their pressed state to assistive tech. Add aria-pressed (and type="button" to avoid implicit submit behavior if this gets embedded in a form later) for both the “All” button and per-category buttons.
                      <button
                        className={`${styles.filterPill} ${activeCategory === null ? styles.filterPillActive : ""}`}
                        onClick={() => setActiveCategory(null)}
                      >
                        {isZh ? "全部" : "All"}

Comment thread src/pages/events.js
Copilot AI review requested due to automatic review settings July 22, 2026 19:04

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/pages/events.js (1)

114-131: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add aria-pressed to category filter toggle buttons.

The "All" and category pills visually toggle selected state via CSS class but don't expose it to assistive tech. Since these buttons toggle their own on/off state (not a menu trigger), aria-pressed is the correct attribute here.

♻️ Proposed fix
                       <button
                         className={`${styles.filterPill} ${activeCategory === null ? styles.filterPillActive : ""}`}
                         onClick={() => setActiveCategory(null)}
+                        aria-pressed={activeCategory === null}
                       >
                         {isZh ? "全部" : "All"}
                       </button>
                       {categories.map((cat) => (
                         <button
                           key={cat}
                           className={`${styles.filterPill} ${activeCategory === cat ? styles.filterPillActive : ""}`}
                           onClick={() => setActiveCategory(activeCategory === cat ? null : cat)}
+                          aria-pressed={activeCategory === cat}
                         >
                           {cat}
                         </button>
                       ))}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/events.js` around lines 114 - 131, Add aria-pressed to the “All”
button and each category button in the categories filter rendered by the events
page. Bind it to the same selection state used by the active CSS classes: true
when All is selected or the category matches activeCategory, and false
otherwise.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/pages/events.js`:
- Around line 114-131: Add aria-pressed to the “All” button and each category
button in the categories filter rendered by the events page. Bind it to the same
selection state used by the active CSS classes: true when All is selected or the
category matches activeCategory, and false otherwise.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 581b1941-6277-4d32-87c3-6509837afa63

📥 Commits

Reviewing files that changed from the base of the PR and between 92796bd and b9a6eb4.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • package.json
  • src/pages/events.js
  • src/pages/events.module.css
  • src/plugins/events/index.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • package.json
  • src/pages/events.module.css

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

src/pages/events.js:120

  • The “All” category pill is a toggle, but it doesn’t expose its selected state to assistive tech. Add aria-pressed (and type="button") so screen readers can announce the active filter.
                      <button
                        className={`${styles.filterPill} ${activeCategory === null ? styles.filterPillActive : ""}`}
                        onClick={() => setActiveCategory(null)}
                      >
                        {isZh ? "全部" : "All"}

src/pages/events.js:127

  • Category pills behave like toggle buttons (clicking the active category clears the filter), but the pressed/unpressed state isn’t exposed. Add aria-pressed (and type="button") to each category button so the active filter is announced correctly.
                        <button
                          key={cat}
                          className={`${styles.filterPill} ${activeCategory === cat ? styles.filterPillActive : ""}`}
                          onClick={() => setActiveCategory(activeCategory === cat ? null : cat)}
                        >

src/plugins/events/index.js:53

  • The catch block logs only err.message, which drops stack traces and can be undefined if a non-Error is thrown. Logging the error object preserves useful debugging information in CI/build logs.
        } catch (err) {
          console.warn(
            `plugin-events: failed to parse "${src.name}" (${src.icsUrl}), skipping:`,
            err.message,
          );

Comment thread src/pages/events.js
Memoize the date window on weekOffset and today so eventsByDay
and daysWithEvents actually cache between renders, and bucket
events by computing their day key once instead of scanning all
visible days per event.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Copilot AI review requested due to automatic review settings July 22, 2026 19:46
@hami-robot hami-robot Bot removed the lgtm label Jul 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

src/pages/events.js:113

  • The category filter button is a toggle, but it doesn’t expose its pressed state to assistive tech. Consider adding aria-pressed (and also explicitly setting type="button" to match the project’s button usage) so screen readers can understand which filter is active.
                      <button
                        className={`${styles.filterPill} ${activeCategory === null ? styles.filterPillActive : ""}`}
                        onClick={() => setActiveCategory(null)}
                      >

src/pages/events.js:121

  • The per-category filter buttons are also toggles; without aria-pressed, the selected state is only conveyed visually. Adding aria-pressed improves accessibility. Also set type="button" to avoid implicit submit behavior.
                        <button
                          key={cat}
                          className={`${styles.filterPill} ${activeCategory === cat ? styles.filterPillActive : ""}`}
                          onClick={() => setActiveCategory(activeCategory === cat ? null : cat)}
                        >

Comment thread src/pages/events.js
Comment thread src/pages/events.js
Add type=button to the filter and navigation buttons for
consistency with the rest of the codebase, and render a short
fallback message during SSR and for no-JS visitors instead of an
empty section.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil

Copy link
Copy Markdown
Contributor

/lgtm

@windsonsea windsonsea left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/approve

@hami-robot hami-robot Bot added the approved label Jul 23, 2026
@hami-robot

hami-robot Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fishman, FouoF, windsonsea

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot
hami-robot Bot merged commit 09f36bf into Project-HAMi:master Jul 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants