Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a feature to group multiple activities of the same type together, improving the user experience by consolidating similar activities from the same user.
- Introduces a new
groupActivityfunction that consolidates consecutive activities of the same type from the same user - Replaces individual activity cards with grouped activity items that can display multiple activities together
- Updates the UI components to handle grouped activities with enhanced visual presentation
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/app/_layouts/mobile-menu/mobile-menu.tsx |
Adds z-index styling to prevent UI overlap issues |
src/app/(routes)/users/[username]/(profile)/_components/activity-list-scroller.tsx |
Integrates activity grouping functionality and switches to new ActivityItem component |
src/app/(routes)/users/[username]/(profile)/_components/activity-item.tsx |
New component for displaying grouped activities with enhanced UI layout |
src/app/(routes)/users/[username]/(profile)/_components/activity-info.tsx |
Removes old activity info component (replaced by new grouped approach) |
src/app/(routes)/users/[username]/(profile)/_components/activity-card.tsx |
Refactored to serve as a reusable card component for work display |
src/app/(routes)/group-activity.ts |
Core grouping logic that consolidates activities by type and user |
src/app/(routes)/_components/activity/activity-scroller.tsx |
Applies activity grouping to the main activity feed |
src/app/(routes)/_components/activity/activity-item.tsx |
Updates main activity item component to handle grouped activities |
src/app/(routes)/_components/activity/activity-card.tsx |
New shared activity card component for consistent work display |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| {records.map(({ record, episode }) => ( | ||
| <Fragment key={record.id}> | ||
| <div className="flex items-start gap-x-2"> | ||
| <Badge className="sticky top-46 h-fit shrink-0" variant="outline"> |
There was a problem hiding this comment.
The CSS class 'top-46' appears to be a typo. It should likely be 'top-16' or another valid Tailwind spacing value.
| <Badge className="sticky top-46 h-fit shrink-0" variant="outline"> | |
| <Badge className="sticky top-16 h-fit shrink-0" variant="outline"> |
| {records.map(({ record, episode }) => ( | ||
| <Fragment key={record.id}> | ||
| <div className="flex items-start gap-x-2"> | ||
| <Badge className="sticky top-46 h-fit shrink-0" variant="outline"> |
There was a problem hiding this comment.
The CSS class 'top-46' appears to be a typo. It should likely be 'top-16' or another valid Tailwind spacing value.
| <Badge className="sticky top-46 h-fit shrink-0" variant="outline"> | |
| <Badge className="sticky top-16 h-fit shrink-0" variant="outline"> |
| <div className="rounded-xl border border-muted flex flex-col"> | ||
| <div className="sticky flex flex-col top-16 z-20"> | ||
| <div className="flex items-center gap-x-4 bg-background rounded-xl p-3 pb-0"> | ||
| <div className="relative aspect-square h-27 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> |
There was a problem hiding this comment.
The CSS class 'h-27' is not a standard Tailwind spacing value. It should likely be 'h-24', 'h-28', or another valid height class.
| <div className="relative aspect-square h-27 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> | |
| <div className="relative aspect-square h-28 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> |
| <div className="rounded-xl border border-muted flex flex-col"> | ||
| <div className="sticky flex flex-col top-16 z-20"> | ||
| <div className="flex items-center gap-x-4 bg-background rounded-xl p-3 pb-0"> | ||
| <div className="relative aspect-square h-27 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> |
There was a problem hiding this comment.
The CSS class 'h-27' is not a standard Tailwind spacing value. It should likely be 'h-24', 'h-28', or another valid height class.
| <div className="relative aspect-square h-27 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> | |
| <div className="relative aspect-square h-28 shrink-0 grow-0 overflow-hidden rounded-md md:aspect-video"> |
| export const groupActivity = (activities: ActivityWithThumbnail[]) => | ||
| activities.reduce((acc: GroupedActivity[], activity) => { |
There was a problem hiding this comment.
The groupActivity function uses nested array operations (slice, concat, at) inside a reduce loop, which could be inefficient for large activity lists. Consider using more efficient array manipulation or early returns to optimize performance.
issue
resolve #63
description
複数の同一タイプのアクティビティをあとめるようにした
screenshots (optional)