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

드랍유도 컨텐츠 수정 작업 #299

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

wendoei
Copy link
Collaborator

@wendoei wendoei commented Aug 16, 2024

📌 드랍유도 컨텐츠 수정

open #298

내용

  • 메인화면 드랍유도 말풍선 문구 수정
    • UserDefault 에 매 실행시마다 이전에 저장된 LaunchDate 랑 비교해서 일자가 다를 경우에만 드랍유도 말풍선 보여줌
    • 실행시마다 LaunchDate 저장
  • 검색화면 하단 리스트
    • 4개 섹션을 가진 UICollectionView 로 구성, 키워드 검색 시 나오는 리스트는 유지
    • 섹션 헤더 누르면 이동되는 리스트 화면 추가 RecommendMusicListViewController
    • 음악 드랍 화면에서 '나가기' 버튼 제거, 뒤로가기 눌렀을 때 alert 뜨도록 수정
  • 서버 API 연동 완료
    • 드랍유도문구 API 응답이 현재 401 떨어지고 있어서 문의드렸습니다~

스크린샷

image image image

@wendoei wendoei added the Feature 새 기능 및 구성 추가 label Aug 16, 2024
@wendoei wendoei self-assigned this Aug 16, 2024
Copy link
Collaborator

@thoonk thoonk left a comment

Choose a reason for hiding this comment

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

지혜님 고생 많으셨습니다!
Suggestion 한 번 봐주시고 참고하셔서 적용 부탁드립니다~~

추가적으로 추천 음악 리스트 테이블 뷰로 구현해주셨는데
CompositionalLayout Section 의 orthogonalScrollingBehavior.groupPagingCentered 로 추후 변경한다면 UX가 더 개선될거 같습니다 :)


import UIKit

class GuideDetailView: UIView {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class GuideDetailView: UIView {
final class GuideDetailView: UIView {

import RxSwift
import SnapKit

class RecommendHeaderView: UICollectionReusableView {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class RecommendHeaderView: UICollectionReusableView {
final class RecommendHeaderView: UICollectionReusableView {


import Kingfisher

class RecommendKeywordCell: UICollectionViewCell {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class RecommendKeywordCell: UICollectionViewCell {
final class RecommendKeywordCell: UICollectionViewCell {

Comment on lines +117 to +122
Observable.merge(
self.backButton.rx.tap.asObservable()
)
.bind { _ in
self.navigationController?.popViewController(animated: true)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Observable.merge(
self.backButton.rx.tap.asObservable()
)
.bind { _ in
self.navigationController?.popViewController(animated: true)
}
self.backButton.rx.tap
.bind(with: self) { owner, _ in
owner.navigationController?.popViewController(animated: true)
}

@@ -18,39 +18,47 @@ protocol SearchingMusicViewModel: ViewModel {

final class DefaultSearchingMusicViewModel: SearchingMusicViewModel {
private let model: SearchMusicUsecase
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
private let model: SearchMusicUsecase
private let searchMusicUseCase: SearchMusicUsecase

Comment on lines +146 to +149
await self.model.deleteRecentSearch(keyword: keyword)

do {
let recentQueries = try await self.model.getRecentSearches().value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
await self.model.deleteRecentSearch(keyword: keyword)
do {
let recentQueries = try await self.model.getRecentSearches().value
await self.searchMusicUseCase.deleteRecentSearch(keyword: keyword)
do {
let recentQueries = try await self.searchMusicUseCase.getRecentSearches().value

self.location = location
}

func convert(input: Input, disposedBag: DisposeBag) -> Output {
let output = Output()

input.viewDidAppearEvent
input.viewDidLoadEvent
.subscribe(onNext: { [weak self] in
self?.model.getRecentSearches()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self?.model.getRecentSearches()
self?. searchMusicUseCase.getRecentSearches()

input.keywordQueryDidPressEvent
.bind { [weak self] keywordQuery in
self?.searchMusic(output: output, keyword: keywordQuery)
self?.model.saveRecentSearch(keyword: keywordQuery)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self?.model.saveRecentSearch(keyword: keywordQuery)
self?.searchMusicUseCase.saveRecentSearch(keyword: keywordQuery)


import SnapKit

class RecentSearchesHeaderView: UICollectionReusableView {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class RecentSearchesHeaderView: UICollectionReusableView {
final class RecentSearchesHeaderView: UICollectionReusableView {

Comment on lines +19 to +21
let titleLabel = UILabel()
let arrowIconImageView = UIImageView()
let infoIconButton = UIButton()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
let titleLabel = UILabel()
let arrowIconImageView = UIImageView()
let infoIconButton = UIButton()
private let titleLabel = UILabel()
private let arrowIconImageView = UIImageView()
private let infoIconButton = UIButton()

Copy link
Member

@joseph704 joseph704 left a comment

Choose a reason for hiding this comment

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

지혜님 고생 많으셨습니다!! 아래 건의사항 하나만 봐주시면 감사하겠습니다 : )

func getMostDroppedMusicList() -> Single<[Music]>
func getArtistList() -> Single<[Artist]>
func getPromptOfTheDay() -> Single<String?>
func getRecommendSections() -> Single<[RecommendSectionDTO]>
Copy link
Member

Choose a reason for hiding this comment

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

UseCase에서 네트워크 통신 DTO를 반환하도록 되어있는데,
혹시 DTO에 의해 매핑된 Entity를 두고 반환하게 하는 게 어떨까요??
DTO가 변경되도 Entity를 바라보는 Presentation Layer에선 변경점이 없도록 하면 유지보수성이 올라갈 것 같아서요! @thoonk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature 새 기능 및 구성 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants