-
Notifications
You must be signed in to change notification settings - Fork 0
Ongoing bug fixes alyssa/sp26 #48
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -26,15 +26,22 @@ struct EditProfileView: View { | |
| // MARK: - UI | ||
|
|
||
| var body: some View { | ||
| VStack { | ||
| profileImageView | ||
| .padding(.bottom, 40) | ||
|
|
||
| nameView | ||
|
|
||
| editFieldsView | ||
|
|
||
| Spacer() | ||
| ScrollViewReader { proxy in | ||
| ScrollView { | ||
| VStack { | ||
| profileImageView | ||
| .padding(.bottom, 40) | ||
|
|
||
| nameView | ||
|
|
||
| editFieldsView | ||
|
|
||
| Spacer() | ||
| } | ||
| .onTapGesture { | ||
| proxy.scrollTo("bioField", anchor: .center) | ||
| } | ||
| } | ||
|
Comment on lines
+29
to
+44
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. Potential gesture conflict between tap handlers. The
Consider combining these behaviors into a single tap handler, or use Also applies to: 74-74 🤖 Prompt for AI Agents |
||
| } | ||
| .padding(.top, 40) | ||
| .background(Constants.Colors.white) | ||
|
|
@@ -175,6 +182,7 @@ struct EditProfileView: View { | |
| } | ||
| .padding(.top, 40) | ||
| .padding(.horizontal, Constants.Spacing.horizontalPadding) | ||
| .ignoresSafeArea(.keyboard, edges: .bottom) | ||
| } | ||
|
|
||
| // MARK: - Functions | ||
|
|
||
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.
Missing
.id("bioField")causes scroll to fail silently.The
proxy.scrollTo("bioField", anchor: .center)call references an ID that is never assigned to any view. TheTextEditorat line 167 needs an.id("bioField")modifier for the scroll to work.Additionally, placing this tap gesture on the entire
VStackcreates confusing UX—tapping anywhere (profile image, username field, etc.) will attempt to scroll to the bio field. This is likely not the intended behavior.🐛 Proposed fix: Add the missing ID to TextEditor
At line 167, add the
.id("bioField")modifier:TextEditor(text: $editedBio) .font(Constants.Fonts.body1) .foregroundColor(Constants.Colors.black) .padding(.horizontal, 16) .padding(.vertical, 8) .scrollContentBackground(.hidden) .background(Constants.Colors.wash) .cornerRadius(10) .frame(height: 100) + .id("bioField") .onChange(of: editedBio) { newText inConsider also restricting the tap gesture to only the bio section if that's the intended trigger, rather than the entire content area.
📝 Committable suggestion
🤖 Prompt for AI Agents