Skip to content

Conversation

@Eriikah
Copy link
Collaborator

@Eriikah Eriikah commented Dec 8, 2025

related to #384

docker image on eriikaah/twake-calendar-front:issue-384-videourl-addition-in-event-search-results

Summary by CodeRabbit

  • New Features

    • Added a video-conference "Join" button in search results when a meeting link is available; opens the conference in a new window.
  • Improvements

    • Updated result-item layout and spacing for more consistent alignment, stable date/time display, and better overflow handling.
  • Localization

    • Added short "Join" labels for video conferencing in English, French, Russian, and Vietnamese.

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

@Eriikah Eriikah self-assigned this Dec 8, 2025
@Eriikah Eriikah linked an issue Dec 8, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

Adds a video-conference "Join" button to search results and refactors the event item layout from a grid to horizontal flex, stabilizing column widths and element flex behavior. Adds a short "Join" localization key in English, French, Russian, and Vietnamese.

Changes

Cohort / File(s) Summary
Search results layout & UI
src/features/Search/SearchResultsPage.tsx
Replaced grid item layout with a horizontal flex row; added minWidth, maxWidth and flexShrink constraints for time/organizer/location/description; introduced a flexible spacer to align action area; timing rendering adjusted for non-all-day events.
Video conference action
src/features/Search/SearchResultsPage.tsx
Imported VideocamIcon and Button; added conditional "Join" button shown when x-openpaas-videoconference exists; button stops event propagation and opens the conference URL in a new window.
Localization — add short label
src/locales/en.json, src/locales/fr.json, src/locales/ru.json, src/locales/vi.json
Added eventPreview.joinVideoShort translations: "Join" (en), "Rejoindre" (fr), "Присоединиться" (ru), "Tham gia" (vi).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect layout/flex/min-width choices in SearchResultsPage.tsx for responsiveness and truncation across breakpoints.
  • Verify join button behavior: event.stopPropagation, window.open target/sanitization, and accessible label/keyboard focus.
  • Confirm new locale keys are present and consistent across the four JSON files.

Possibly related PRs

Suggested reviewers

  • chibenwa

Poem

🐇 A cam-button pops up with a wink and a ping,
Rows stretch and align while the join-bell does ring.
Short "Join" in four tongues, neat and spry,
Hop in the window — the meeting says hi! 📹

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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a video conference join button to the search results interface. It's specific, concise, and directly reflects the primary modification across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 384-videourl-addition-in-event-search-results

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

🧹 Nitpick comments (1)
src/features/Search/SearchResultsPage.tsx (1)

188-289: Flex row layout and truncation look reasonable; consider small-screen behavior

Switching the result row to a horizontal flex layout with min-widths and ellipsis for organizer, location, and description should improve readability for dense lists. However, with several fixed minWidth values (date, time, organizer, location) there’s a risk of horizontal squeeze or overflow on narrow viewports.

If you see layout issues on smaller screens, consider:

  • Making some widths responsive (e.g., via breakpoints) instead of hard-coded pixel minWidths.
  • Allowing the title and/or description to wrap on small screens instead of forcing everything into one line.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd33a93 and 5879a6b.

📒 Files selected for processing (5)
  • src/features/Search/SearchResultsPage.tsx (4 hunks)
  • src/locales/en.json (1 hunks)
  • src/locales/fr.json (1 hunks)
  • src/locales/ru.json (1 hunks)
  • src/locales/vi.json (1 hunks)
🔇 Additional comments (5)
src/locales/ru.json (1)

244-244: Short join label looks correct and consistent

eventPreview.joinVideoShort matches the existing longer joinVideo text and fits the intended “Join” action in Russian.

src/locales/fr.json (1)

244-244: French short join label is appropriate

eventPreview.joinVideoShort = "Rejoindre" is consistent with the longer joinVideo label and works well as a compact button text.

src/locales/vi.json (1)

244-244: Vietnamese short join label is consistent

eventPreview.joinVideoShort = "Tham gia" correctly reflects the “Join” action and matches the longer video-join text.

src/locales/en.json (1)

244-244: English short join label wired correctly

