-
Notifications
You must be signed in to change notification settings - Fork 0
Style/#150 홈, 온보딩 뷰 QA 반영 #153
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,27 +7,38 @@ | |||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| import SwiftUI | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| private struct Line1WidthKey: PreferenceKey { | ||||||||||||||||||||||||||||||||||||||||||||
| static var defaultValue: CGFloat = 0 | ||||||||||||||||||||||||||||||||||||||||||||
| static func reduce(value: inout CGFloat, nextValue: () -> CGFloat) { | ||||||||||||||||||||||||||||||||||||||||||||
| value = nextValue() | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| struct OnboardingPage1: View { | ||||||||||||||||||||||||||||||||||||||||||||
| @State private var line1Width: CGFloat = 0 | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| var body: some View { | ||||||||||||||||||||||||||||||||||||||||||||
| VStack(spacing: 0) { | ||||||||||||||||||||||||||||||||||||||||||||
| Image(.illustrationOnboardingCal) | ||||||||||||||||||||||||||||||||||||||||||||
| .resizable() | ||||||||||||||||||||||||||||||||||||||||||||
| .scaledToFit() | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 294.adjustedW) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 294.adjustedW, height: 254.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .overlay(alignment: .topLeading) { | ||||||||||||||||||||||||||||||||||||||||||||
| Image(.illustrationOnboardingCh) | ||||||||||||||||||||||||||||||||||||||||||||
| .resizable() | ||||||||||||||||||||||||||||||||||||||||||||
| .scaledToFit() | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 152.adjustedW) | ||||||||||||||||||||||||||||||||||||||||||||
| .offset(x: 152.adjustedW, y: 180.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 152.adjustedW, height: 204.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .offset(x: 152.adjustedW, y: 209.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 92.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 102.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| HStack(spacing: 0) { | ||||||||||||||||||||||||||||||||||||||||||||
| Image(.comment) | ||||||||||||||||||||||||||||||||||||||||||||
| .resizable() | ||||||||||||||||||||||||||||||||||||||||||||
| .scaledToFit() | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 100.adjustedW) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 100.adjustedW, height: 44.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 120.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.leading, 30.adjustedW) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -40,20 +51,34 @@ struct OnboardingPage1: View { | |||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Rectangle() | ||||||||||||||||||||||||||||||||||||||||||||
| .fill(Color.red700) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 252.adjustedW, height: 1.4) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: line1Width, height: 1.4) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.leading, 4.adjustedW) | ||||||||||||||||||||||||||||||||||||||||||||
| Rectangle() | ||||||||||||||||||||||||||||||||||||||||||||
| .fill(Color.red700) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: 260.adjustedW, height: 1.4) | ||||||||||||||||||||||||||||||||||||||||||||
| .fill(Color.red700) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(width: line1Width + 8, height: 1.4) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 3.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| TypographyText("일정을 한 눈에 정리해드려요", style: .title1_sb_18, color: .gray1000) | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 6.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 7.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
| .frame(maxWidth: .infinity) | ||||||||||||||||||||||||||||||||||||||||||||
| .background( | ||||||||||||||||||||||||||||||||||||||||||||
| VStack(alignment: .leading, spacing: 0) { | ||||||||||||||||||||||||||||||||||||||||||||
| TypographyText("시술 후 불편감이 남을 수 있는 기간", style: .title1_sb_18, color: .clear) | ||||||||||||||||||||||||||||||||||||||||||||
| .background( | ||||||||||||||||||||||||||||||||||||||||||||
| GeometryReader { geometry in | ||||||||||||||||||||||||||||||||||||||||||||
| Color.clear.preference(key: Line1WidthKey.self, value: geometry.size.width) | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| .opacity(0) | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+56
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find the OnboardingPage1.swift file
find . -name "OnboardingPage1.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 151 🏁 Script executed: #!/bin/bash
# Read the OnboardingPage1.swift file to see the code context around lines 65-74
sed -n '55,85p' "./Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/OnboardingPage1.swift" | cat -nRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 1567 🏁 Script executed: #!/bin/bash
# Check the full file to see if there are any other accessibility configurations
grep -n "accessibilityHidden\|isHidden\|accessibility" "./Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/OnboardingPage1.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 52 🌐 Web query:
💡 Result: Short answer: setting .opacity(0) only changes visual rendering — it does not reliably remove a SwiftUI view from the accessibility tree or stop it receiving hits. To keep a view visually present/transparent but hide it from VoiceOver and user interaction, combine accessibility and interaction modifiers (or remove the view from the tree). Example:
Example: References: 🏁 Script executed: #!/bin/bash
# Verify the exact line numbers by checking the file again more precisely
wc -l "./Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/OnboardingPage1.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 154 🏁 Script executed: #!/bin/bash
# Get the exact lines 65-74 to verify the line numbers in the review comment
sed -n '65,74p' "./Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/OnboardingPage1.swift" | cat -nRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 662 숨겨진 측정 텍스트가 VoiceOver에 노출됩니다.
제안 수정 }
.opacity(0)
+ .accessibilityHidden(true)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||
| .onPreferenceChange(Line1WidthKey.self) { width in | ||||||||||||||||||||||||||||||||||||||||||||
| line1Width = width | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||
| .padding(.top, 7.adjustedH) | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ import UIKit | |
|
|
||
| struct CherrishPicker: View { | ||
| @Binding var selection: Int | ||
| let range: ClosedRange<Int> | ||
| var range: ClosedRange<Int> = 0...30 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "CherrishPicker.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 149 🏁 Script executed: cat -n ./Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 7294 프로그래매틱 업데이트 시 range 범위 검증 누락으로 크래시 위험
🔧 제안 수정 func makeUIView(context: Context) -> UIPickerView {
let picker = UIPickerView()
picker.delegate = context.coordinator
picker.dataSource = context.coordinator
picker.subviews.forEach { subview in
subview.backgroundColor = .clear
}
- let row = selection - range.lowerBound
+ let rawRow = selection - range.lowerBound
+ let row = max(0, min(rawRow, range.count - 1))
+ if rawRow != row {
+ selection = range.lowerBound + row
+ }
picker.selectRow(row, inComponent: 0, animated: false) func updateUIView(_ uiView: UIPickerView, context: Context) {
guard !context.coordinator.isScrolling else { return }
- let row = selection - range.lowerBound
+ let rawRow = selection - range.lowerBound
+ let row = max(0, min(rawRow, range.count - 1))
+ if rawRow != row {
+ selection = range.lowerBound + row
+ }
if uiView.selectedRow(inComponent: 0) != row {
uiView.selectRow(row, inComponent: 0, animated: true)
}
}🤖 Prompt for AI Agents |
||
| var width: CGFloat = 74.adjustedW | ||
|
|
||
| var body: some View { | ||
|
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "home_lv.2.png", | ||
| "filename" : "home_lv.1.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "home_lv.2@2x.png", | ||
| "filename" : "home_lv.1@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "home_lv.2@3x.png", | ||
| "filename" : "home_lv.1@3x.png", | ||
|
Comment on lines
+4
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify home_lv.2.imageset folder contents and file naming
echo "=== Contents of home_lv.2.imageset folder ==="
find . -path "*home_lv.2.imageset*" -type f
echo ""
echo "=== All home_lv related PNG files ==="
find . -name "home_lv*.png" -type f | sort
echo ""
echo "=== home_lv.2.imageset/Contents.json ==="
find . -path "*home_lv.2.imageset/Contents.json" -type f -exec cat {} \;Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 2163 🏁 Script executed: #!/bin/bash
# Verify Contents.json matches actual files in home_lv.2.imageset
echo "=== Checking if all referenced files in Contents.json exist ==="
IMAGESET_PATH="./Cherrish-iOS/Cherrish-iOS/Resources/Assets.xcassets/home_icon/home_lv.2.imageset"
cd "$IMAGESET_PATH" 2>/dev/null && {
echo "Referenced files in Contents.json:"
grep '"filename"' Contents.json | grep -o '"[^"]*\.png"'
echo ""
echo "Actual PNG files in folder:"
ls -1 *.png 2>/dev/null
echo ""
echo "Verification: All referenced files exist?"
for file in home_lv.1.png home_lv.1@2x.png home_lv.1@3x.png; do
if [ -f "$file" ]; then
echo "✓ $file exists"
else
echo "✗ $file missing"
fi
done
} || echo "Could not access imageset folder"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 417 명명 규칙 일관성 개선 권장
다만 imageset 폴더명과 파일명의 불일치는 유지보수성을 떨어뜨리므로, 일관된 명명 규칙으로 통일하는 것이 권장됩니다. (예: 폴더 내 파일을 🤖 Prompt for AI Agents |
||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
|
|
||
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.
이거 제가 PreferenceKey 만들어둔 파일 있는데 거기다가 옮겨주세여
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.
가로 길이 구하는거에여