Skip to content

Conversation

@young-jin-son
Copy link
Collaborator

@young-jin-son young-jin-son commented Jul 17, 2025

Issue Number

close #299

As-Is

To-Be

Check List

  • 테스트가 전부 통과되었나요?
  • 모든 commit이 push 되었나요?
  • merge할 branch를 확인했나요?
  • Assignee를 지정했나요?
  • Label을 지정했나요?

Test Screenshot

변경 전 변경 후
image image

(Optional) Additional Description

Summary by CodeRabbit

  • New Features

    • Added mood images to daily feedback, enhancing visual representation of user moods.
    • Explicit empty state messages are now shown when there are no completed goals in both daily and weekly category lists.
  • Style

    • Improved typography, spacing, and color for daily and weekly statistics components for a more polished and readable interface.
    • Updated layout and styling for category achievements, feedback, and overview sections to enhance clarity and consistency.
  • Bug Fixes

    • Adjusted mock data for daily and weekly statistics to better reflect realistic scenarios and improve test coverage.

@young-jin-son young-jin-son self-assigned this Jul 17, 2025
@young-jin-son young-jin-son added design css와 같은 스타일링 FE 프론트엔드 작업 labels Jul 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 17, 2025

Walkthrough

This update modifies mock JSON data for daily and weekly statistics, adjusts styling and layout for several components on the Day and Week Statistics pages, and enhances the display logic for empty states and feedback. New styled components are introduced, and typography, spacing, and image usage are refined throughout the relevant UI components.

Changes

Files/Groups Change Summary
frontend/src/mocks/data/statistics/dayStatistics.json, frontend/src/mocks/data/statistics/weekStatistics.json Updated mock data structure and values for daily and weekly statistics, including new fields and adjusted category/mood data.
frontend/src/pages/DayStatisticsPage/DayStatisticsPage.styled.ts, .../DayTimeOverview.styled.ts, .../GuideSlide.styled.ts, .../WeekCategoryItem.styled.ts Adjusted spacing, border-radius, font styles, and layout properties for various styled components.
frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/DayCategoryAchievement.styled.ts, .../index.tsx Updated title text, added/modified styled components for category achievement, and improved empty state handling and layout.
frontend/src/pages/DayStatisticsPage/components/DayFeedback/DayFeedback.styled.ts, .../index.tsx Enhanced feedback display with mood images, new containers, and updated font and alignment styles.
frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryList.styled.ts, .../index.tsx Added and used a new styled component for empty state messaging in the weekly category list.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant DayStatisticsPage
  participant DayCategoryAchievement
  participant DayFeedback

  User->>DayStatisticsPage: Visits Day Statistics Page
  DayStatisticsPage->>DayCategoryAchievement: Render with categories
  DayCategoryAchievement-->>DayStatisticsPage: Rendered (with index, badge, count or empty state)
  DayStatisticsPage->>DayFeedback: Render with feedbacks
  DayFeedback-->>DayStatisticsPage: Rendered (with mood image, mood text, memo or empty state)
Loading
sequenceDiagram
  participant User
  participant WeekStatisticsPage
  participant WeekCategoryList

  User->>WeekStatisticsPage: Visits Week Statistics Page
  WeekStatisticsPage->>WeekCategoryList: Render with categoryRanking
  alt categoryRanking not empty
    WeekCategoryList-->>WeekStatisticsPage: Rendered list of WeekCategoryItem
  else
    WeekCategoryList-->>WeekStatisticsPage: Rendered empty state message
  end
Loading

Assessment against linked issues

Objective Addressed Explanation
Reflect design revisions for the daily statistics page (#299)
Update UI components and styling for Day Statistics page (#299)
Improve empty state handling and feedback display (#299)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related PRs

  • #138: Adds API interfaces and fetching logic for daily and weekly statistics, complementing this PR's mock data and UI updates.

Suggested labels

refactor

Poem

A bunny hopped through CSS and code,
Tweaking stats and feedback mode.
With fonts now bold and images bright,
Empty states feel just right.
Mock data fresh, the UI shines anew—
This rabbit’s work is nearly through!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 (3)
frontend/src/pages/DayStatisticsPage/components/DayTimeOverview/DayTimeOverview.styled.ts (1)

10-12: Use theme radius token instead of a magic-number

Hard-coding 1.2rem breaks consistency if the design-system radius changes. Consider border-radius: ${({ theme }) => theme.radii.md}; (or an equivalent token) to stay DRY and future-proof.

frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryList.styled.ts (1)

15-23: Promote empty-state component re-use

CategoryListEmpty duplicates styling already introduced for the daily view (DayCategoryAchievementEmpty). Extract a shared “EmptyStateMessage” styled component to avoid divergence and simplify maintenance.

frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/DayCategoryAchievement.styled.ts (1)

47-55: DRY up empty-state styles

DayCategoryAchievementEmpty repeats the same centering & spacing rules seen in other components (e.g., CategoryListEmpty). Extracting a shared styled component (or a mixin) will cut duplication and keep future tweaks in one place.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2c4e9a2 and b0aabd6.

📒 Files selected for processing (12)
  • frontend/src/mocks/data/statistics/dayStatistics.json (2 hunks)
  • frontend/src/mocks/data/statistics/weekStatistics.json (1 hunks)
  • frontend/src/pages/DayStatisticsPage/DayStatisticsPage.styled.ts (1 hunks)
  • frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/DayCategoryAchievement.styled.ts (2 hunks)
  • frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/index.tsx (1 hunks)
  • frontend/src/pages/DayStatisticsPage/components/DayFeedback/DayFeedback.styled.ts (3 hunks)
  • frontend/src/pages/DayStatisticsPage/components/DayFeedback/index.tsx (2 hunks)
  • frontend/src/pages/DayStatisticsPage/components/DayTimeOverview/DayTimeOverview.styled.ts (1 hunks)
  • frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts (1 hunks)
  • frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryItem/WeekCategoryItem.styled.ts (1 hunks)
  • frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryList.styled.ts (1 hunks)
  • frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/index.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/index.tsx (1)
frontend/src/types/filter.ts (1)
  • CategoryType (2-2)
frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/DayCategoryAchievement.styled.ts (1)
frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryItem/WeekCategoryItem.styled.ts (2)
  • CategoryIndex (23-26)
  • CategoryCount (34-37)
🔇 Additional comments (22)
frontend/src/pages/LandingPage/components/ServiceGuide/GuideSlide/GuideSlide.styled.ts (1)

25-28: Verify image responsiveness after switching to % width

width: 65% scales with the container but removes the previous max-width safeguard. On wide screens this could stretch the asset or impact clarity. Please confirm:

  1. Aspect ratio remains intact (object-fit / explicit height not needed?).
  2. The image never exceeds its intended pixel size.

If issues appear, combine width: 65% with a reasonable max-width.

frontend/src/mocks/data/statistics/weekStatistics.json (1)

26-34: Confirm consumer logic handles new / negative fields

The added keys (totalTodoCount, lastWeekDiff, totalAvailableTime, moodCounts) look good syntactically. Ensure the UI:

  • Formats negative lastWeekDiff correctly (e.g., prefixes “-” vs. “↓470 분”).
  • Gracefully handles an empty or single-entry moodCounts array.

No action needed here if already covered by unit tests.

frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/DayCategoryAchievement.styled.ts (2)

10-13: Typography upgrade looks correct

Switching to the medium font variant aligns with other PR changes.


37-40: Check index colour contrast

CategoryIndex uses gray300; with large text this may still fall below WCAG AA if the background is white. Please run a quick contrast check and pick a darker shade if necessary.

frontend/src/pages/DayStatisticsPage/DayStatisticsPage.styled.ts (1)

18-20: Good spacing adjustments for better visual hierarchy.

The reduced gap (4rem → 3.2rem) creates tighter spacing between elements, while the added bottom padding (8rem) provides better scrolling experience and prevents content cutoff. These refinements align well with UI polish objectives.

frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/WeekCategoryItem/WeekCategoryItem.styled.ts (1)

24-25: Enhanced typography for better visual prominence.

The lighter color (gray300) and larger font size (title28) improve the visibility and readability of category indices. These changes create better visual hierarchy and align with the design system updates.

frontend/src/pages/DayStatisticsPage/components/DayFeedback/index.tsx (2)

3-11: Well-implemented mood image enhancement.

The addition of mood images with proper mapping improves the visual feedback experience. The image imports are clean and the MOOD_IMAGES record provides a maintainable way to associate mood states with their corresponding images.


33-38: Good structure for mood display with image and text.

The new DayFeedbackMoodContainer properly groups the mood image and text together. The alt text usage supports accessibility, and the layout enhances the visual hierarchy of the feedback display.

frontend/src/pages/WeekStatisticsPage/components/WeekStatisticsMain/WeekCategoryList/index.tsx (1)

18-24: Excellent empty state implementation.

The conditional rendering properly handles the case when no categories exist, showing a user-friendly message "수행한 목표가 없어요". This improves the UX by providing clear feedback instead of showing an empty list, and follows standard React patterns.

frontend/src/pages/DayStatisticsPage/components/DayCategoryAchievement/index.tsx (2)

16-16: Improved title for better clarity.

The title change from "목표별 수행 개수" to "수행한 목표" is more concise and user-friendly, making it consistent with the weekly statistics component.


17-31: Comprehensive enhancement with empty state and indexed categories.

The implementation adds several valuable improvements:

  • Conditional rendering provides proper empty state handling
  • Category index numbers improve readability and provide ranking context
  • New container structure organizes the layout better
  • Empty state message is consistent with other components
  • All changes enhance UX while maintaining existing functionality
frontend/src/mocks/data/statistics/dayStatistics.json (3)

3-5: New fields added to support enhanced statistics features.

The addition of memberCreateDate and totalTodoCount fields, along with the updated totalUsageTime value, appear to support enhanced daily statistics functionality. The changes align with the PR's objective of reflecting design modifications.


8-9: Feedback mood and memo updated for testing.

The change from "DISSATISFIED" to "MODERATE" mood with an updated memo provides better test coverage for different mood states in the UI.


22-36: Mock data aligns with DayStatistics model

All changes to categoryTodoCounts in frontend/src/mocks/data/statistics/dayStatistics.json match the DayStatistics interface in frontend/src/api/statistics.ts—which defines category as string and count as number with no enum constraints. The removal of "OTHERS" and "READING", reordering of "HOBBY", and adjusted counts are purely mock-data refinements and won’t violate the API contract.

• DayStatistics.categoryTodoCounts:
– category: string
– count: number

No enum or union type is enforced on categories in the front end. Changes look correct.

frontend/src/pages/DayStatisticsPage/components/DayFeedback/DayFeedback.styled.ts (8)

11-11: Typography improved with medium weight font.

The change to medium weight font improves visual hierarchy and consistency across the component.


18-27: Enhanced scrollbar handling and alignment.

The alignment change to flex-start and comprehensive scrollbar hiding across different browsers (webkit, Firefox, IE/Edge) improves the component's visual consistency and cross-browser compatibility.


33-33: Minimum height added for consistent item sizing.

The min-height: 12rem ensures consistent feedback item dimensions, improving visual alignment in the list.


44-48: New mood container component for better layout.

The DayFeedbackMoodContainer provides proper spacing and alignment for mood-related elements, supporting the enhanced design with mood images.


51-51: Mood text typography enhanced.

The change to headline17Med improves the visual prominence of mood information.


55-59: New mood image component added.

The DayFeedbackMoodImage component with fixed dimensions and circular shape provides consistent visual representation of mood states.


62-62: Memo text styling improved.

The medium weight font enhances readability and maintains typography consistency.


71-74: Empty state styling enhanced.

The change from fixed height to flex-grow: 1 and medium weight font improves the empty state's visual integration and typography consistency.

@young-jin-son young-jin-son merged commit cfef467 into develop Jul 17, 2025
3 checks passed
@young-jin-son young-jin-son deleted the refactor/#299 branch July 17, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design css와 같은 스타일링 FE 프론트엔드 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 일간 통계 페이지 디자인 수정사항 반영

2 participants