-
Notifications
You must be signed in to change notification settings - Fork 2
[FEAT/#53] 스티커를 추가 기능 및 테스트 코드 구현 #60
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
Merged
Merged
Conversation
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
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
- 이미지 리스트를 잘 불러오는 지 테스트 Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
- 스티커 불러오기 use case 주입 - ViewModel 생성 시점에 stickerList bind Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
- 기존의 dataRepresentation은 URL 자체를 데이터화 하는 방식 - 이미지 파일 자체를 데이터화 하기 위해서는 Data(contentOf: ) 형태의 생성자를 사용해야 됐음
Closed
hsw1920
approved these changes
Nov 20, 2024
Collaborator
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.
라이브 코드리뷰 완료
@hsw1920 @0Hooni @Kiyoung-Kim-57 @youn9k
youn9k
approved these changes
Nov 20, 2024
Member
youn9k
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.
라이브코드리뷰쇼!!
Closed
3 tasks
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.
🤔 배경
📃 작업 내역
✅ 리뷰 노트
시작은 기존 사각형 추가때와 마찬가지로
stickerButton의tapPublisher에 의해 발동됩니다. 이를 통해 ViewModel에서addStickerToCanvas()메서드가 실행됩니다.addStickerToCanvas()bind()메서드가 호출됩니다.bind()메서드에서는fetchStickerList()메서드가 호출됩니다.fetchStickerList()stickerList인스턴스에 데이터를 저장하도록 합니다.addStickerToCanvas()메서드에서 바로 랜덤한 스티커를 가져올 수 있었습니다.fetchStickerListUseCase는 추상 타입입니다. ViewModel을 생성하는 시점에 주입받을 수 있도록 해줍니다.현재는
EditPhotoRoomHostViewController가 InitialViewController로 설정해주기 위해SceneDelegate에서 생성되고 있는데 이 때 UseCase를 주입해주고 있습니다.fetchStickerListUseCase는DomainInterface모듈에 위치합니다. 이후fetchStickerListUseCaseImpl의 경우에는 Domain 모듈에 위치합니다.FetchStickerListUseCaseImplexecute()메서드만 실행하여 해당 UseCase의 동작을 수행하도록 합니다.shapeRepositoryrepositoryImpl의 경우 Data 모듈에 존재하는 이유에 대해 좀 학습도 해봤습니다.🎨 스크린샷
🚀 테스트 방법
EditPhotoRoomFeatureDemo를 실행시킨 후 하단의 스티커 버튼을 눌러주시면 됩니다. 또한 줌을 하거나 위치를 이동해도 원하는 동작이 잘 작동하는지 확인 가능합니다.