Skip to content

fix: time grid 칸 누를 때마다 위로 올라가는 문제 해결#156

Merged
surfwithus merged 1 commit intomainfrom
fix/time-grid
Aug 20, 2025
Merged

fix: time grid 칸 누를 때마다 위로 올라가는 문제 해결#156
surfwithus merged 1 commit intomainfrom
fix/time-grid

Conversation

@surfwithus
Copy link
Collaborator

@surfwithus surfwithus commented Aug 20, 2025

Summary by CodeRabbit

  • 버그 수정
    • 운동 기록 상세 화면의 시간 그리드에서 시간 선택 시 스크롤 위치가 초기화되거나 튀는 현상을 방지했습니다. 선택 이후에도 기존 스크롤 위치를 유지하여 연속 선택 시 화면 흔들림이 줄어듭니다.

@surfwithus surfwithus merged commit 1954861 into main Aug 20, 2025
2 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

TimeGrid gained a ScrollController to preserve scroll position across taps. On tap, it records the current offset, updates selection, triggers onValueChanged, then restores the offset post-frame. The screen removed a dynamic ValueKey when constructing TimeGrid, changing its identity across rebuilds.

Changes

Cohort / File(s) Summary
Exercise Record Screen adjustments
frontend/ongi/lib/screens/health/exercise_record_detail_screen.dart
Removed dynamic ValueKey from TimeGrid instantiation, no longer tying widget identity to selectedDate/selection.
TimeGrid scroll preservation
frontend/ongi/lib/widgets/time_grid.dart
Added private ScrollController with lifecycle management; connected to SingleChildScrollView. On tap: capture scroll offset (if available), perform selection update and onValueChanged, then restore scroll offset via post-frame jumpTo. Minor code structuring/comments added.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor U as User
    participant TG as TimeGrid
    participant SC as ScrollController
    participant CB as onValueChanged (callback)
    note over TG: Time cell tap

    U->>TG: Tap time cell
    TG->>SC: Read current offset (if hasClients)
    TG->>TG: Update selection state
    TG->>CB: Invoke onValueChanged(newValue)
    TG-->>TG: Post-frame callback scheduled
    TG->>SC: jumpTo(savedOffset) to restore scroll
    note over TG,SC: Restore scroll position after rebuild/layout
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

깡총깡총, 코드밭에 바람이 분다,
스크롤은 제자리, 시간은 춤춘다.
키를 내려놓고, 흐름은 가벼워져—
탭 한 번, 콩! 위치는 그대로.
당근 깃발 펄럭, 버그는 물러가라! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

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

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 21c90e3 and 5533104.

📒 Files selected for processing (2)
  • frontend/ongi/lib/screens/health/exercise_record_detail_screen.dart (0 hunks)
  • frontend/ongi/lib/widgets/time_grid.dart (3 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@surfwithus surfwithus deleted the fix/time-grid branch August 20, 2025 18:16
Neibce pushed a commit to 2025-PNU-SW-Hackathon/PNUSW-2025-OnGi-10 that referenced this pull request Aug 25, 2025
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.

1 participant