Skip to content

Conversation

@nolanMinsung
Copy link
Contributor

@nolanMinsung nolanMinsung commented Jun 25, 2025

🌴 작업한 브랜치

✅ 작업한 내용

오브의 추천소에서 추천 장소 목록이 없을 경우, 엠티 케이스를 구현했습니다.

아래 스크린샷 이미지를 참고해 주세요

오브의 추천소에서 네이버 지도로 이동하는 기능을 구현했습니다.

관련하여 네이버 지도로 이동하기 버튼을 표현할 이미지 애셋을 추가하였습니다.

현재 코드에서는 네이버 지도 앱이 설치되어있지 않으면 앱스토어로 이동하도록 하였습니다.
원래 기획대로면 앱 설치가 안 되어있는 경우 웹을 띄우도록 해야합니다.
이 부분은 WKWebView를 사용해야 하는 것 같더라구요.
그래서 일단은 현재 기능들을 먼저 main에 머지하고 해당 기능은 추후 개발 진행해야 할 것 같습니다!

❗️PR Point

📸 스크린샷

엠티 케이스

홈 버튼이 없는 비율 홈 버튼이 있는 비율

네이버 지도로 이동

ScreenRecording_06-25-2025.18-02-41_1.mp4

Copy link
Collaborator

@Johyerin Johyerin 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 +96 to +104


// MARK: ORBEmptyCaseStyle

extension ORBRecommendedContentView: ORBEmptyCaseStyle {

typealias placeholder = ORBRecommendationEmptyCaseView

}
Copy link
Collaborator

Choose a reason for hiding this comment

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

요부분은 특별하게 extension으로 분리해두신 이유가 있을까요?!

Copy link
Contributor Author

@nolanMinsung nolanMinsung Jun 28, 2025

Choose a reason for hiding this comment

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

프로토콜을 채택하고, 그 프로토콜의 함수를 구현하게 되면서 코드 관리를 위해 확장으로 빼는 경우가 있습니다.
일반적으로 UICollectionViewDataSourceUICollecitonViewDelegate 같은 경우가 그러합니다.

이 경우 역시 placeholder라는 associatedtypeORBEmptyCaseStyle에서 정의한 것이라서 위의 내용처럼 코드를 확장으로 분리한 것이라고 생각해주시면 될 것 같습니다!
(그러면 코드를 처음 보는 사람들도 '아, 이 placeholder라는 건 ORBEmptyCaseStyle에서 정의한 associatedtype이구나' 하고 쉽게 추측할 수 있을 것 같습니다.)

다른 코드들에서는 그냥 typealias를 속성을 배치하는 곳에 넣긴 했는데,
프로토콜과 직접적으로 관련이 있는 내용이라서 이렇게 한 번 배치해 봤습니다!
혹시 헷갈릴 것 같아면, 이런 부분들을 컨벤션으로 지정해도 좋을 것 같아요!

Copy link
Member

@codeJiwon codeJiwon left a comment

Choose a reason for hiding this comment

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

구현하신 내용 잘 동작하는 것 확인했습니다! 고생하셨습니다.

label.textColor = .blackOpacity(.black55)
label.textAlignment = .center
label.numberOfLines = 2
label.text = emptyCaseMessage
Copy link
Member

Choose a reason for hiding this comment

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

P4

현재 label.text = emptyCaseMessage 형태로 extension을 통해 정의된 프로퍼티를 초기화 시점에 참조하고 있는데요,
초기화 중에는 외부 의존성 없이 값을 직접 명시해주는 방식이 가독성과 안정성 측면에서 더 자연스럽게 느껴질 것 같습니다.
아래와 같이 메시지를 상수로 선언해두고, emptyCaseMessage 구현부에서는 해당 상수를 재사용하는 방식은 어떨까요?

private let defaultMessage = "적절한 장소를 찾지 못 했어요.\n다른 조건으로 장소를 찾아보세요.."
label.text = defaultMessage

Copy link
Contributor Author

@nolanMinsung nolanMinsung Jun 29, 2025

Choose a reason for hiding this comment

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

피드백 감사합니다!
defaultMessage를 정의하고 emptyCaseMessage에서 이를 사용하자는 의견을 주셨는데,

코드를 읽는 입장에서 emptyCaseMessageextension으로 떨어져 있으면 헷갈릴 수도 있을 것 같긴 합니다.

그러나 애초에 ORBEmptyPlaceholderType 프로토콜에서 emptyCaseMessage 를 정의하고 이걸 label 등에서 사용하도록 하는 게 원래 목적이었어서요,
defaultMessage를 정의하고 이걸 emptyCaseMessage 에서 사용하면 의미 없는 프로토콜 사용이 될 것 같습니다.
(emptyCaseMessage 를 정의만 하고 하나도 사용하지 않게 되어버리는 상황이 됩니다)

궁금한 부분이 있는데, 혹시 지금과 같이 코드를 구현했을 때, 안정성 측면에서 문제가 될 만한 부분이 있을까요?
emptyCaseMessage 속성도 결국 확장으로 구현한 거라서 저는 초기화 시에 외부타입의 의존성을 갖는다고 생각해보진 않았는데, 이와 관련해서 추가적인 설명이 있으면 좋을 것 같습니다!

Copy link
Member

Choose a reason for hiding this comment

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

다시 생각해보니, 말씀해주신 대로 emptyCaseMessage는 컴파일 타임에 확정되는 값이라 기능적인 외부 의존성은 아니고, 안정성에도 문제가 없는 것 같습니다.
처음에는 초기화 시점에 외부 extension 프로퍼티에 직접 접근하는 구조가 코드 해석의 직관성을 다소 떨어뜨릴 수 있다고 생각했는데요,
민성님 설명을 듣고 보니 현재 방식이 충분히 이해가 되었습니다.

@nolanMinsung nolanMinsung merged commit 8bc649a into main Jun 30, 2025
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] 오브의 추천소 엠티 케이스, 지도 이동 기능 구현

4 participants