Skip to content

Commit 316e544

Browse files
committed
🔀️ Merge branch 'release/LekaApp/1.11.0'
2 parents 37b9854 + cf66ef6 commit 316e544

194 files changed

Lines changed: 3721 additions & 1613 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_beta_internal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- "Modules/ContentKit/**"
1919
- "Tuist/Package.swift"
2020
- "Tuist/Package.resolved"
21-
- "fastlane/Fastfile" # TODO: (@ladislas) remove this line after test
21+
- "!**/Examples/**/*.swift"
2222
workflow_dispatch: # nothing to setup here, just to trigger the workflow manually
2323

2424
concurrency:

.github/workflows/ci-linter-license_checker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
lfs: false
2626

2727
- name: Install deno
28-
uses: denoland/setup-deno@v1
28+
uses: denoland/setup-deno@v2
2929
with:
3030
deno-version: vx.x.x
3131

3232
- name: Check licenses in all files
3333
run: |
34-
deno run --allow-read https://deno.land/x/license_checker@v3.2.2/main.ts
34+
deno run --allow-read jsr:@kt3k/license-checker@3.3.1/main

.pre-commit-config.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@
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.6.0
9+
rev: v5.0.0
1010
hooks:
11-
- id: trailing-whitespace
11+
- id: check-added-large-files
12+
- id: check-case-conflict
13+
- id: check-executables-have-shebangs
14+
- id: check-merge-conflict
15+
- id: check-shebang-scripts-are-executable
16+
- id: check-symlinks
17+
- id: detect-private-key
1218
- id: end-of-file-fixer
1319
exclude_types: [json]
1420
exclude: '(.*\.xcstrings|\.xcassets|\.svg)'
21+
- id: forbid-submodules
22+
- id: mixed-line-ending
23+
- id: no-commit-to-branch
24+
args: [--branch, main, --branch, develop]
25+
- id: trailing-whitespace
1526
- id: check-yaml
1627
exclude: exercise_templates.yml
1728
- id: check-json
@@ -23,18 +34,13 @@ repos:
2334
types: [file]
2435
files: \.(json|xcstrings)$
2536
exclude: '(\.vscode/settings\.json|\.jtd\.json$|.*\.xcassets/.*|.*\.colorset/.*|\.animation\.lottie\.json$)'
26-
- id: check-added-large-files
27-
- id: check-executables-have-shebangs
28-
- id: check-shebang-scripts-are-executable
29-
- id: detect-private-key
30-
- id: forbid-submodules
31-
- id: mixed-line-ending
3237

3338
- repo: https://github.com/realm/SwiftLint
3439
rev: 0.57.0
3540
hooks:
3641
- id: swiftlint
3742
entry: swiftlint
43+
args: ["--use-alternative-excluding"]
3844

3945
- repo: https://github.com/nicklockwood/SwiftFormat
4046
rev: 0.54.5

.swiftlint.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ disabled_rules:
6464
- closure_parameter_position
6565

6666
excluded:
67-
- Tuist/Dependencies
68-
- ./*/Derived
67+
- Tuist/.build
6968

7069
reporter: "emoji"

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

1919
let project = Project.app(

Apps/LekaApp/Resources/l10n/Localizable.xcstrings

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,24 @@
686686
}
687687
}
688688
},
689+
"lekaapp.caregiver_creation.email_whitespaces_error_message": {
690+
"comment": "Error message when whitespaces or linebreaks detected in email textfield",
691+
"extractionState": "extracted_with_value",
692+
"localizations": {
693+
"en": {
694+
"stringUnit": {
695+
"state": "new",
696+
"value": "Email cannot contain spaces or line breaks"
697+
}
698+
},
699+
"fr": {
700+
"stringUnit": {
701+
"state": "translated",
702+
"value": "L\u2019e-mail ne doit pas contenir d\u2019espaces ou de sauts de ligne"
703+
}
704+
}
705+
}
706+
},
689707
"lekaapp.caregiver_creation.profession_label": {
690708
"comment": "Caregiver creation profession label above profession selection button",
691709
"extractionState": "extracted_with_value",

Apps/LekaApp/Sources/Views/TextFields/TextFieldDefault.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import SwiftUI
88
// MARK: - TextFieldDefault
99

1010
struct TextFieldDefault: View {
11+
// MARK: Internal
12+
1113
let label: String
1214
@Binding var entry: String
1315

@@ -18,8 +20,18 @@ struct TextFieldDefault: View {
1820
TextField("", text: self.$entry)
1921
.textFieldStyle(.roundedBorder)
2022
.autocorrectionDisabled()
23+
.focused(self.$focused)
24+
.onChange(of: self.focused) { focused in
25+
if !focused {
26+
self.entry = self.entry.trimLeadingAndTrailingWhitespaces()
27+
}
28+
}
2129
}
2230
}
31+
32+
// MARK: Private
33+
34+
@FocusState private var focused: Bool
2335
}
2436

2537
#Preview {

Apps/LekaApp/Sources/Views/TextFields/TextFieldEmail.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ struct TextFieldEmail: View {
4040
.textInputAutocapitalization(.never)
4141
.autocorrectionDisabled()
4242
.focused(self.$focused)
43-
.onChange(of: self.entry) { newValue in
44-
self.entry = newValue.trimmingCharacters(in: .whitespaces)
43+
.onChange(of: self.focused) { focused in
44+
if !focused {
45+
self.entry = self.entry.trimLeadingAndTrailingWhitespaces()
46+
}
4547
}
4648
.overlay(
4749
RoundedRectangle(cornerRadius: 8)

Apps/LekaApp/Sources/Views/TextFields/TextFieldPassword.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ struct TextFieldPassword: View {
4646
.textInputAutocapitalization(.never)
4747
.autocorrectionDisabled()
4848
.focused(self.$focused)
49-
.onChange(of: self.entry) { newValue in
50-
self.entry = newValue.trimmingCharacters(in: .whitespaces)
51-
}
5249
.overlay(
5350
RoundedRectangle(cornerRadius: 8)
5451
.stroke(self.focused ? .blue : .clear, lineWidth: 1)

Apps/LekaApp/Sources/Views/Users/CareReceiver/CreateCarereceiverView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ struct CreateCarereceiverView: View {
7171
.autocorrectionDisabled()
7272
.multilineTextAlignment(.trailing)
7373
.foregroundStyle(Color.secondary)
74+
.focused(self.$focused)
75+
.onChange(of: self.focused) { focused in
76+
if !focused {
77+
self.newCarereceiver.username = self.newCarereceiver.username.trimLeadingAndTrailingWhitespaces()
78+
}
79+
}
7480
}
7581
}
7682

@@ -114,6 +120,8 @@ struct CreateCarereceiverView: View {
114120
@State private var isCarereceiverCreated: Bool = false
115121
@StateObject private var viewModel = CreateCarereceiverViewModel()
116122

123+
@FocusState private var focused: Bool
124+
117125
@State private var newCarereceiver = Carereceiver()
118126
@State private var isAvatarPickerPresented: Bool = false
119127
@State private var cancellables = Set<AnyCancellable>()

0 commit comments

Comments
 (0)