Skip to content

Fix/#315 components#317

Merged
pinocchio22 merged 6 commits intodevfrom
fix/#315-Components
Apr 8, 2026
Merged

Fix/#315 components#317
pinocchio22 merged 6 commits intodevfrom
fix/#315-Components

Conversation

@pinocchio22
Copy link
Copy Markdown
Contributor

📌 이슈

✅ 작업 사항

  • 로그인유도 UI 수정
  • 레벨 / 직업 입력 UI 수정
  • 도감리스트 셀 수정(랭킹 추가)

@pinocchio22 pinocchio22 requested a review from dongglehada April 8, 2026 08:20
@pinocchio22 pinocchio22 self-assigned this Apr 8, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new design system module for the MLS project, including various UI components like buttons, alerts, input fields, and list views, along with necessary assets and utility extensions. My review highlights several areas for improvement: ensuring consistent resource loading using the design system's asset manager instead of direct image initialization, improving encapsulation in list components, fixing potential constraint issues in buttons, and correcting log levels for font registration.


func makeButton(label: UILabel) -> UIButton {
let button = UIButton()
let icon = UIImageView(image: UIImage(named: "rightArrow"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Swift Package 내의 리소스를 로드할 때는 Bundle.module을 명시해야 합니다. UIImage(named:)를 직접 사용하면 메인 번들에서 이미지를 찾으려 하므로 패키지 외부에서 사용 시 이미지를 로드하지 못할 수 있습니다. DesignSystemAsset.image(named:)를 사용하여 일관성을 유지하세요.

Suggested change
let icon = UIImageView(image: UIImage(named: "rightArrow"))
let icon = UIImageView(image: DesignSystemAsset.image(named: "rightArrow"))

// MARK: - Properties
private let iconView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "error")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Swift Package 내의 리소스를 로드할 때는 Bundle.module을 명시해야 합니다. UIImage(named:)를 직접 사용하면 메인 번들에서 이미지를 찾으려 하므로 패키지 외부에서 사용 시 이미지를 로드하지 못할 수 있습니다. DesignSystemAsset.image(named:)를 사용하여 일관성을 유지하세요.

Suggested change
view.image = UIImage(named: "error")
view.image = DesignSystemAsset.image(named: "error")

// MARK: - SetUp
private extension FloatingActionButton {
func configureUI() {
setImage(UIImage(named: "fab"), for: .normal)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Swift Package 내의 리소스를 로드할 때는 Bundle.module을 명시해야 합니다. UIImage(named:)를 직접 사용하면 메인 번들에서 이미지를 찾으려 하므로 패키지 외부에서 사용 시 이미지를 로드하지 못할 수 있습니다. DesignSystemAsset.image(named:)를 사용하여 일관성을 유지하세요.

Suggested change
setImage(UIImage(named: "fab"), for: .normal)
setImage(DesignSystemAsset.image(named: "fab"), for: .normal)

// MARK: - Components
private let warningIconView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "warning")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Swift Package 내의 리소스를 로드할 때는 Bundle.module을 명시해야 합니다. UIImage(named:)를 직접 사용하면 메인 번들에서 이미지를 찾으려 하므로 패키지 외부에서 사용 시 이미지를 로드하지 못할 수 있습니다. DesignSystemAsset.image(named:)를 사용하여 일관성을 유지하세요.

Suggested change
view.image = UIImage(named: "warning")
view.image = DesignSystemAsset.image(named: "warning")

// MARK: - Properties
public let iconView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "edit")?.withRenderingMode(.alwaysTemplate)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Swift Package 내의 리소스를 로드할 때는 Bundle.module을 명시해야 합니다. UIImage(named:)를 직접 사용하면 메인 번들에서 이미지를 찾으려 하므로 패키지 외부에서 사용 시 이미지를 로드하지 못할 수 있습니다. DesignSystemAsset.image(named:)를 사용하여 일관성을 유지하세요.

Suggested change
view.image = UIImage(named: "edit")?.withRenderingMode(.alwaysTemplate)
view.image = DesignSystemAsset.image(named: "edit").withRenderingMode(.alwaysTemplate)

Comment on lines +138 to +141
let imageView = view.subviews.compactMap { $0 as? UIImageView }.first
print("이미지 뷰 설정")
imageView?.image = index < images.count ? images[index] : nil
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

ItemImageView의 내부 subviews에 직접 접근하여 UIImageView를 찾는 방식은 캡슐화를 해치고 구조 변경 시 오류가 발생할 가능성이 높습니다. ItemImageView에 이미 정의된 setImage 메서드를 사용하는 것이 좋으며, 디버깅용 print 문은 삭제해야 합니다.

        for (index, view) in imageViews.enumerated() {
            let image = index < images.count ? images[index] : nil
            view.setImage(image: image, backgroundColor: .neutral200)
        }

Comment on lines +121 to +123
snp.makeConstraints { make in
make.height.equalTo(style.height)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

configureUI 메서드는 isEnabled 값이 변경될 때마다 호출되는데, 이때 snp.makeConstraints를 호출하면 중복된 제약 조건이 계속 추가됩니다. snp.remakeConstraints를 사용하여 기존 제약 조건을 대체하거나, 제약 조건 설정을 초기화 시점에 한 번만 수행하도록 수정해야 합니다.

Suggested change
snp.makeConstraints { make in
make.height.equalTo(style.height)
}
snp.remakeConstraints { make in
make.height.equalTo(style.height)
}


if let error = error {
os_log(.error, "Error registering font: \(error.takeUnretainedValue())")
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

폰트 등록 성공 메시지를 출력할 때 .error 로그 레벨을 사용하는 것은 부적절합니다. 성공적인 동작은 .info 또는 .debug 레벨을 사용하는 것이 로그 분석 시 혼란을 줄일 수 있습니다.

Suggested change
} else {
os_log(.info, "\(fontName) registered successfully")

@pinocchio22 pinocchio22 merged commit f7f2e52 into dev Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants