Skip to content

Conversation

@interim17
Copy link
Contributor

@interim17 interim17 commented Jan 14, 2026

Problem

Solution

  • New feature (non-breaking change which adds functionality)

Screenshots (optional):

Screenshot 2026-01-13 at 4 09 48 PM Screenshot 2026-01-13 at 4 09 39 PM

Comment on lines +23 to +31
export const PreviewGroup = ({
currentIndex,
imageItems,
mediaItems,
previewVisible,
setCurrentIndex,
setPreviewVisible,
setSelectedMedia,
}: ImagePreviewGroupProps) => {
Copy link
Contributor Author

@interim17 interim17 Jan 14, 2026

Choose a reason for hiding this comment

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

Moved from ImagesAndVideos

Strictly speaking this component doesn't get re-used so doesn't deserve to be a component, but I was trying to reduce line count and separate concerns in ImagesAndVideo it does get rendered in two places, but is the same in both.

Comment on lines +17 to +18
import { PreviewGroup } from "./ImagePreviewGroup";
import { MediaCard } from "./MediaCard";
Copy link
Contributor Author

@interim17 interim17 Jan 14, 2026

Choose a reason for hiding this comment

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

I pulled the preview component, and MediaCard (along with renderMediaItems() into separate files to make this a little less intimidating to read.

@interim17 interim17 marked this pull request as ready for review January 20, 2026 20:52
@interim17 interim17 requested a review from Copilot January 20, 2026 22:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements swipable media cards for small screens by refactoring the ImagesAndVideos component into a more modular structure. The changes introduce responsive behavior that displays media in a horizontally scrollable card layout on tablet and mobile devices, while maintaining the original layout for larger screens.

Changes:

  • Refactored ImagesAndVideos component into separate, focused modules (MediaCard, ImagePreviewGroup, and main component)
  • Added responsive swipable card layout for tablet/mobile viewports with scroll-snap behavior
  • Updated padding and styling to support the new mobile card experience

Reviewed changes

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

Show a summary per file
File Description
src/templates/disease-cell-line.tsx Updated import path to reflect new component directory structure
src/templates/cell-line.tsx Updated import path to reflect new component directory structure
src/style/layout.module.css Changed content padding from 0 to 8px on small screens
src/style/index.sass Added global overscroll prevention for vertical scrolling
src/style/images-and-videos.module.css Added extensive mobile/tablet styling for swipable cards and updated media query breakpoints
src/components/ImagesAndVideos.tsx Removed entire file as part of refactoring into modular components
src/components/ImagesAndVideo/MediaCard.tsx New component handling individual media card rendering
src/components/ImagesAndVideo/ImagesAndVideos.tsx New main component with responsive layout logic
src/components/ImagesAndVideo/ImagePreviewGroup.tsx New component handling image preview functionality

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

gap: 20px;
overflow-x: auto;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;

This comment was marked as resolved.

videoIframe,
} = require("../../style/images-and-videos.module.css");

interface MobileImageCardProps {

This comment was marked as resolved.

Comment on lines +163 to +170
{mediaItems.map((_item, index) => (
<MediaCard
className={mobileMediaCard}
key={index}
index={index}
title={title}
isMobile={isMobile}
item={mediaItems[index]}
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The _item parameter is unused (indicated by the underscore prefix) but then mediaItems[index] is accessed on line 170. Consider removing the underscore and using the item parameter directly instead of re-accessing the array by index.

Suggested change
{mediaItems.map((_item, index) => (
<MediaCard
className={mobileMediaCard}
key={index}
index={index}
title={title}
isMobile={isMobile}
item={mediaItems[index]}
{mediaItems.map((item, index) => (
<MediaCard
className={mobileMediaCard}
key={index}
index={index}
title={title}
isMobile={isMobile}
item={item}

Copilot uses AI. Check for mistakes.
Base automatically changed from fix/tab-swipe to main January 21, 2026 22:53
Copy link

@TravisKroeker TravisKroeker left a comment

Choose a reason for hiding this comment

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

approving in anticipation of merging the changes we discussed

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for cell-catalog ready!

Name Link
🔨 Latest commit c837b62
🔍 Latest deploy log https://app.netlify.com/projects/cell-catalog/deploys/69727204af37f8000860632a
😎 Deploy Preview https://deploy-preview-411--cell-catalog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@interim17 interim17 requested review from meganrm and rugeli January 22, 2026 21:08
@meganrm
Copy link
Collaborator

meganrm commented Jan 26, 2026

@interim17: checking on this: the description still says "DRAFT" and Travis seems to have asked for changes. Are those things both addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants