Skip to content

複数のアクティビティをまとめる機能#159

Merged
mst-mkt merged 3 commits intomainfrom
feat/group-activity_#63
Sep 1, 2025
Merged

複数のアクティビティをまとめる機能#159
mst-mkt merged 3 commits intomainfrom
feat/group-activity_#63

Conversation

@mst-mkt
Copy link
Owner

@mst-mkt mst-mkt commented Sep 1, 2025

issue

resolve #63

description

複数の同一タイプのアクティビティをあとめるようにした

screenshots (optional)

@mst-mkt mst-mkt requested a review from Copilot September 1, 2025 15:28
@mst-mkt mst-mkt self-assigned this Sep 1, 2025
@mst-mkt mst-mkt added the feature label Sep 1, 2025
@vercel
Copy link

vercel bot commented Sep 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
anicotto Ready Ready Preview Comment Sep 1, 2025 3:28pm

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 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 groupActivity function 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">
Copy link

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The CSS class 'top-46' appears to be a typo. It should likely be 'top-16' or another valid Tailwind spacing value.

Suggested change
<Badge className="sticky top-46 h-fit shrink-0" variant="outline">
<Badge className="sticky top-16 h-fit shrink-0" variant="outline">

Copilot uses AI. Check for mistakes.
{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">
Copy link

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The CSS class 'top-46' appears to be a typo. It should likely be 'top-16' or another valid Tailwind spacing value.

Suggested change
<Badge className="sticky top-46 h-fit shrink-0" variant="outline">
<Badge className="sticky top-16 h-fit shrink-0" variant="outline">

Copilot uses AI. Check for mistakes.
<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">
Copy link

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
<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">
Copy link

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +47
export const groupActivity = (activities: ActivityWithThumbnail[]) =>
activities.reduce((acc: GroupedActivity[], activity) => {
Copy link

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@mst-mkt mst-mkt merged commit bda125c into main Sep 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

複数のアクティビティをまとめる

1 participant