Adding eventPreview.joinVideoShort = "Join" aligns with the existing joinVideo string and is suitable for the new compact join button.

src/features/Search/SearchResultsPage.tsx (1)

4-5: New imports align with added video join button

Importing VideocamIcon and Button is consistent with the new video-conference join control further down; no issues spotted here.

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: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5879a6b and 7ea6c4c.

📒 Files selected for processing (1)
  • src/features/Search/SearchResultsPage.tsx (4 hunks)
🔇 Additional comments (5)
src/features/Search/SearchResultsPage.tsx (5)

4-5: LGTM! Clean imports for the video join feature.

The VideocamIcon and Button imports are properly structured and used in the video join button implementation.


188-199: LGTM! Layout refactor to flex row enables horizontal element arrangement.

The change from grid to flex row layout appropriately supports the addition of inline action buttons and provides consistent spacing through the gap property.


201-232: LGTM! Date and time display with stabilized widths.

The minWidth constraints on date (90px) and time (120px) elements prevent layout shifts, and the conditional rendering of time for non-all-day events is correct.


234-275: LGTM! Icon, organizer, and location display with proper flex constraints.

The flexShrink: 0 on the calendar icon prevents unwanted shrinking, and the width constraints with ellipsis overflow on organizer and location fields provide stable, predictable layout behavior.


291-306: LGTM! Video join button with proper security hardening.

The join button implementation correctly applies security best practices—window.open includes "_blank", "noopener,noreferrer" to prevent tabnabbing vulnerabilities. The e.stopPropagation() call appropriately prevents the row click handler from firing, and the eventPreview.joinVideoShort translation key exists in all locale files.

Note: Similar window.open calls in src/features/Events/EventDisplayPreview.tsx and src/components/Calendar/handlers/eventHandlers.ts lack these security parameters and should be addressed in separate PRs.

Copy link
Member

@chibenwa chibenwa left a comment

Choose a reason for hiding this comment

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

Functionnally tet on preprod: we are fine!

Image

(Please review rabbit comments, if relevant)

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: 0

🧹 Nitpick comments (1)
src/features/Search/SearchResultsPage.tsx (1)

184-289: Flex row layout looks solid; consider truncation for very long titles

The refactored horizontal layout with fixed-width date/time, constrained organizer/location, and a flexible, ellipsized description reads well and should behave predictably across widths.

One optional UX tweak: the event title at Line 243 currently has no overflow handling. Very long titles could visually overlap adjacent columns or force them to shrink more than desired.

You could add ellipsis handling and make the title the flexible part within its own box:

-        <Box display="flex" flexDirection="row" gap={1} sx={{ minWidth: 0 }}>
-          <Typography sx={styles.M3BodyLarge}>
+        <Box display="flex" flexDirection="row" gap={1} sx={{ minWidth: 0 }}>
+          <Typography
+            sx={{
+              ...styles.M3BodyLarge,
+              flex: 1,
+              minWidth: 0,
+              whiteSpace: "nowrap",
+              overflow: "hidden",
+              textOverflow: "ellipsis",
+            }}
+          >
             {eventData.data.summary || t("event.untitled")}
           </Typography>
           {eventData.data.isRecurrentMaster && <RepeatIcon />}
         </Box>

This keeps the title readable but prevents it from crowding organizer/location/description in edge cases.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7ea6c4c and 6e371d5.

📒 Files selected for processing (1)
  • src/features/Search/SearchResultsPage.tsx (4 hunks)
🔇 Additional comments (2)
src/features/Search/SearchResultsPage.tsx (2)

4-5: New imports are consistent and fully used

VideocamIcon and Button are correctly imported and used only where needed; no dead imports or type issues visible.


290-305: Join button behavior and hardening look correct

The join button is conditionally rendered only when a video URL is present, stops row-click propagation, and uses window.open with "_blank" and "noopener,noreferrer", which addresses the earlier tabnabbing concern. The short localized label also fits the compact layout.

No changes requested here.

@Eriikah Eriikah requested a review from lenhanphung December 10, 2025 10:44
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.

videoURL addition in event search results

3 participants