Skip to content

Conversation

@youz2me
Copy link
Member

@youz2me youz2me commented May 27, 2025

👻 PULL REQUEST

📄 작업 내용

  • 기존 상세 페이지 댓글 작성 영역, 글 작성 페이지 제목, 본문 영역에 구현되어 있던 자간, 행간을 삭제했어요.
  • 2차 QA에서 나온 사항들을 반영했어요.
    • 프로필 수정 시 사진만 수정해도 프로필 수정이 가능하도록 조건을 추가했어요.
    • 글 작성 시 글자 제한을 499자에서 500자로 수정했어요.
    • 댓글 작성 시 뷰 영역 클릭 시 키보드가 내려가도록 수정했어요.
    • 프로필 수정 뷰에서 중복 확인 버튼 클릭 시 키보드가 내려가도록 구현했어요.
  • 상세 페이지에서 게시글 프로필 클릭 시 페이지가 전환되는 로직을 구현했어요.
    • 이 부분은 제가 구현을 깜빡해서 ㅎㅎ... 이번 이슈에서 같이 작업했습니다!

👀 기타 더 이야기해볼 점

  • 자간 행간 삭제는 기획-디자인과 모두 이야기된 부분이라 걱정 안하셔도 됩니다! 이후 타자 영역 문제가 해결되면 다시 넣어둘 계획입니다.

🔗 연결된 이슈

Summary by CodeRabbit

  • Style

    • Improved formatting of profile setting titles for better readability.
    • Adjusted comment input and post writing views for more consistent spacing and font usage.
  • New Features

    • Added the ability to dismiss the keyboard by tapping outside the comment input area.
    • Enhanced profile editing to better detect and respond to changes in nickname or profile image.
  • Bug Fixes

    • Refined placeholder and character count handling in post writing to ensure accurate limits and feedback.
  • Refactor

    • Centralized logic for enabling the profile edit button, improving UI responsiveness when editing profile details.

@youz2me youz2me requested a review from JinUng41 May 27, 2025 15:16
@youz2me youz2me self-assigned this May 27, 2025
@youz2me youz2me added 🛠️ fix 기능적 버그나 오류 해결 시 사용 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌 labels May 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 27, 2025

Walkthrough

The changes update UI and interaction logic for profile editing, post writing, and comment input views. They refine text view styling, placeholder handling, character counting, and keyboard dismissal. Profile editing now tracks image selection and nickname changes for enabling the next button. Minor string literal formatting is also adjusted.

Changes

File(s) Change Summary
.../Core/Literals/String/StringLiterals+ProfileSetting.swift Modified the editTitle string literal to include a newline character for two-line display.
.../Presentation/Home/View/HomeDetailViewController.swift Updated comment text view font/insets, adjusted height constraints, added tap gesture for keyboard dismissal, refined profile tap logic.
.../Presentation/Home/View/WritePostViewController.swift Refined stack spacing, placeholder detection, character counting, color logic, and text view font/insets for post writing.
.../Presentation/Profile/Edit/ProfileEditViewController.swift Refactored to track user-selected images, updated next button enabling logic, centralized state checks, and improved UI responsiveness.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WritePostViewController
    participant HomeDetailViewController
    participant ProfileEditViewController

    User->>WritePostViewController: Enter text / interact with text views
    WritePostViewController->>WritePostViewController: Update placeholder, count, enable post button

    User->>HomeDetailViewController: Tap comment text view
    HomeDetailViewController->>HomeDetailViewController: Adjust font, insets, height
    User->>HomeDetailViewController: Tap outside text view
    HomeDetailViewController->>HomeDetailViewController: Dismiss keyboard

    User->>ProfileEditViewController: Change nickname or select image
    ProfileEditViewController->>ProfileEditViewController: Track changes, update next button state
    User->>ProfileEditViewController: Tap next
    ProfileEditViewController->>ProfileEditViewController: Save changes if needed or pop view
Loading

Assessment against linked issues

