Skip to content

Commit 3131005

Browse files
committed
Merge branch 'release/LekaApp/1.6.0'
* release/LekaApp/1.6.0: (48 commits) πŸ”€οΈ πŸ”– (LekaApp): Bump version to v1.6.0 🍱 (GEK): Trim InTheRace dance freeze song ♻️ (LekaApp): Refactor CategorySearchView ✨ (ContentKit): Add SearchGridView ✨ (UtilsKit): Add normalized() String extension ♻️ (ContentKit): Search only published activity ✨ (LekaApp): Add Search category ✨ (ContentKit): Add SkillsGridView ♻️ (ContentKit): Add mainSkilslList to Skills struct ♻️ (ContentKit): Use directly type Skill for activity skills ✨ (UtilsKit): Add removingDuplicates array extension func πŸ§‘β€πŸ’» (hooks): Checks xcstrings - handle pluralization ♻️ (GEK): Update ActivityView & VM with new saving logic ✨ (GEK): Update CrtActMgr w/ completionData saving logic ✨ (GEK): Add ExerciseCompletionDataManager to GEK ⬆️ (bundle): Bundle upgrade bundler to 2.5.11 πŸ’š (ci): Fix bundle install/update 🀑 Add activity example for Listen speech then TTS ✨ (GEK): Move and generalize AudioPlayer with audio and speech ✨ (Content): Add action speech ...
2 parents 8a0d506 + d3ac721 commit 3131005

135 files changed

Lines changed: 2863 additions & 464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Ž.github/workflows/ci-fastlane-release_app_store.ymlβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
5353
- name: bundle install
5454
run: |
55-
gem install bundler
55+
gem uninstall bundler --all --ignore-dependencies --executables
56+
gem install --force bundler
5657
bundle install
5758
5859
- name: tuist install

β€Ž.github/workflows/ci-fastlane-release_beta_internal.ymlβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ jobs:
6565
6666
- name: bundle install
6767
run: |
68-
gem install bundler
68+
gem uninstall bundler --all --ignore-dependencies --executables
69+
gem install --force bundler
6970
bundle install
7071
7172
- name: tuist install

β€Ž.github/workflows/ci-system-upgrade_tools_and_clean.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ jobs:
6969
7070
- name: Upgrade bundle
7171
run: |
72-
gem install bundler
73-
bundle update --bundler
72+
gem uninstall bundler --all --ignore-dependencies --executables
73+
gem install --force bundler
7474
7575
- name: tuist clean
7676
run: |

β€ŽApps/LekaApp/Project.swiftβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let kLekaAppVersion: String = {
1313
}
1414

1515
// ? App version
16-
return "1.5.0"
16+
return "1.6.0"
1717
}()
1818

1919
let project = Project.app(

β€ŽApps/LekaApp/Resources/l10n/Localizable.xcstringsβ€Ž

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,24 @@
12621262
}
12631263
}
12641264
},
1265+
"lekaapp.category_search_view.browse_skills_title": {
1266+
"comment": "Browse skills title",
1267+
"extractionState": "extracted_with_value",
1268+
"localizations": {
1269+
"en": {
1270+
"stringUnit": {
1271+
"state": "new",
1272+
"value": "Browse skills"
1273+
}
1274+
},
1275+
"fr": {
1276+
"stringUnit": {
1277+
"state": "translated",
1278+
"value": "Parcourir les comp\u00e9tences"
1279+
}
1280+
}
1281+
}
1282+
},
12651283
"lekaapp.connection_view.alert_message": {
12661284
"comment": "Forgot Password alert message",
12671285
"extractionState": "extracted_with_value",
@@ -1802,6 +1820,24 @@
18021820
}
18031821
}
18041822
},
1823+
"lekaapp.main_view.sidebar.category_label.search": {
1824+
"comment": "The title of the category 'Search'",
1825+
"extractionState": "extracted_with_value",
1826+
"localizations": {
1827+
"en": {
1828+
"stringUnit": {
1829+
"state": "new",
1830+
"value": "Search"
1831+
}
1832+
},
1833+
"fr": {
1834+
"stringUnit": {
1835+
"state": "translated",
1836+
"value": "Recherche"
1837+
}
1838+
}
1839+
}
1840+
},
18051841
"lekaapp.main_view.sidebar.category_label.stories": {
18061842
"comment": "The title of the category 'Stories'",
18071843
"extractionState": "extracted_with_value",

β€ŽApps/LekaApp/Sources/Navigation/Navigation+Category.swiftβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SwiftUI
77
extension Navigation {
88
enum Category: Hashable, Identifiable, CaseIterable {
99
case home
10+
case search
1011
case curriculums
1112
case activities
1213
case stories
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// Leka - iOS Monorepo
2+
// Copyright APF France handicap
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
import ContentKit
6+
import DesignKit
7+
import LocalizationKit
8+
import SwiftUI
9+
10+
// MARK: - CategorySearchView
11+
12+
struct CategorySearchView: View {
13+
// MARK: Internal
14+
15+
var body: some View {
16+
Group {
17+
if self.searchText.isEmpty {
18+
ScrollView(showsIndicators: true) {
19+
SkillsGridView(skills: self.skills, onActivitySelected: { activity in
20+
self.navigation.currentActivity = activity
21+
self.navigation.fullScreenCoverContent = .activityView(carereceivers: [])
22+
})
23+
}
24+
.navigationTitle(String(l10n.CategorySearchView.browseSkillstitle.characters))
25+
.font(.title.bold())
26+
} else {
27+
ScrollView(showsIndicators: true) {
28+
SearchGridView(activities: self.searchActivityResults,
29+
skills: self.searchSkillsResults,
30+
curriculums: self.searchCurriculumResults,
31+
onStartActivity: { activity in
32+
self.navigation.currentActivity = activity
33+
self.navigation.fullScreenCoverContent = .activityView(carereceivers: [])
34+
})
35+
}
36+
}
37+
}
38+
.searchable(text: self.$searchText)
39+
}
40+
41+
var searchActivityResults: [Activity] {
42+
if self.searchText.isEmpty {
43+
self.activities
44+
} else {
45+
self.activities.filter { activity in
46+
activity.details.title.normalized().contains(self.searchText.normalized())
47+
}
48+
}
49+
}
50+
51+
var searchSkillsResults: [Skill] {
52+
if self.searchText.isEmpty {
53+
self.skills
54+
} else {
55+
self.skills.filter { skill in
56+
skill.name.normalized().contains(self.searchText.normalized())
57+
}
58+
}
59+
}
60+
61+
var searchCurriculumResults: [Curriculum] {
62+
if self.searchText.isEmpty {
63+
self.curriculums
64+
} else {
65+
self.curriculums.filter { curriculum in
66+
curriculum.name.normalized().contains(self.searchText.normalized())
67+
}
68+
}
69+
}
70+
71+
// MARK: Private
72+
73+
private let activities: [Activity] = ContentKit.allPublishedActivities
74+
private let curriculums: [Curriculum] = ContentKit.allCurriculums
75+
private let skills: [Skill] = Skills.primarySkillsList
76+
77+
@State private var searchText = ""
78+
@ObservedObject private var navigation: Navigation = .shared
79+
}
80+
81+
// MARK: - l10n.CategorySearchView
82+
83+
extension l10n {
84+
enum CategorySearchView {
85+
static let browseSkillstitle = LocalizedString("lekaapp.category_search_view.browse_skills_title",
86+
value: "Browse skills",
87+
comment: "Browse skills title")
88+
}
89+
}
90+
91+
#Preview {
92+
CategorySearchView()
93+
}

β€ŽApps/LekaApp/Sources/Views/ConnectionView.swiftβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ struct ConnectionView: View {
8686
}
8787
.onDisappear {
8888
self.authManagerViewModel.resetErrorMessage()
89-
self.navigation.sheetContent = .caregiverPicker
9089
}
9190
}
9291
}

β€ŽApps/LekaApp/Sources/Views/MainView/MainView+CategoryLabel.swiftβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ extension MainView {
1717
self.title = String(l10n.MainView.Sidebar.CategoryLabel.home.characters)
1818
self.systemImage = "house"
1919

20+
case .search:
21+
self.title = String(l10n.MainView.Sidebar.CategoryLabel.search.characters)
22+
self.systemImage = "magnifyingglass"
23+
2024
case .news:
2125
self.title = String(l10n.MainView.Sidebar.CategoryLabel.news.characters)
2226
self.systemImage = "lightbulb.max"

β€ŽApps/LekaApp/Sources/Views/MainView/MainView+l10n.swiftβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ extension l10n {
1111
enum Sidebar {
1212
enum CategoryLabel {
1313
static let home = LocalizedString("lekaapp.main_view.sidebar.category_label.home", value: "Home", comment: "The title of the category 'Home'")
14+
static let search = LocalizedString("lekaapp.main_view.sidebar.category_label.search", value: "Search", comment: "The title of the category 'Search'")
1415
static let news = LocalizedString("lekaapp.main_view.sidebar.category_label.news", value: "News", comment: "The title of the category 'News'")
1516
static let resources = LocalizedString("lekaapp.main_view.sidebar.category_label.resources", value: "Resources", comment: "The title of the category 'Resources'")
1617
static let curriculums = LocalizedString("lekaapp.main_view.sidebar.category_label.curriculums", value: "Curriculums", comment: "The title of the category 'Curriculums'")

0 commit comments

Comments
Β (0)