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

UserInfoCell 구현 #7

Merged
merged 6 commits into from
Nov 15, 2022
Merged

UserInfoCell 구현 #7

merged 6 commits into from
Nov 15, 2022

Conversation

jinwoong16
Copy link
Collaborator

📕 Issue Number

Close #2

📙 작업 내역

구현 내용 및 작업 했던 내역

  • 검색화면에 보여질 셀인, UserInfoCell 구현
    Screenshot 2022-11-14 at 6 06 28 PM

📘 작업 유형

  • 신규 기능 추가
  • 버그 수정
  • 리펙토링
  • 문서 업데이트

📋 체크리스트

  • Merge 하는 브랜치가 올바른가?
  • 코딩컨벤션을 준수하는가?
  • PR과 관련없는 변경사항이 없는가?
  • 내 코드에 대한 자기 검토가 되었는가?
  • 변경사항이 효과적이거나 동작이 작동한다는 것을 보증하는 테스트를 추가하였는가?
  • 새로운 테스트와 기존의 테스트가 변경사항에 대해 만족하는가?

📝 PR 특이 사항

PR을 볼 때 주의깊게 봐야하거나 말하고 싶은 점

  • 현재 임의로 LightGray 색상을 assets에 등록했습니다. 회고때나 스크럼때 에셋등록도 이야기해보아요!

  • 현재 User 엔티티 타입은 아래와 같습니다:

struct User {
    let uuid: UUID
    let nickName: String
    let profile: Data
    let backgroundImage: Data
    let description: String
}

현재는 프로필 이미지가 없을 수도 있을 경우에는 (그러니까 profile이 비어있는 Data 타입의 값일 경우) UIImage(data:)의 반환값이 옵셔널임을 사용하여 처리하고 있습니다. 이를 엔티티 타입의 프로필을 옵셔널로 바꿀지, 아니면 현행상태를 유지하고, DTO에서 domain으로 변환하는 과정에서 프로필 이미지가 없으면 비어있는 Data 타입의 값으로 넣을지 정해야할 것 같아요. 또한 현재의 setup(with:)메서드는 아래와 같습니다:

func setup(with user: User) {
        userName.text = user.nickName
        guard let image = UIImage(data: user.profile) else { return }
        userImage.image = image
}
  • PR도 projects와 mliestone연결이 가능한데, 이부분도 issue처럼 사용할까요? issue처럼 PR에서도 연결하면 꽤나 직관적일 것 같아요.



- 이미지와 이름레이블을 담을 container(UIStackView) 추가
- 이미지를 넣을 UIImageView 추가
- 이름 레이블을 넣을 UILabel 추가
- User 데이터를 통해 뷰에 아이템을 추가할 setup 메서드 정의
- 인자로 넘어온 user에서 image 데이터를 통해 UIImage(data:) 메서드가 nil 이 아니면, 해당 이미지를 userImage에 적용.
@sprituz
Copy link
Member

sprituz commented Nov 14, 2022

고생하셨읍니다.

@jinwoong16 jinwoong16 merged commit f2ad909 into develop Nov 15, 2022
@jinwoong16 jinwoong16 linked an issue Nov 15, 2022 that may be closed by this pull request
3 tasks
@jinwoong16 jinwoong16 deleted the feature/UserInfoCell branch November 15, 2022 01:23
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.

User Info Cell
2 participants