-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 2차 QA 반영 #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] 2차 QA 반영 #209
Conversation
WalkthroughThe 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
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
Assessment against linked issues
Suggested reviewers
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
nilis redundant in Swift, as optionals are automatically initialized tonil.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
📒 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 customsetPretendardapproach. This change aligns with the similar improvement inHomeDetailViewController.swift.
258-267: LGTM! Improved placeholder detection and character count logic.The changes enhance the reliability of placeholder detection by checking text color against
.wableBlackinstead 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 = falseproperly dismisses the keyboard while preserving other touch interactions. This pattern is consistent with similar implementations inProfileEditViewController.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
hasUserSelectedImageanddefaultImageensures clean state when the view appears.
110-115: LGTM! Improved state management in switch button handler.The addition of
hasUserSelectedImage = falseand the call toupdateNextButtonState()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 = trueand callingupdateNextButtonState()ensures the UI properly reflects the image selection state.
JinUng41
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다.
다음에는 액션을 위해, @objc 말고 Combine 퍼블리셔를 사용해 보셔도 좋을 것 같아요.
👻 PULL REQUEST
📄 작업 내용
👀 기타 더 이야기해볼 점
🔗 연결된 이슈
Summary by CodeRabbit
Style
New Features
Bug Fixes
Refactor