Skip to content

Conversation

@youz2me
Copy link
Member

@youz2me youz2me commented Jun 4, 2025

👻 PULL REQUEST

📄 작업 내용

  • 상세 화면 댓글 작성 텍스트뷰 로직을 수정했어요.
  • 상세 화면 게시 버튼 활성화 조건을 수정했어요.

💻 주요 코드 설명

조합 중인 텍스트 확인 로직 추가

let hasMarkedText = textView.markedTextRange != nil
placeholderLabel.isHidden = hasText || hasMarkedText
  • markedTextRange를 사용하면 조합 중인 텍스트를 확인할 수 있다고 합니다.
  • 해당 로직을 추가해 텍스트를 조합 중일 때에도 비어있다고 인식하지 않도록 코드를 수정했습니다.

🔗 연결된 이슈

Summary by CodeRabbit

  • Bug Fixes
    • Improved the logic for enabling the comment button, ensuring it is not enabled when the input contains only whitespace or newlines.
  • Refactor
    • Streamlined and unified the logic for showing and hiding the placeholder in the comment input field for more consistent behavior.
  • UI Improvements
    • Enhanced layout flexibility for comment status indicators to improve visual spacing and presentation.

@youz2me youz2me requested a review from JinUng41 June 4, 2025 03:17
@youz2me youz2me self-assigned this Jun 4, 2025
@youz2me youz2me added the 🛠️ fix 기능적 버그나 오류 해결 시 사용 label Jun 4, 2025
@youz2me youz2me added this to Wable-iOS Jun 4, 2025
@youz2me youz2me added the 🦉 유진 🛌🛌🛌🛌🛌🛌🛌🛌🛌🛌 label Jun 4, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 4, 2025

"""

Walkthrough

The UITextViewDelegate methods in HomeDetailViewController were refactored to centralize placeholder visibility logic into a new private method. Button enabling was also improved by trimming whitespace before checking for emptiness, and direct placeholder logic was removed from shouldChangeTextIn.

Changes

File(s) Change Summary
Wable-iOS/Presentation/Home/View/HomeDetailViewController.swift Refactored UITextViewDelegate methods: centralized placeholder logic in updatePlaceholderVisibility, improved button enabling, and cleaned up delegate methods.
Wable-iOS/Presentation/WableComponent/Cell/CommentCollectionViewCell.swift Removed debug log; modified layout constraints for blindImageView to be more flexible with bottom and height constraints.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UITextView
    participant HomeDetailViewController
    participant PlaceholderLabel
    participant CreateCommentButton

    User->>UITextView: Edits text
    UITextView->>HomeDetailViewController: textViewDidChange
    HomeDetailViewController->>HomeDetailViewController: updatePlaceholderVisibility(textView)
    HomeDetailViewController->>PlaceholderLabel: Hide/show based on text or markedText
    HomeDetailViewController->>CreateCommentButton: Enable if trimmed text is not empty
Loading

Assessment against linked issues

Objective Addressed Explanation
Fix issue where placeholder and single character are shown together (#224)
Fix issue where button is enabled initially (#224)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Removed debug log and adjusted layout constraints in CommentCollectionViewCell.swift These changes are unrelated to the placeholder and button enabling issues described in #224.

Suggested reviewers

  • JinUng41

Poem

A carrot of code, a nibble of view,
The placeholder now hides, as it ought to do!
No ghostly text when comments are few—
And whitespace alone won’t let buttons through.
With tidy logic, this rabbit hops,
Cheering for code that never stops! 🥕✨
"""


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c6501a2 and 7fe2f7f.

📒 Files selected for processing (1)
  • Wable-iOS/Presentation/WableComponent/Cell/CommentCollectionViewCell.swift (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
Wable-iOS/Presentation/WableComponent/Cell/CommentCollectionViewCell.swift (1)
Wable-iOS/Presentation/Helper/Extension/ConstraintMaker+.swift (1)
  • adjustedHeightEqualTo (45-48)
🔇 Additional comments (1)
Wable-iOS/Presentation/WableComponent/Cell/CommentCollectionViewCell.swift (1)

288-289: LGTM: Improved constraint flexibility for blind comment layout.

The constraint modifications enhance layout robustness:

  • lessThanOrEqualTo prevents potential overlap with the ghost button
  • .priority(.high) allows the height constraint to be broken if necessary, avoiding constraint conflicts

These changes align with Auto Layout best practices for flexible UI components.

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

Good!

@github-project-automation github-project-automation bot moved this to In Review in Wable-iOS Jun 4, 2025
@youz2me youz2me merged commit 4dc7eba into develop Jun 4, 2025
1 check passed
@youz2me youz2me deleted the fix/#224-qa branch June 4, 2025 06:36
@github-project-automation github-project-automation bot moved this from In Review to Done in Wable-iOS Jun 4, 2025
youz2me added a commit that referenced this pull request Oct 26, 2025
[Fix] 상세 화면 댓글 작성 뷰 로직 수정
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