From 75f47ac88b27e871a01d42f78d0df5588d15d29b Mon Sep 17 00:00:00 2001 From: Shabicha Sureshkumar Date: Mon, 6 Apr 2026 13:55:42 -0400 Subject: [PATCH 1/3] feat: add Conjugate tab download data menu option (SwiftUI) --- .../Conjugate/ConjugateDataDownload.swift | 53 +++++++++++++++++++ .../Views/Tabs/Conjugate/ConjugateTab.swift | 20 +++++-- Scribe.xcodeproj/project.pbxproj | 6 +++ 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift diff --git a/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift b/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift new file mode 100644 index 00000000..48f85d07 --- /dev/null +++ b/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +import SwiftUI + +struct ConjugateDataDownload: View { + @AppStorage("increaseTextSize", store: UserDefaults(suiteName: "group.be.scri.userDefaultsContainer")) + var increaseTextSize: Bool = false + var textSizeMultiplier: CGFloat { increaseTextSize ? 1.25 : 1.0 } + + var body: some View { + VStack(alignment: .leading, spacing: 6) { + Text(NSLocalizedString( + "i18n.app.download.menu_option.conjugate_title", + value: "Verb data", + comment: "" + )) + .font(.system(size: 19 * textSizeMultiplier, weight: .semibold)) + .foregroundColor(.primary) + + VStack(alignment: .leading, spacing: 6) { + HStack { + Text(NSLocalizedString( + "i18n.app.download.menu_option.conjugate_download_data_start", + value: "Download data to start conjugating!", + comment: "" + )) + .font(.system(size: 17 * textSizeMultiplier)) + .foregroundColor(.primary) + + Spacer() + + Image(systemName: "chevron.right") + .foregroundColor(.gray) + } + + Text(NSLocalizedString( + "i18n.app.download.menu_option.conjugate_description", + value: "Add new data to Scribe Conjugate.", + comment: "" + )) + .font(.system(size: 15 * textSizeMultiplier)) + .foregroundColor(.secondary) + } + .padding() + .background(Color(.systemBackground)) + .cornerRadius(12) + .onTapGesture { + // Navigation to download screen - to be implemented in a follow-up issue + } + } + .padding(.horizontal) + } +} diff --git a/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift b/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift index 278e935e..6566f2f3 100644 --- a/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift +++ b/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift @@ -4,10 +4,20 @@ import SwiftUI struct ConjugateTab: View { var body: some View { - AppNavigation { - Text("Conjugate") - .font(.largeTitle) - .navigationTitle("Conjugate") - } + AppNavigation { + ScrollView { + VStack(spacing: 20) { + Image("ScribeLogo") + .resizable() + .scaledToFit() + .frame(width: 200, height: 100) + .padding(.top, 30) + ConjugateDataDownload() + } + .padding() + } + .background(Color("scribeAppBackground")) + .navigationBarHidden(true) + } } } diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 6868221e..5927ca43 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -130,6 +130,8 @@ 693150472C881DCE005F99E8 /* BaseTableViewControllerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */; }; 69B81EBC2BFB8C77008CAB85 /* TipCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */; }; 84AF4D882C3575EA009AE0D2 /* UIDeviceExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */; }; + A4C829A02F83FF910015D657 /* ConjugateDataDownload.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */; }; + A4C829A12F8400800015D657 /* ConjugateTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = F725CAE42F6A782500A8C950 /* ConjugateTab.swift */; }; CE1378C428F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; CE1378C528F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; CE1378C628F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; @@ -1048,6 +1050,7 @@ 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewControllerTest.swift; sourceTree = ""; }; 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipCardView.swift; sourceTree = ""; }; 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDeviceExtensions.swift; sourceTree = ""; }; + A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConjugateDataDownload.swift; sourceTree = ""; }; CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScribeColor.swift; sourceTree = ""; }; CE1378C328F5D7AC00E1CBC2 /* UIColor+ScribeColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+ScribeColors.swift"; sourceTree = ""; }; D109A20B275B6888005E2271 /* French.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = French.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2081,6 +2084,7 @@ F725CAEF2F6A79EF00A8C950 /* Conjugate */ = { isa = PBXGroup; children = ( + A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */, F725CAE42F6A782500A8C950 /* ConjugateTab.swift */, ); path = Conjugate; @@ -3617,7 +3621,9 @@ F7A17EBC2F6A8C200040B09B /* ConjugateTab.swift in Sources */, F7A17EBB2F6A8C1C0040B09B /* AboutTab.swift in Sources */, F7A17EBA2F6A8C180040B09B /* AppNavigation.swift in Sources */, + A4C829A12F8400800015D657 /* ConjugateTab.swift in Sources */, F725CADE2F6A72BC00A8C950 /* ConjugateApp.swift in Sources */, + A4C829A02F83FF910015D657 /* ConjugateDataDownload.swift in Sources */, F725CAE72F6A783400A8C950 /* SettingsTab.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From 4ca9e2e01797c04a422d7ac266bfdb7fbbf940a4 Mon Sep 17 00:00:00 2001 From: Shabicha Sureshkumar Date: Mon, 6 Apr 2026 14:14:51 -0400 Subject: [PATCH 2/3] style: comment formatting --- Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift b/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift index 48f85d07..085533ee 100644 --- a/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift +++ b/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift @@ -45,7 +45,7 @@ struct ConjugateDataDownload: View { .background(Color(.systemBackground)) .cornerRadius(12) .onTapGesture { - // Navigation to download screen - to be implemented in a follow-up issue + // Navigation to download screen. } } .padding(.horizontal) From ef016b916420119d01602f7e9093ae93371f1215 Mon Sep 17 00:00:00 2001 From: Shabicha Sureshkumar Date: Mon, 6 Apr 2026 14:57:47 -0400 Subject: [PATCH 3/3] feat: reuse CardView from keyboard app for Conjugate tab download option --- .../Conjugate/ConjugateDataDownload.swift | 53 ------------------- .../Views/Tabs/Conjugate/ConjugateTab.swift | 36 +++++++++---- Scribe.xcodeproj/project.pbxproj | 6 +-- 3 files changed, 29 insertions(+), 66 deletions(-) delete mode 100644 Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift diff --git a/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift b/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift deleted file mode 100644 index 085533ee..00000000 --- a/Conjugate/Views/Tabs/Conjugate/ConjugateDataDownload.swift +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -import SwiftUI - -struct ConjugateDataDownload: View { - @AppStorage("increaseTextSize", store: UserDefaults(suiteName: "group.be.scri.userDefaultsContainer")) - var increaseTextSize: Bool = false - var textSizeMultiplier: CGFloat { increaseTextSize ? 1.25 : 1.0 } - - var body: some View { - VStack(alignment: .leading, spacing: 6) { - Text(NSLocalizedString( - "i18n.app.download.menu_option.conjugate_title", - value: "Verb data", - comment: "" - )) - .font(.system(size: 19 * textSizeMultiplier, weight: .semibold)) - .foregroundColor(.primary) - - VStack(alignment: .leading, spacing: 6) { - HStack { - Text(NSLocalizedString( - "i18n.app.download.menu_option.conjugate_download_data_start", - value: "Download data to start conjugating!", - comment: "" - )) - .font(.system(size: 17 * textSizeMultiplier)) - .foregroundColor(.primary) - - Spacer() - - Image(systemName: "chevron.right") - .foregroundColor(.gray) - } - - Text(NSLocalizedString( - "i18n.app.download.menu_option.conjugate_description", - value: "Add new data to Scribe Conjugate.", - comment: "" - )) - .font(.system(size: 15 * textSizeMultiplier)) - .foregroundColor(.secondary) - } - .padding() - .background(Color(.systemBackground)) - .cornerRadius(12) - .onTapGesture { - // Navigation to download screen. - } - } - .padding(.horizontal) - } -} diff --git a/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift b/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift index 6566f2f3..35061e70 100644 --- a/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift +++ b/Conjugate/Views/Tabs/Conjugate/ConjugateTab.swift @@ -12,12 +12,30 @@ struct ConjugateTab: View { .scaledToFit() .frame(width: 200, height: 100) .padding(.top, 30) - ConjugateDataDownload() - } - .padding() - } - .background(Color("scribeAppBackground")) - .navigationBarHidden(true) - } - } -} + CardView( + title: NSLocalizedString( + "i18n.app.download.menu_option.conjugate_title", + value: "Verb data", + comment: "" + ), + mainText: NSLocalizedString( + "i18n.app.download.menu_option.conjugate_download_data_start", + value: "Download data to start conjugating!", + comment: "" + ), + subtitle: NSLocalizedString( + "i18n.app.download.menu_option.conjugate_description", + value: "Add new data to Scribe Conjugate.", + comment: "" + ) + ) { + // Insert navigation to download screen. + } + } + .padding() + } + .background(Color("scribeAppBackground")) + .navigationBarHidden(true) + } + } + } diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 5927ca43..aa3d6271 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -130,8 +130,8 @@ 693150472C881DCE005F99E8 /* BaseTableViewControllerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */; }; 69B81EBC2BFB8C77008CAB85 /* TipCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */; }; 84AF4D882C3575EA009AE0D2 /* UIDeviceExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */; }; - A4C829A02F83FF910015D657 /* ConjugateDataDownload.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */; }; A4C829A12F8400800015D657 /* ConjugateTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = F725CAE42F6A782500A8C950 /* ConjugateTab.swift */; }; + A4C829A52F84366C0015D657 /* InstallationDownload.swift in Sources */ = {isa = PBXBuildFile; fileRef = E96111472F04EC62001E4F95 /* InstallationDownload.swift */; }; CE1378C428F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; CE1378C528F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; CE1378C628F5D7AC00E1CBC2 /* ScribeColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */; }; @@ -1050,7 +1050,6 @@ 693150462C881DCE005F99E8 /* BaseTableViewControllerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewControllerTest.swift; sourceTree = ""; }; 69B81EBB2BFB8C77008CAB85 /* TipCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipCardView.swift; sourceTree = ""; }; 84AF4D872C3575EA009AE0D2 /* UIDeviceExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDeviceExtensions.swift; sourceTree = ""; }; - A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConjugateDataDownload.swift; sourceTree = ""; }; CE1378C228F5D7AC00E1CBC2 /* ScribeColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScribeColor.swift; sourceTree = ""; }; CE1378C328F5D7AC00E1CBC2 /* UIColor+ScribeColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+ScribeColors.swift"; sourceTree = ""; }; D109A20B275B6888005E2271 /* French.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = French.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2084,7 +2083,6 @@ F725CAEF2F6A79EF00A8C950 /* Conjugate */ = { isa = PBXGroup; children = ( - A4C829932F83FC0D0015D657 /* ConjugateDataDownload.swift */, F725CAE42F6A782500A8C950 /* ConjugateTab.swift */, ); path = Conjugate; @@ -3619,11 +3617,11 @@ files = ( F7A17EBD2F6A8C230040B09B /* ContentView.swift in Sources */, F7A17EBC2F6A8C200040B09B /* ConjugateTab.swift in Sources */, + A4C829A52F84366C0015D657 /* InstallationDownload.swift in Sources */, F7A17EBB2F6A8C1C0040B09B /* AboutTab.swift in Sources */, F7A17EBA2F6A8C180040B09B /* AppNavigation.swift in Sources */, A4C829A12F8400800015D657 /* ConjugateTab.swift in Sources */, F725CADE2F6A72BC00A8C950 /* ConjugateApp.swift in Sources */, - A4C829A02F83FF910015D657 /* ConjugateDataDownload.swift in Sources */, F725CAE72F6A783400A8C950 /* SettingsTab.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0;