From 5242f8c23a4b407e52a063a2e6c7fcbd3c1d2714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81sar=20Vargas=20Casaseca?= Date: Mon, 24 Feb 2025 17:07:28 +0100 Subject: [PATCH 1/4] Avoid dismissal of the support form when tapping outside --- .../Classes/POS/Presentation/PointOfSaleDashboardView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift index a0046b2adbf..54692af1e49 100644 --- a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift +++ b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift @@ -77,6 +77,7 @@ struct PointOfSaleDashboardView: View { .posRootModal() .sheet(isPresented: $showSupport) { supportForm + .interactiveDismissDisabled(true) } .sheet(isPresented: $showDocumentation) { documentationView From 4e0db0daaa7e3c6aa80b86e9d3abb0b036e6e7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81sar=20Vargas=20Casaseca?= Date: Tue, 25 Feb 2025 16:13:24 +0100 Subject: [PATCH 2/4] Pre-populate the site address in get support --- .../Classes/POS/Presentation/PointOfSaleDashboardView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift index 54692af1e49..843ed164271 100644 --- a/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift +++ b/WooCommerce/Classes/POS/Presentation/PointOfSaleDashboardView.swift @@ -120,7 +120,8 @@ private extension PointOfSaleDashboardView { var supportForm: some View { NavigationView { SupportForm(isPresented: $showSupport, - viewModel: SupportFormViewModel(sourceTag: Constants.supportTag)) + viewModel: SupportFormViewModel(sourceTag: Constants.supportTag, + defaultSite: ServiceLocator.stores.sessionManager.defaultSite)) .toolbar { ToolbarItem(placement: .confirmationAction) { Button(Localization.supportDone) { From 6d675da55dc1b3792ad824d225e5b8dab14c0300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81sar=20Vargas=20Casaseca?= Date: Tue, 25 Feb 2025 16:18:50 +0100 Subject: [PATCH 3/4] Disable autocorrection and capitalization in the site address on the support form --- .../Dashboard/Settings/Help/SupportForm/SupportForm.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift index e856bf226a6..cd226e4a13a 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift @@ -118,6 +118,8 @@ struct SupportForm: View { .subheadlineStyle() TextField("", text: $viewModel.siteAddress) + .autocorrectionDisabled(true) // Disables autocorrect + .textInputAutocapitalization(.never) .keyboardType(.URL) .bodyStyle() .padding(insets: Layout.subjectInsets) From 0653a9202c82ab68cd6625507c82a93cececb74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ce=CC=81sar=20Vargas=20Casaseca?= Date: Tue, 25 Feb 2025 16:26:04 +0100 Subject: [PATCH 4/4] Remove comment --- .../Dashboard/Settings/Help/SupportForm/SupportForm.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift index cd226e4a13a..d6b1d8a4ffd 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/Help/SupportForm/SupportForm.swift @@ -118,7 +118,7 @@ struct SupportForm: View { .subheadlineStyle() TextField("", text: $viewModel.siteAddress) - .autocorrectionDisabled(true) // Disables autocorrect + .autocorrectionDisabled(true) .textInputAutocapitalization(.never) .keyboardType(.URL) .bodyStyle()