Open
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new Tooltip component to the design system, comprising TooltipView, TooltipOverlayView, and a TooltipFactory for management. It also refactors CharacterInputView and ToLoginView to utilize enums for better type safety and updates ToastFactory to an enum. The review feedback highlights opportunities to reduce code duplication regarding window access and hardcoded layout constants, optimize layer management in layoutSubviews, remove the unused TooltipArrowView file, and enhance the user experience by adding a fade-out animation during tooltip dismissal.
| ) | ||
|
|
||
| /// arrow는 툴팁 내부에서 고정 위치 | ||
| let arrowInset: CGFloat = 28 |
Comment on lines
+140
to
+141
| layer.sublayers?.removeAll(where: { $0 is CAShapeLayer }) | ||
| layer.insertSublayer(shapeLayer, at: 0) |
Comment on lines
+1
to
+24
| import UIKit | ||
|
|
||
| import SnapKit | ||
|
|
||
| final class TooltipArrowView: UIView { | ||
|
|
||
| override class var layerClass: AnyClass { | ||
| CAShapeLayer.self | ||
| } | ||
|
|
||
| override func layoutSubviews() { | ||
| super.layoutSubviews() | ||
|
|
||
| let path = UIBezierPath() | ||
| path.move(to: CGPoint(x: bounds.midX, y: bounds.maxY)) | ||
| path.addLine(to: CGPoint(x: bounds.minX, y: bounds.minY)) | ||
| path.addLine(to: CGPoint(x: bounds.maxX, y: bounds.minY)) | ||
| path.close() | ||
|
|
||
| let shape = layer as! CAShapeLayer | ||
| shape.path = path.cgPath | ||
| shape.fillColor = UIColor.whiteMLS.cgColor | ||
| } | ||
| } |
Comment on lines
+11
to
+16
| static var window: UIWindow? { | ||
| UIApplication.shared | ||
| .connectedScenes | ||
| .flatMap { ($0 as? UIWindowScene)?.windows ?? [] } | ||
| .first { $0.isKeyWindow } | ||
| } |
Comment on lines
+99
to
+105
| static func dismiss() { | ||
| currentTooltip?.removeFromSuperview() | ||
| currentTooltip = nil | ||
|
|
||
| overlayView?.removeFromSuperview() | ||
| overlayView = nil | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 이슈
✅ 작업 사항
로그인 유도 UI를 진입 경로에 따라 분기 처리할 수 있도록 수정
레벨 및 직업 입력 UI를 진입 경로에 따라 분기 처리할 수 있도록 수정
도감 리스트 셀에 랭킹 태그를 추가하기 위하여 CardList 및 TagChip 컴포넌트 수정
Tooltip 표시를 위한 컴포넌트 및 Factory 구현
+추가 : 기존 class 타입이었던 ToastFactory를 enum으로 변경하여 인스턴스 생성 방지 및 안정성 개선