Add event landing page component, and Kubecon Japan event - #642
Conversation
|
@fishman: The label(s) DetailsIn response to this:
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. |
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a reusable “event landing page” pattern for the HAMi Docusaurus site and adds the first event page (KubeCon Japan 2026) backed by centralized event metadata.
Changes:
- Add a new
EventLandingReact component + CSS module for event-focused landing pages. - Add a centralized
src/data/events.jsregistry with KubeCon Japan 2026 event metadata. - Add a new route page at
/landing/kubecon-japanthat renders the event landing component from the registry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/pages/landing/kubecon-japan.js | Adds the KubeCon Japan landing page that selects an event by slug and renders the shared landing component. |
| src/data/events.js | Introduces an events registry with KubeCon Japan 2026 metadata (title/description/dates/location/resources/CTA). |
| src/components/EventLanding.module.css | Adds styling for the shared event landing page layout (hero, case study, resources, CTA). |
| src/components/EventLanding.js | Adds the shared landing component that renders event metadata with locale-aware strings and resource links. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a localized KubeCon Japan 2026 landing page backed by shared event data, with formatted dates, case-study content, optional resources, tracked links, CTAs, and responsive styling. ChangesEvent landing flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant KubeConJapan
participant events
participant EventLanding
Browser->>KubeConJapan: request landing page
KubeConJapan->>events: find kubecon-japan event
KubeConJapan->>EventLanding: pass localized event
EventLanding-->>Browser: render event landing page
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
dco is red, pls solve it and pls check the outputs of bots, and resolve of if needed |
054f89f to
8912887
Compare
jpeg and pdfs are currently missing and will be added once git-lfs is merged Signed-off-by: Reza Jelveh <fishmangit@dynamia.ai>
8912887 to
06e14a5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (3)
src/components/EventLanding.js:34
- For
zh, the same-month date-range output mixes locales/punctuation (e.g.7月28日 – 30, 2026). It should stay consistently in Chinese and include the proper日suffix/year formatting.
function formatDateRange(startStr, endStr, locale) {
const s = dayjs(startStr);
const e = dayjs(endStr);
if (s.year() === e.year()) {
if (s.month() === e.month()) {
src/components/EventLanding.js:80
styles.caseStudyBodyis referenced, but there is no.caseStudyBodyclass inEventLanding.module.css, so the className evaluates toundefined. Either add the missing style or remove the unused reference to avoid confusion.
<div className={styles.caseStudyBody}>
src/pages/landing/kubecon-japan.js:10
- If the event slug is missing/misspelled in
src/data/events.js,eventbecomesundefinedand this page will crash when accessingevent.title/event.description. Adding a guard makes the failure mode explicit and easier to debug during builds.
const event = events.find((e) => e.slug === "kubecon-japan");
export default function KubeConJapan() {
const { i18n } = useDocusaurusContext();
const isZh = i18n.currentLocale === "zh";
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
src/components/EventLanding.js:37
formatDateRange()builds the “same month” range using${e.date()}, ${e.year()}which produces mixed/incorrect output for Chinese locale (e.g.7月28日 – 30, 2026). The end date and year should be formatted with Chinese suffixes/punctuation whenlocale === "zh".
if (s.year() === e.year()) {
if (s.month() === e.month()) {
return `${fmtShort(startStr, locale)} – ${e.date()}, ${e.year()}`;
}
return `${fmtShort(startStr, locale)} – ${fmtShort(endStr, locale)}, ${e.year()}`;
src/components/EventLanding.js:106
event.resourcesis an empty object insrc/data/events.js, which is truthy, so this section renders with a heading but no links. Gate rendering on there being at least one resource URL to avoid an empty “Event Resources” block.
{event.resources && Object.values(event.resources).some((r) => r?.url) && (
src/theme/BlogPostItem/Header/index.js:3
dayjsis now imported directly, but it is not declared inpackage.jsondependencies (only present inpackage-lock.json). Relying on a transitive/hoisted dependency can break installs when the dependency graph changes; please adddayjsas a direct dependency (or avoid importing it directly).
import dayjs from "dayjs";
00a20da to
19f25e8
Compare
Make utm() safe for relative URLs by returning them unchanged and preserving hash fragments through the URL API. Apply UTM tags to event-provided CTA links too, not only the defaults. Add a formatRange fallback for browsers without Intl formatRange, use noopener noreferrer consistently on external links, and guard the KubeCon Japan page against a failed slug lookup. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/components/EventLanding.js:45
new Date("YYYY-MM-DD")parses as a UTC date, which can render as the previous/next day when formatted in a user’s local timezone (common off-by-one issue for date-only strings). For event dates, parse the date-only string into a local Date (or format in a fixed timezone) before passing toIntl.DateTimeFormat/formatRange.
function formatDate(dateStr, locale) {
return dateFmt(locale).format(new Date(dateStr));
}
The fallback heading was localized but the Layout title stayed English, so zh users got an English tab title. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
Format event dates in UTC so YYYY-MM-DD strings do not shift a day in negative offsets, match Chinese locale variants by prefix instead of exact zh, and key case study highlights by content instead of array index. Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/components/EventLanding.js:52
new Date(dateStr)with a date-only string (YYYY-MM-DD) is parsed inconsistently across browsers (notably Safari historically treats it as local time). Because you then format intimeZone: "UTC", this can shift the displayed date by -1 day for some users. Parse the date string as an explicit UTC midnight timestamp before formatting (and reuse the same parsing in the range formatter).
function formatDate(dateStr, locale) {
return dateFmt(locale).format(new Date(dateStr));
}
function formatDateRange(startStr, endStr, locale) {
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fishman, windsonsea The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
jpeg and pdfs are currently missing and will be added once git-lfs is merged
What type of PR is this?
/kind feature
What this PR does / why we need it:
I want a centralized place where we can track event conversions and a link that we can give out will data people going to the event may want.
Summary by CodeRabbit