Skip to content

Conversation

@JinUng41
Copy link
Collaborator

@JinUng41 JinUng41 commented Apr 15, 2025

👻 PULL REQUEST

📄 작업 내용

  • 사전 신청 후, 앱 재시작 시 기존의 내용을 반영하지 못하는 문제를 해결하였습니다. (원인은 오타,,)
  • 사전 신청 후의 UI를 개선하였습니다. (애니메이션 추가)
구현 내용 IPhone 13 mini
사전 신청 후 UI 개선

👀 기타 더 이야기해볼 점

  • 오타로 인한 에러임에도, 필드 자체가 옵셔널 타입이기 때문에 디코딩 에러로 처리되지 못하고, nil로 할당되었었더라고요. 이것을 해결할 수 있는 방법이 있을지 궁금합니다.

🔗 연결된 이슈

Summary by CodeRabbit

  • Bug Fixes
    • Corrected typos in property names related to community names, ensuring accurate data handling and display.
    • Fixed JSON decoding for community names to improve reliability when processing server responses.
  • Improvements
    • Progress bar updates in community invites now occur without animation for a smoother user experience.
    • Added a feature to automatically scroll to the top item in the community list after completing registration.

@JinUng41 JinUng41 added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🍻 진웅 술 한잔 가온나~ labels Apr 15, 2025
@JinUng41 JinUng41 added this to the 리팩토링 마감 milestone Apr 15, 2025
@JinUng41 JinUng41 requested a review from youz2me April 15, 2025 01:23
@JinUng41 JinUng41 self-assigned this Apr 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Apr 15, 2025

Walkthrough

This update corrects a property name typo from commnunityName to communityName in both the data transfer object and its mapper, ensuring accurate data mapping and decoding. The DTO now includes a CodingKeys enum for proper JSON key mapping. Additionally, the UI is improved by adding a method to scroll the community collection view to the top after registration, and by disabling animation in a progress bar update within a community invite cell.

Changes

File(s) Change Summary
Wable-iOS/Data/Mapper/CommunityMapper.swift, Wable-iOS/Infra/Network/DTO/Response/Community/IsUserRegistered.swift Fixed typo: renamed commnunityName to communityName in both the DTO and its mapper. Added CodingKeys to DTO for JSON mapping.
Wable-iOS/Presentation/Community/View/Cell/CommunityInviteCell.swift Changed progressBar.setProgress animation parameter from true to false in configure method.
Wable-iOS/Presentation/Community/View/CommunityViewController.swift Added scrollToTopItem() method to scroll collection view to top after registration.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CommunityViewController
    participant CollectionView

    User->>CommunityViewController: Complete community registration
    CommunityViewController->>CommunityViewController: scrollToTopItem()
    CommunityViewController->>CollectionView: Scroll to item at (0,0) with animation
    CommunityViewController->>CommunityViewController: Show registration completion sheet
Loading

Assessment against linked issues

Objective Addressed Explanation
Fix DTO typo to resolve registration state loss after app restart (#171)
Improve UI by animating scroll to top of collection view after registration (#171)

Possibly related PRs

Suggested reviewers

  • youz2me

Poem

In the warren of code, a typo did dwell,
"commnunityName"—a mischievous spell!
Now fixed and mapped, the DTO shines bright,
The view scrolls up, a delightful sight.
Progress bars update, but quietly so—
With every hop, our features grow!
🐇✨

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@JinUng41 JinUng41 changed the title Fix/#171 community registration [Fix] 커뮤니티 사전 신청 풀리는 문제 해결 및 UI 개선 Apr 15, 2025
Copy link

@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 (1)
Wable-iOS/Infra/Network/DTO/Response/Community/IsUserRegistered.swift (1)

14-18: Good work fixing the DTO structure!

This change properly fixes the typo in the property name from commnunityName to communityName and adds the CodingKeys enum to map the JSON key "community" to the Swift property. This ensures correct decoding of the network response.

The original issue was likely silent because optional properties don't trigger decoding errors when missing - they just become nil, as you noted in your PR description.

Consider adding a unit test that verifies this specific decoding behavior to catch similar issues in the future.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1d28fd7 and 490a44a.

📒 Files selected for processing (4)
  • Wable-iOS/Data/Mapper/CommunityMapper.swift (1 hunks)
  • Wable-iOS/Infra/Network/DTO/Response/Community/IsUserRegistered.swift (1 hunks)
  • Wable-iOS/Presentation/Community/View/Cell/CommunityInviteCell.swift (1 hunks)
  • Wable-iOS/Presentation/Community/View/CommunityViewController.swift (2 hunks)
🔇 Additional comments (4)
Wable-iOS/Presentation/Community/View/Cell/CommunityInviteCell.swift (1)

71-71: Good UI improvement!

Disabling animation during the progress bar update in the configure method is a sound decision. This prevents unnecessary visual transitions when initially setting up the cell, making the UI feel more responsive and stable.

Wable-iOS/Data/Mapper/CommunityMapper.swift (1)

26-26: Critical typo fix!

Fixed the property name from commnunityName to communityName, which addresses the root cause of issue #171 where pre-registration information wasn't persisting after app restart. This ensures proper data mapping from DTO to domain model.

Wable-iOS/Presentation/Community/View/CommunityViewController.swift (2)

172-172: Nice UX enhancement!

Adding the scroll to top behavior after registration completion is a good UX improvement. This ensures users can immediately see their registered community at the top of the list.


251-260: Robust implementation with proper guards

The scrollToTopItem() method is well-implemented with appropriate guards to check if sections and items exist before attempting to scroll. The animation makes for a smooth user experience.

Copy link
Member

@youz2me youz2me left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 오타였다니 마음이 아프네요...

옵셔널 값에 대한 오류 처리 방법은 사실 잘 생각이 나지 않네요... 다만 기능 구현에 앞서 유닛 테스트를 해볼 수 있다면 좋을 것 같습니다. 저도 이번에 기능 구현하면서 생각보다 이미 구현해놨던 부분에 오류가 많이 생겨서 시간을 많이 잡아먹었는데... 먼저 테스트를 진행했다면 이런 일이 없지 않았을까 싶더라구요.

모든 구현이 끝나면 테스트에 대해 같이 공부해봐도 좋을 것 같습니다 ~! 고생하셨습니닷

@github-project-automation github-project-automation bot moved this to In Review in Wable-iOS Apr 16, 2025
@JinUng41 JinUng41 merged commit 80dd089 into develop Apr 16, 2025
1 check passed
@JinUng41 JinUng41 deleted the fix/#171-community-registration branch April 16, 2025 15:25
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS Apr 16, 2025
youz2me pushed a commit that referenced this pull request Oct 26, 2025
[Fix] 커뮤니티 사전 신청 풀리는 문제 해결 및 UI 개선
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍻 진웅 술 한잔 가온나~ 🛠️ fix 기능적 버그나 오류 해결 시 사용

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Fix] 커뮤니티 사전 신청 후 앱 재시작 시 풀리는 문제 해결

3 participants