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

편의점 바텀시트 구현 #49

Merged
merged 5 commits into from
Feb 24, 2024
Merged

편의점 바텀시트 구현 #49

merged 5 commits into from
Feb 24, 2024

Conversation

WhiteHyun
Copy link
Member

Screenshots 📸

UI
RPReplay_Final1708673376

고민, 과정, 근거 💬

modal로 띄우기 위해 isPresented를 어디에 두어야할까

image

Source of truth를 ViewModel의 state로 한정하려고 했으나, 뷰를 모달로 띄우기 위해선 state를 수정할 권한을 뷰에게 주어야했습니다.
저는 state 변경을 View에서 하지 않고 ViewModel에서만 수정할 수 있도록 제한하고 싶어 결국 새로운 Source of truth를 추가했습니다.
다른 좋은 방법이 있다면 언제든 피드백 부탁드리겠습니다.. 🙇


@WhiteHyun WhiteHyun added 🏠 Home Home View 🔨 Implementation New feature or request labels Feb 23, 2024
@WhiteHyun WhiteHyun added this to the v2.0.0 milestone Feb 23, 2024
@WhiteHyun WhiteHyun requested a review from a team February 23, 2024 08:22
@WhiteHyun WhiteHyun self-assigned this Feb 23, 2024
Copy link
Contributor

@eung7 eung7 left a comment

Choose a reason for hiding this comment

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

맞아요.. 상태변수는 어쩔 수 없이 View에 정의하는 것이 가장 깔끔한 것 같아요!
수고하셨습니다! 👍

- Moved isPresented state variable to HomeProductDetailSelectionView for better state management.
- Renamed isPresented variable to convenienceStoreModalPresented for improved clarity and readability.
- Replaced `@Binding` with `@Environment(\.dismiss)` for modal presentation management.
@WhiteHyun WhiteHyun requested a review from eung7 February 24, 2024 12:56
Copy link
Contributor

@eung7 eung7 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다..! 😀

@eung7 eung7 merged commit d615750 into main Feb 24, 2024
2 checks passed
@eung7 eung7 deleted the feature/home/47 branch February 24, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏠 Home Home View 🔨 Implementation New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

편의점 버튼이 눌리면 Bottom Sheet를 표시한다.
2 participants