Skip to content

Commit 4b00874

Browse files
committed
🔀️ Merge branch 'release/LekaApp/1.7.0'
2 parents 3131005 + 277fa35 commit 4b00874

271 files changed

Lines changed: 4778 additions & 5006 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.

.pre-commit-config.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# ? See https://pre-commit.com/hooks.html for more hooks
77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.5.0
9+
rev: v4.6.0
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
@@ -31,13 +31,13 @@ repos:
3131
- id: mixed-line-ending
3232

3333
- repo: https://github.com/realm/SwiftLint
34-
rev: 0.54.0
34+
rev: 0.55.1
3535
hooks:
3636
- id: swiftlint
3737
entry: swiftlint
3838

3939
- repo: https://github.com/nicklockwood/SwiftFormat
40-
rev: 0.53.1
40+
rev: 0.54.0
4141
hooks:
4242
- id: swiftformat
4343

@@ -100,6 +100,18 @@ repos:
100100
additional_dependencies: ["ruamel.yaml"]
101101
files: skills.yml
102102

103+
- id: check_yaml_definitions_tags
104+
name: Check tags.yml
105+
description: |
106+
This hook checks tags.yml for:
107+
- non unique ids
108+
- jtd schema validation
109+
It also formats the file and sorts the entries
110+
entry: python3 Tools/Hooks/check_yaml_definitions_tags.py
111+
language: python
112+
additional_dependencies: ["ruamel.yaml"]
113+
files: tags.yml
114+
103115
- id: check_yaml_content_activities
104116
name: Check activity.yml files
105117
description: |

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.6.0"
16+
return "1.7.0"
1717
}()
1818

1919
let project = Project.app(

Apps/LekaApp/Resources/l10n/Localizable.xcstrings

Lines changed: 76 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,24 @@
12621262
}
12631263
}
12641264
},
1265+
"lekaapp.category_resources_deep_dive_view.empty_label": {
1266+
"comment": "Empty label when no resources are available in the grid view.",
1267+
"extractionState": "extracted_with_value",
1268+
"localizations": {
1269+
"en": {
1270+
"stringUnit": {
1271+
"state": "new",
1272+
"value": "No resources yet"
1273+
}
1274+
},
1275+
"fr": {
1276+
"stringUnit": {
1277+
"state": "translated",
1278+
"value": "Ressources non disponibles actuellement"
1279+
}
1280+
}
1281+
}
1282+
},
12651283
"lekaapp.category_search_view.browse_skills_title": {
12661284
"comment": "Browse skills title",
12671285
"extractionState": "extracted_with_value",
@@ -1802,20 +1820,56 @@
18021820
}
18031821
}
18041822
},
1805-
"lekaapp.main_view.sidebar.category_label.resources": {
1806-
"comment": "The title of the category 'Resources'",
1823+
"lekaapp.main_view.sidebar.category_label.resources_deep_dive": {
1824+
"comment": "The title of the resources sub category 'DeepDive'",
18071825
"extractionState": "extracted_with_value",
18081826
"localizations": {
18091827
"en": {
18101828
"stringUnit": {
18111829
"state": "new",
1812-
"value": "Resources"
1830+
"value": "Deep Dive"
18131831
}
18141832
},
18151833
"fr": {
18161834
"stringUnit": {
18171835
"state": "translated",
1818-
"value": "Ressources"
1836+
"value": "Aller Plus Loin"
1837+
}
1838+
}
1839+
}
1840+
},
1841+
"lekaapp.main_view.sidebar.category_label.resources_first_steps": {
1842+
"comment": "The title of the resources sub category 'First Steps'",
1843+
"extractionState": "extracted_with_value",
1844+
"localizations": {
1845+
"en": {
1846+
"stringUnit": {
1847+
"state": "new",
1848+
"value": "First steps"
1849+
}
1850+
},
1851+
"fr": {
1852+
"stringUnit": {
1853+
"state": "translated",
1854+
"value": "Premiers Pas"
1855+
}
1856+
}
1857+
}
1858+
},
1859+
"lekaapp.main_view.sidebar.category_label.resources_video": {
1860+
"comment": "The title of the resources sub category 'Videos'",
1861+
"extractionState": "extracted_with_value",
1862+
"localizations": {
1863+
"en": {
1864+
"stringUnit": {
1865+
"state": "new",
1866+
"value": "Videos"
1867+
}
1868+
},
1869+
"fr": {
1870+
"stringUnit": {
1871+
"state": "translated",
1872+
"value": "Vid\u00e9os"
18191873
}
18201874
}
18211875
}
@@ -1928,6 +1982,24 @@
19281982
}
19291983
}
19301984
},
1985+
"lekaapp.main_view.sidebar.section_resources": {
1986+
"comment": "The title of the section 'Resources'",
1987+
"extractionState": "extracted_with_value",
1988+
"localizations": {
1989+
"en": {
1990+
"stringUnit": {
1991+
"state": "new",
1992+
"value": "Resources"
1993+
}
1994+
},
1995+
"fr": {
1996+
"stringUnit": {
1997+
"state": "translated",
1998+
"value": "Ressources"
1999+
}
2000+
}
2001+
}
2002+
},
19312003
"lekaapp.news_view.description": {
19322004
"comment": "News description",
19332005
"extractionState": "extracted_with_value",
@@ -2252,60 +2324,6 @@
22522324
}
22532325
}
22542326
},
2255-
"lekaapp.resources_view.description": {
2256-
"comment": "Resources description",
2257-
"extractionState": "extracted_with_value",
2258-
"localizations": {
2259-
"en": {
2260-
"stringUnit": {
2261-
"state": "new",
2262-
"value": "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
2263-
}
2264-
},
2265-
"fr": {
2266-
"stringUnit": {
2267-
"state": "translated",
2268-
"value": "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."
2269-
}
2270-
}
2271-
}
2272-
},
2273-
"lekaapp.resources_view.subtitle": {
2274-
"comment": "Resources subtitle",
2275-
"extractionState": "extracted_with_value",
2276-
"localizations": {
2277-
"en": {
2278-
"stringUnit": {
2279-
"state": "new",
2280-
"value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
2281-
}
2282-
},
2283-
"fr": {
2284-
"stringUnit": {
2285-
"state": "translated",
2286-
"value": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
2287-
}
2288-
}
2289-
}
2290-
},
2291-
"lekaapp.resources_view.title": {
2292-
"comment": "Resources title",
2293-
"extractionState": "extracted_with_value",
2294-
"localizations": {
2295-
"en": {
2296-
"stringUnit": {
2297-
"state": "new",
2298-
"value": "Resources"
2299-
}
2300-
},
2301-
"fr": {
2302-
"stringUnit": {
2303-
"state": "translated",
2304-
"value": "Ressources"
2305-
}
2306-
}
2307-
}
2308-
},
23092327
"lekaapp.robot_connection_label.text_connected_to": {
23102328
"comment": "Connected to xxx robot label",
23112329
"extractionState": "extracted_with_value",

Apps/LekaApp/Sources/MainApp.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct LekaApp: App {
6767
DispatchQueue.global().async {
6868
_ = ContentKit.allActivities
6969
_ = ContentKit.allCurriculums
70+
_ = ContentKit.allStories
7071
}
7172
}
7273
}

Apps/LekaApp/Sources/Navigation/Navigation+Category.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ extension Navigation {
88
enum Category: Hashable, Identifiable, CaseIterable {
99
case home
1010
case search
11+
case resourcesFirstSteps
12+
case resourcesVideo
13+
case resourcesDeepDive
1114
case curriculums
1215
case activities
1316
case stories
@@ -16,11 +19,12 @@ extension Navigation {
1619
case carereceivers
1720

1821
// ? DEVELOPER_MODE
19-
case allActivities
22+
case allPublishedActivities
23+
case allDraftActivities
24+
case allTemplateActivities
2025
case rasterImageList
2126
case vectorImageList
2227
case news
23-
case resources
2428

2529
// MARK: Internal
2630

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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: - CategoryResourcesDeepDiveView
11+
12+
struct CategoryResourcesDeepDiveView: View {
13+
// MARK: Internal
14+
15+
var body: some View {
16+
ScrollView(showsIndicators: true) {
17+
HStack(alignment: .center, spacing: 30) {
18+
Image(systemName: "paperclip")
19+
.resizable()
20+
.scaledToFit()
21+
.frame(width: 80, height: 80)
22+
.foregroundStyle(self.styleManager.accentColor!)
23+
24+
VStack(alignment: .leading) {
25+
Text(self.category.details.subtitle)
26+
.font(.title2)
27+
28+
Text(self.category.details.description)
29+
.foregroundStyle(.secondary)
30+
}
31+
}
32+
.padding(.horizontal)
33+
34+
if self.category.content.map(\.resource).filter({ !$0.title.isEmpty }).isEmpty {
35+
VStack {
36+
Text(l10n.CategoryResourcesDeepDiveView.emptyLabel)
37+
.font(.title)
38+
.multilineTextAlignment(.center)
39+
}
40+
.padding(.top, 150)
41+
} else {
42+
ResourceGridView(resources: self.category.content.map(\.resource))
43+
}
44+
}
45+
.navigationTitle(self.category.details.title)
46+
}
47+
48+
// MARK: Private
49+
50+
private let category: CategoryResources = ContentKit.deepDiveResources
51+
52+
@ObservedObject private var navigation: Navigation = .shared
53+
@ObservedObject private var styleManager: StyleManager = .shared
54+
}
55+
56+
// MARK: - l10n.CategoryResourcesDeepDiveView
57+
58+
extension l10n {
59+
enum CategoryResourcesDeepDiveView {
60+
static let emptyLabel = LocalizedString("lekaapp.category_resources_deep_dive_view.empty_label",
61+
value: "No resources yet",
62+
comment: "Empty label when no resources are available in the grid view.")
63+
}
64+
}
65+
66+
#Preview {
67+
CategoryResourcesDeepDiveView()
68+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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: - CategoryResourcesFirstStepsView
11+
12+
struct CategoryResourcesFirstStepsView: View {
13+
// MARK: Internal
14+
15+
var body: some View {
16+
ScrollView(showsIndicators: true) {
17+
HStack(alignment: .center, spacing: 30) {
18+
Image(systemName: "shoeprints.fill")
19+
.resizable()
20+
.scaledToFit()
21+
.frame(width: 80, height: 80)
22+
.foregroundStyle(self.styleManager.accentColor!)
23+
24+
VStack(alignment: .leading) {
25+
Text(self.category.details.subtitle)
26+
.font(.title2)
27+
28+
Text(self.category.details.description)
29+
.foregroundStyle(.secondary)
30+
}
31+
}
32+
.padding(.horizontal)
33+
34+
ResourceGridView(resources: self.category.content.map(\.resource))
35+
}
36+
.navigationTitle(self.category.details.title)
37+
}
38+
39+
// MARK: Private
40+
41+
private let category: CategoryResources = ContentKit.firstStepsResources
42+
43+
@ObservedObject private var navigation: Navigation = .shared
44+
@ObservedObject private var styleManager: StyleManager = .shared
45+
}
46+
47+
#Preview {
48+
CategoryResourcesFirstStepsView()
49+
}

0 commit comments

Comments
 (0)