BUG: Send button on a send feedback screen can't be reached on a smaller screens

This commit is contained in:
Lukas Korba 2025-01-07 10:57:48 +01:00
parent 0f174f35c3
commit f105a1adf4
2 changed files with 72 additions and 68 deletions

View File

@ -12,6 +12,7 @@ directly impact users rather than highlighting other crucial architectural updat
- What's new data are no longer corrupted.
- Balances tab's duplicated status bar removed.
- Reset Zashi clears out accounts so cached addresses and previously selected account properly are no longer invalid.
- Send Feedback screen is now scrollable so a Send button can be reached on a smaller screens.
## 1.3.1 build 1 (2024-12-24)

View File

@ -22,85 +22,88 @@ public struct SendFeedbackView: View {
public var body: some View {
WithPerceptionTracking {
VStack(alignment: .leading, spacing: 0) {
Text(L10n.SendFeedback.title)
.zFont(.semiBold, size: 24, style: Design.Text.primary)
.padding(.top, 40)
Text(L10n.SendFeedback.desc)
.zFont(size: 14, style: Design.Text.primary)
.padding(.top, 8)
Text(L10n.SendFeedback.ratingQuestion)
.zFont(.medium, size: 14, style: Design.Text.primary)
.padding(.top, 32)
HStack(spacing: 12) {
ForEach(0..<5) { rating in
WithPerceptionTracking {
Button {
store.send(.ratingTapped(rating))
} label: {
Text(store.ratings[rating])
.padding(.vertical, 12)
.frame(maxWidth: .infinity)
.background {
RoundedRectangle(cornerRadius: 12)
.fill(Design.Surfaces.bgSecondary.color(colorScheme))
}
.padding(3)
.overlay {
if let selectedRating = store.selectedRating, selectedRating == rating {
RoundedRectangle(cornerRadius: 14)
.stroke(Design.Text.primary.color(colorScheme))
ScrollView {
VStack(alignment: .leading, spacing: 0) {
Text(L10n.SendFeedback.title)
.zFont(.semiBold, size: 24, style: Design.Text.primary)
.padding(.top, 40)
Text(L10n.SendFeedback.desc)
.zFont(size: 14, style: Design.Text.primary)
.padding(.top, 8)
Text(L10n.SendFeedback.ratingQuestion)
.zFont(.medium, size: 14, style: Design.Text.primary)
.padding(.top, 32)
HStack(spacing: 12) {
ForEach(0..<5) { rating in
WithPerceptionTracking {
Button {
store.send(.ratingTapped(rating))
} label: {
Text(store.ratings[rating])
.padding(.vertical, 12)
.frame(maxWidth: .infinity)
.background {
RoundedRectangle(cornerRadius: 12)
.fill(Design.Surfaces.bgSecondary.color(colorScheme))
}
}
.padding(3)
.overlay {
if let selectedRating = store.selectedRating, selectedRating == rating {
RoundedRectangle(cornerRadius: 14)
.stroke(Design.Text.primary.color(colorScheme))
}
}
}
}
}
}
}
.padding(.top, 12)
Text(L10n.SendFeedback.howCanWeHelp)
.zFont(.medium, size: 14, style: Design.Text.primary)
.padding(.top, 24)
MessageEditorView(
store: store.memoStore(),
title: "",
placeholder: L10n.SendFeedback.hcwhPlaceholder
)
.frame(height: 155)
if let supportData = store.supportData {
UIMailDialogView(
supportData: supportData,
completion: {
store.send(.sendSupportMailFinished)
}
.padding(.top, 12)
Text(L10n.SendFeedback.howCanWeHelp)
.zFont(.medium, size: 14, style: Design.Text.primary)
.padding(.top, 24)
MessageEditorView(
store: store.memoStore(),
title: "",
placeholder: L10n.SendFeedback.hcwhPlaceholder
)
// UIMailDialogView only wraps MFMailComposeViewController presentation
// so frame is set to 0 to not break SwiftUIs layout
.frame(width: 0, height: 0)
.frame(height: 155)
if let supportData = store.supportData {
UIMailDialogView(
supportData: supportData,
completion: {
store.send(.sendSupportMailFinished)
}
)
// UIMailDialogView only wraps MFMailComposeViewController presentation
// so frame is set to 0 to not break SwiftUIs layout
.frame(width: 0, height: 0)
}
Spacer()
ZashiButton(
L10n.General.send
) {
store.send(.sendTapped)
}
.disabled(store.invalidForm)
.padding(.bottom, 20)
shareView()
}
Spacer()
ZashiButton(
L10n.General.send
) {
store.send(.sendTapped)
}
.disabled(store.invalidForm)
.padding(.bottom, 20)
shareView()
.screenHorizontalPadding()
}
.padding(.vertical, 1)
.zashiBack()
.onAppear { store.send(.onAppear) }
}
.navigationBarTitleDisplayMode(.inline)
.screenHorizontalPadding()
.applyScreenBackground()
.screenTitle(L10n.SendFeedback.screenTitle.uppercased())
}