Objective (Issue #) Addressed Explanation
글 작성 뷰 수정 (#208)
상세페이지 댓글 작성 뷰 수정 (#208)

Suggested reviewers

  • JinUng41

Poem

A carrot for each pixel placed just right,
Text views now cozy, their spacing a delight.
Tap, type, and count—your words are in line,
Profiles respond with a button that shines.
With every fix, this rabbit hops in glee—
QA’s wishes granted, as smooth as can be!
🥕✨

✨ 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

@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/Presentation/Profile/Edit/ProfileEditViewController.swift (1)

30-31: Fix redundant nil initialization.

The static analysis tool correctly identifies that initializing an optional variable with nil is redundant in Swift, as optionals are automatically initialized to nil.

Apply this diff to remove the redundant initialization:

-    private var defaultImage: String? = nil
+    private var defaultImage: String?
🧰 Tools
🪛 SwiftLint (0.57.0)

[Warning] 30-30: Initializing an optional variable with nil is redundant

(redundant_optional_initialization)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 752fbb5 and 8f49f2c.

📒 Files selected for processing (4)
  • Wable-iOS/Core/Literals/String/StringLiterals+ProfileSetting.swift (1 hunks)
  • Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (6 hunks)
  • Wable-iOS/Presentation/Home/View/WritePostViewController.swift (4 hunks)
  • Wable-iOS/Presentation/Profile/Edit/ProfileEditViewController.swift (7 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
Wable-iOS/Presentation/Home/View/WritePostViewController.swift (2)
Wable-iOS/Presentation/Helper/Extension/UIFont+.swift (1)
  • pretendard (93-95)
Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (1)
  • textView (833-845)
Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (4)
Wable-iOS/Presentation/Helper/Extension/UIFont+.swift (1)
  • pretendard (93-95)
Wable-iOS/Presentation/Profile/Edit/ProfileEditViewController.swift (2)
  • setupTapGesture (98-102)
  • dismissKeyboard (106-108)
Wable-iOS/Presentation/Onboarding/ViewController/ProfileRegisterViewController.swift (2)
  • setupTapGesture (85-89)
  • dismissKeyboard (93-95)
Wable-iOS/Presentation/TabBar/TabBarController.swift (1)
  • tabBarController (189-205)
🪛 SwiftLint (0.57.0)
Wable-iOS/Presentation/Profile/Edit/ProfileEditViewController.swift

[Warning] 30-30: Initializing an optional variable with nil is redundant

(redundant_optional_initialization)

🔇 Additional comments (16)
Wable-iOS/Core/Literals/String/StringLiterals+ProfileSetting.swift (1)

18-18: LGTM! Clean text formatting improvement.

Adding the newline character to split the Korean text into two lines enhances the UI presentation.

Wable-iOS/Presentation/Home/View/WritePostViewController.swift (4)

28-28: LGTM! Spacing adjustment improves layout.

Reducing the stack view spacing from 12 to 4 creates tighter vertical spacing between UI elements.


31-45: LGTM! Cleaner font assignment approach.

The direct font assignment using .pretendard() static method is cleaner than the previous custom setPretendard approach. This change aligns with the similar improvement in HomeDetailViewController.swift.


258-267: LGTM! Improved placeholder detection and character count logic.

The changes enhance the reliability of placeholder detection by checking text color against .wableBlack instead of placeholder-specific colors. The character count now properly shows error styling when reaching the 500-character limit.


354-381: LGTM! Consistent placeholder detection in text input validation.

The updated logic consistently uses text color checks and string comparison for reliable placeholder detection. The character limit calculation correctly enforces the 500-character total limit.

Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift (5)

81-87: LGTM! Improved text view styling configuration.

The direct font assignment and individual text container inset settings provide better control over the comment input styling. The asymmetric insets (top=12, left=8, bottom=12) offer more precise padding control.


129-129: LGTM! Enhanced UX with tap gesture and better height constraints.

Adding setupTapGesture() and updating the height constraints (min=42, max=76) improves the comment input experience with proper sizing and keyboard dismissal functionality.

Also applies to: 173-175


194-198: LGTM! Well-implemented tap gesture for keyboard dismissal.

The tap gesture implementation with cancelsTouchesInView = false properly dismisses the keyboard while preserving other touch interactions. This pattern is consistent with similar implementations in ProfileEditViewController.swift.


296-317: LGTM! Proper profile navigation logic implementation.

The enhanced profile image tap handler correctly distinguishes between the active user (navigates to tab index 4) and other users (pushes OtherProfileViewController). The dependency injection for the view model is properly structured.


702-708: LGTM! Standard keyboard dismissal implementation.

Clean and straightforward implementation of the keyboard dismissal method.

Wable-iOS/Presentation/Profile/Edit/ProfileEditViewController.swift (6)

62-63: LGTM! Proper state reset in viewWillAppear.

Resetting both hasUserSelectedImage and defaultImage ensures clean state when the view appears.


110-115: LGTM! Improved state management in switch button handler.

The addition of hasUserSelectedImage = false and the call to updateNextButtonState() properly tracks the image selection state and updates the UI accordingly.


134-135: LGTM! Enhanced UX with keyboard dismissal.

Adding endEditing(true) before the duplication check improves the user experience by dismissing the keyboard.


153-188: LGTM! Well-structured profile update logic.

The refactored logic properly detects changes in both nickname and image, then either updates the profile or simply pops the view controller. The conditional logic is clear and handles all scenarios correctly.


219-230: LGTM! Excellent centralization of button state logic.

The new updateNextButtonState() method centralizes the logic for enabling/disabling the next button, improving maintainability and consistency. This follows good software engineering practices.


266-267: LGTM! Consistent state tracking in PHPicker delegate.

Setting hasUserSelectedImage = true and calling updateNextButtonState() ensures the UI properly reflects the image selection state.

Copy link
Collaborator

@JinUng41 JinUng41 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다.

다음에는 액션을 위해, @objc 말고 Combine 퍼블리셔를 사용해 보셔도 좋을 것 같아요.

@github-project-automation github-project-automation bot moved this to In Review in Wable-iOS May 27, 2025
@youz2me youz2me merged commit 606fe17 into develop May 27, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS May 27, 2025
@youz2me youz2me deleted the fix/#208-textview-qa branch May 27, 2025 15:42
youz2me added a commit that referenced this pull request Oct 26, 2025
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] UITextView 자간, 행간 수정 및 2차 QA 반영

3 participants