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

Map Search 화면 구현 #23

Merged
merged 10 commits into from
Mar 20, 2024
Merged

Map Search 화면 구현 #23

merged 10 commits into from
Mar 20, 2024

Conversation

Minny27
Copy link
Member

@Minny27 Minny27 commented Mar 14, 2024

Motivation ⍰

  • 지역 키워드 검색 화면 구현을 위함

Key Changes 🔑

구현 미리보기는 다음과 같습니다.

compositional layout 적용했고 최근 검색은 API 연동해서 샘플 데이터를 응답받아서 collection view에 표시하도록 구현했습니다.
이 부분은 내장 DB를 사용할 지 서버를 연동할 지 몰라서 일단은 API 연동하는 방식으로 구현했습니다.

네비 바 디자인은 추후에 진행할 예정입니다.

use case interface와 repository interface를 나누기로 했었는데 추후에 리팩토링하겠습니다.


To Reviewers 🙏🏻

  • 검색 텍스트 필드 클릭 시, 검색 화면으로 잘 넘어가는지 확인해주세요.

Linked Issue 🔗

Minny27 added 9 commits March 14, 2024 16:20
- 기존에는 textField로 구현했었으나, 실제로 보여주기만 하기 때문에 UIView로 커스텀
- view model에 action에 함수 추가 후, 해당 함수를 호출하는 함수 구현
- 이벤트 발생 시, 해당 함수 호출
- DI에 vc, usecase, view model 생성 함수 추가
- Coordinator에 toMapSearch 함수 구현
- 홈에서 이미지 로딩이 오래 걸려서 이미지 캐싱 구현 전까지는 주석 처리
- compositional layout 적용
- 샘플 데이터로 부터 응답받은 최신 검색 키워드를 collection view에 표시하도록 구현
- 네비 바 디자인은 추후에 진행할 예정
- base collection view cell 구현
- entity, use case response type, repository
- use case interface와 repository interface를 나누기로 했었는데 추후에 할 예정
@Minny27 Minny27 added the Feature New feature label Mar 14, 2024
@Minny27 Minny27 requested review from cestbonciel and Jeon0976 March 14, 2024 07:55
@Minny27 Minny27 self-assigned this Mar 14, 2024
@Minny27 Minny27 requested a review from hililyy March 14, 2024 07:55
Comment on lines +11 to +24
lazy var textLabel: UILabel = {
let label = UILabel()
label.text = "검색어를 입력하세요"
label.font = UIFont.ngaSubTitle2R
label.textAlignment = .center
label.textColor = NagazaAsset.Colors.gray4.color
return label
}()

lazy var searchImageView: UIImageView = {
let imageView = UIImageView()
imageView.image = NagazaAsset.Images.imgSearch.image
return imageView
}()
Copy link
Member

Choose a reason for hiding this comment

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

lazy로 선언하신 이유가 궁금합니다.

Copy link
Member

Choose a reason for hiding this comment

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

private는 깜박하신거죵?! ㅋㅋ

Copy link
Member Author

Choose a reason for hiding this comment

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

lazy 키워드를 쓰는 이유른 해당 객체에 접근했을 때 메모리에 올라가서 lazy를 쓰는게 더 효율적이라고 판단했습니다

Copy link
Member Author

Choose a reason for hiding this comment

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

Private 키워드는 까먹었네요
수정하겠습니다

@Jeon0976
Copy link
Member

위 데이터는 단순 String 데이터이면서, 기기에 종속되도 크게 문제없는 데이터라고 생각해서 UserDefaults만으로도 충분할것같습니다.

최근검색 데이터도 최대 개수 제한 및 최신데이터가 상위에 있고 검색결과에 클릭한 제목 결과를 최근검색 데이터에 저장하는 방식은 어떨까요?

@Minny27
Copy link
Member Author

Minny27 commented Mar 18, 2024

저도 최근 검색은 앱에 내장해도 된다고 생각해서 내장 db를 쓸까 생각중입니다.
이거는 결정되면 수정하겠습니다.
클릭한 제목 결과는 검색 결과가 나오는 키워드를 말씀하시는 건지 잘은 모르겠는데
저 개인적으로는 사용자가 검색 버튼을 클릭했을 때 검색했던 키워드를 기준으로 하는게 어떤가 싶긴합니다.

Copy link
Member

@Jeon0976 Jeon0976 left a comment

Choose a reason for hiding this comment

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

코드 검토간 별도 특이사항은 확인하지 못했습니다.
수고하셨습니다 승민님 ㅎㅎ

- 해당 클래스 내에서만 사용하는 프로퍼티들의 접근 지정 연산자를 private으로 설정
@Minny27 Minny27 merged commit 74a7997 into develop Mar 20, 2024
@Minny27 Minny27 deleted the Feature/map_serach_api branch March 20, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants