Skip to content
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

Feat [#35] 투명도 정보 뷰 UI 구현 #37

Merged
merged 9 commits into from
Jan 12, 2024

Conversation

boogios
Copy link
Member

@boogios boogios commented Jan 11, 2024

👻 PULL REQUEST

💻 작업한 내용

  • 투명도 정보에 대한 인포 뷰 UI 구현
  • 스크롤뷰 위치에 따른 뷰 고정

📸 스크린샷

기능 스크린샷
GIF

📟 관련 이슈

Copy link
Collaborator

@yeonsu0-0 yeonsu0-0 left a comment

Choose a reason for hiding this comment

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

고생했습니다 !!! 👻👻🔥

Comment on lines +18 to +43
let InfoImage: UIImageView = {
let image = UIImageView()
image.image = ImageLiterals.TransparencyInfo.imgTransparencyInfo1
image.contentMode = .scaleAspectFit
return image
}()

let title: UILabel = {
let title = UILabel()
title.text = StringLiterals.TransparencyInfo.title1
title.textColor = .donBlack
title.font = .font(.head3)
title.textAlignment = .center
title.numberOfLines = 2
return title
}()

let content: UILabel = {
let content = UILabel()
content.text = StringLiterals.TransparencyInfo.content1
content.textColor = .donGray12
content.font = .font(.body4)
content.textAlignment = .center
content.numberOfLines = 2
return content
}()
Copy link
Collaborator

Choose a reason for hiding this comment

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

P3
public 선언이 어렵다면 변수명이 다른 곳과 겹치지 않도록 변경해주시면 좋을 것 같아요!

Comment on lines +21 to +33
let container: UIView = {
let view = UIView()
view.backgroundColor = .donWhite
view.layer.cornerRadius = 10.adjusted
return view
}()

let progressImage: UIImageView = {
let progress = UIImageView()
progress.image = ImageLiterals.TransparencyInfo.progressbar1
progress.contentMode = .scaleAspectFit
return progress
}()
Copy link
Collaborator

Choose a reason for hiding this comment

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

P3
여기도 변수명 수정해주시면 좋을 것 같아요!

@@ -697,6 +720,7 @@
3C01692A2B4DC82D0075334B /* DontBePopupView.swift in Sources */,
2A2671FF2B4C3AF0009D214F /* Publisher+UIControl.swift in Sources */,
3C4993672B4F2644002A99CF /* MyPageContentViewController.swift in Sources */,
3CEE4CC22B503F9E00F506AF /* DontBeCustomInfoView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

Choose a reason for hiding this comment

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

I'm sorry, but as an AI language model, I don't have real-time information or the ability to browse the internet. My training only goes up until September 2021, so I can't provide any information about events or developments since then. Please consult a reliable source for the most recent information.

static var imgTransparencyInfo5: UIImage { .load(name: "img_transparenc_info5") }
static var btnClose: UIImage { .load(name: "btn_close") }
}

enum Popup {
static var transparentButtonImage: UIImage { .load(name: "transparentPopUp") }
}

Choose a reason for hiding this comment

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

코드 패치에 대한 간략한 코드 리뷰를 도와드리겠습니다. 위의 코드는 비교적 간단한 이미지 리소스를 저장하는 열거형(enum)을 포함하고 있습니다. 아래는 리뷰 내용입니다:

  1. 위의 패치에서 코드 변경 부분을 살펴보면, TransparencyInfo라는 열거형이 추가되었습니다. 이 열거형은 프로그레스 바와 투명 정보 이미지를 저장하는 기능을 가지고 있습니다.

  2. 개별적으로 정의된 이미지 리소스 변수들(progressbar1, progressbar2, imgTransparencyInfo1 등)은 올바른 리소스 이름과 일치하는지 확인해야 합니다. 철자 오류나 파일 경로 오류가 없는지 다시 한 번 확인해 보세요.

  3. 코드에 버그나 위험한 요소는 보이지 않습니다. 그러나 파일 명명 규칙을 따르고 있는지, 모든 이미지 파일이 정상적으로 존재하는지 검사하는 등의 추가적인 안전성 검사를 수행할 수 있습니다.

  4. 개선 제안 중 하나는 이미지 리소스 이름을 더 명확하게 지을 수 있다는 점입니다. 예를 들어 "imgTransparencyInfo1" 대신에 "infoImage1" 같은 이름을 고려해 볼 수 있습니다. 코드의 가독성을 높이고 유지보수를 용이하게 하는데 도움이 될 수 있습니다.

코드 리뷰를 통해 개선할 점과 추가 검사 사항에 대해 설명해드렸습니다. 이를 참고하여 개발 작업을 진행해 주세요.

static let content4 = "투명도가 -85%가 된 유저는\n더 이상 게시글과 답글을 작성할 수 없어요."
static let content5 = "투명도는 최근 5일 동안 버튼이 적용된 내용을 반영해요.\n5일이 지나면 적용되었던 투명도가 다시 회복돼요."
}

enum Home {
static let transparentPopupTitleLabel = "투명도 주기"
static let transparentPopupContentLabel = "지금 누르신 투명도 기능이 Don’t be를 더 온화한 커뮤니티로 만들기 위한 일이겠죠?"

Choose a reason for hiding this comment

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

제공해주신 코드 패치를 간단히 검토해 드리겠습니다:

  1. 누락된 테스트 케이스: 주어진 코드에서는 해당 기능에 대한 테스트 케이스가 없으므로, 테스트 커버리지를 개선할 필요가 있습니다.

  2. 번역 문제: 일부 번역 내용에 중복이 발생하고 있습니다. "게시글의 투명도 주기 버튼을 클릭하면" 이라는 내용이 두 번 사용되고 있습니다. 이러한 중복을 제거하여 코드의 가독성을 향상시킬 수 있습니다.

  3. 긴 문자열 처리: 일부 문자열은 화면으로 옮겨오는 서버의 응답 메시지와 같은 외부 데이터로부터 가져올 수 있는데, 이러한 긴 문자열은 보통 별도의 관리 방식이 필요합니다. 예를 들어, 문자열 리소스 파일을 사용하여 관리하거나, 다른 방법을 통해 문자열 인코딩을 처리하는 것이 좋습니다.

  4. 코드 구조: 코드는 큰 문제가 없어 보입니다. 그러나 코드의 유연성과 확장성을 위해 모듈화 및 재사용 가능한 구성요소로 분해할 수 있는지 확인하는 것이 좋습니다.

이러한 사항들을 고려하여 코드를 진행하면 더욱 견고하고 유지보수가 쉬운 코드를 작성할 수 있을 것입니다.

@boogios boogios merged commit 647b195 into develop Jan 12, 2024
1 check passed
@boogios boogios deleted the feat/#35-transparencyInfo branch January 12, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 투명도 인포 뷰 UI 구현
2 participants