-
Notifications
You must be signed in to change notification settings - Fork 0
✨ Feat: 컴피존 설정 초기 화면 구현 (오직 화면뿐) #18
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
Conversation
| extension View { | ||
| @ViewBuilder | ||
| func comfieZoneInfoPopupView( | ||
| showPopup: Bool, | ||
| onDismiss: @escaping () -> Void | ||
| ) -> some View { | ||
| ZStack { | ||
| self | ||
|
|
||
| if showPopup { | ||
| Color.popupBackdrop.ignoresSafeArea() | ||
| .onTapGesture { onDismiss() } | ||
|
|
||
| ComfieZoneInfoPopupView(dismissPopup: onDismiss) | ||
| .padding(.horizontal, 50) | ||
| } | ||
| } | ||
| } | ||
| } |
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.
View 내부의 코드가 복잡해지는 것을 막고자, 컴피존 정보 팝업을 modifier로 구성했습니다.
| "color-space" : "extended-srgb", | ||
| "components" : { | ||
| "alpha" : "0.660", | ||
| "alpha" : "0.400", |
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.
투명도 값이 디자인과 다른 점이 있어서 변경했습니다.
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.
음? 디자인시스템엔 66이라고 되어있는데 중간에 바뀌었나보네용 ㅠ
Guryss
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.
수고하셨습니닷! 확인해야할 지점들이 몇가지 있는 것 같습니당!! 화이팅그팅그
| "color-space" : "extended-srgb", | ||
| "components" : { | ||
| "alpha" : "0.660", | ||
| "alpha" : "0.400", |
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.
음? 디자인시스템엔 66이라고 되어있는데 중간에 바뀌었나보네용 ㅠ
| ) | ||
| } | ||
| .background(Color.cfWhite) | ||
| .cfNavigationBar("현재위치", trailingButtons: [infoButton]) |
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.
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.
| .disabled(true) | ||
|
|
||
| // 컴피존 안내 문구 - 안, 밖, 없음 | ||
| Text("컴피존이 없어요!") |
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.
String 추출 필요하네요!
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.
아직 구현하지 않은 View 입니다! 추후에 다른 View로 추출해서 활용할 것 같아요!
참고할 수 있도록 언급했어야 하는데, 죄송함니당ㅠ
|
|
||
| // 컴피존 설정 시트 | ||
| VStack(alignment: .leading, spacing: 16) { | ||
| Text("컴피존") |
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.
여기도! String 추출
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.
여기도 아직 구현하지 않은 View 입니다! 추후에 다른 View로 추출해서 활용할 것 같아요!
| ) | ||
| } | ||
| .background(Color.cfWhite) | ||
| .cfNavigationBar("현재위치", trailingButtons: [infoButton]) |
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.
여기도! String 추출
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.
여기는 추출했습니다!
| Color.popupBackdrop.ignoresSafeArea() | ||
| .onTapGesture { onDismiss() } |
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.
백그라운드 터치했을 때에도 dismiss 되야하는지 함 물어봐야할 것 같은데용?
아니면 논의가 된 부분인지 궁금합니닷! 피그마 기능 명세에는 없어서요 !
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.
아하 팝업이라 너무 당연하게 dismiss 된다고 생각했네요! 물어보겠습니다~
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.
X버튼 또는 검은 배경 탭할 때 팝업이 사라지게 해주세용!!
라고 답변 받았습니다~ 여기 코드는 그대로 둘게요!
zaehorang
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.
고생하셨습니다~
구리스가 언급해주신 navigationBar 문제만 해결하면 될 거 같아요❗️
| ZStack(alignment: .topTrailing) { | ||
| VStack(spacing: 20) { | ||
| // 타이틀 - 컴피존이란? | ||
| Text(strings.title) |
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.
localized 처리를 해줘야 하는 거 같은데 맞나요 ?!
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.
오 아뇨! Text는 LocalizedStringResource를 그대로 받아서 처리할 수 있기 때문데 localized 처리를 하지 않아도 괜찮습니다!
참고로 WWDC 영상에서 "Localization을 위해 LocalizedStringResource를 사용하도록 권장되고, 이 타입은 리터럴뿐만아니라 comment, table, key와 다른 default value를 지정할 수 있다." 는 언급이 있습니다!
https://developer.apple.com/videos/play/wwdc2023/10155/?time=1368
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.
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.
네 맞습니다용~~~~
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.
오호.. 그러면 저희가 추가하는 커스텀 뷰에도 String이 아닌 LocalizedStringResource로 선언해서 사용하는게 더 깔끔하겠네유 👍
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.
오 그렇네요! 그렇게 생각을 못해봤는데, 커스텀 뷰에도 그렇게 활용하면 좋을 것 같아요!
|
|
||
| struct ComfieZoneSettingView: View { | ||
| @State var intent: ComfieZoneSettingStore | ||
| private var state: ComfieZoneSettingStore.State { intent.state } |
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.
미리 선언해두고 쓰는거 좋아 보입니다 👍
| let router: Router | ||
| // TODO: MemoRepository를 어디서 주입할 지 고민하기 | ||
|
|
||
| // MARK: - Repository | ||
| let memoRepository: MemoRepositoryProtocol = MemoRepository() | ||
|
|
||
| // MARK: - Intent | ||
| private func makeOnboardingIntent() -> OnboardingStore { OnboardingStore(router: router) } | ||
| private func makeMemoIntent() -> MemoStore { | ||
| MemoStore(router: router, memoRepository: memoRepository) | ||
| MemoStore( | ||
| router: router, | ||
| memoRepository: memoRepository | ||
| ) | ||
| } |
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.
수정 감사합니당 🐯
zaehorang
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.
확인했습니다 👨🏻⚖️
Guryss
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.
수고하셨습니당 !!



About this PR
🔖 Related Issue
📚 Contents
아래 체크된 기능을 구현했습니다.
다음 내용이 많아질 것 같아서, 작은 내용 먼저 PR 리뷰를 부탁합니다!
내용이 많지 않습니다~
📸 Screenshot