Skip to content

Commit c487c6b

Browse files
pylappludovic35boosted-botrenovate[bot]
authored
Version 2.0.0 (#1494)
Release of version 2.0.0 Embeds token libraries: - Core OUDS version: 1.10.0 - Core Orange version: 1.2.0 - Brand Orange version: 2.5.0 - Core Sosh version: 1.4.0 - Brand Sosh version: 2.5.0 - Core Wireframe version: 1.4.0 - Brand Wireframe version: 2.5.0 - Brand Orange Compact version: 2.5.0 See below the full CHANGELOG details. Added: - **BREAKING**: Rich text support for `alert message`, `bullet list`, `switch item`, `radio item`, `checkbox item`, `text area`, `text input`, `password input`, `PIN code input` components (#1405) - **BREAKING**: `badge` on `toolbar` components items with icons (#1398) Changed: - `github/codeql-action/upload-sarif` action from v4.35.2 to v4.35.3 for `scorecard` workflow - `swift-docc-plugin` Swift package from v1.4.6 to v1.5.0 - `SwiftFormat` Swift package plugin from v0.61.0 to v0.61.1 - `Ruby` version from v4.0.2 to v4.0.3 for `build-and-test` workflows - `fastlane` gem from v2.232.2 to v2.233.1 - `actions/upload-artifact` action from v7.0.0 to v7.0.1 for `scorecard` workflow - `json` RubyGem from v2.19.3 to v2.19.5 - `ruby/setup-ruby` action from v1.301.0 to v1.306.0 for `build-and-test` workflow - `link` component to center the indicator on multiline (#1482) - URL redirection for documentation (#1481) - Move from Xcode 26.3 to Xcode 26.4, and Swift 6.2 to Swift 6.3 (#1356) - **BREAKING**: Update of tokens (tokens librairies v2.5.0) (#1473) - **BREAKING**: Update of tokens (tokens librairies v2.4.0) (#1437) Fixed: - Overlay items of `tab bar` component still displayed even if hidden for disabled Liquid Glass for deep navigations app (#1490) - Missing error vocalization with Voice Over for `switch item` component (#1484) - Overlay items of `tab bar` component still displayed even if hidden for disabled Liquid Glass (#1434) - Selected tab indicator in `tab bar` component if Liquid Glass not applied (#1428) Removed: - **BREAKING**: Old methods prefixed by `ouds` - **BREAKING**: `UnorderedIcon` type - **BREAKING**: `OUDSBulletList.UnorderedAsset.free` case - **BREAKING**: `OUDSCheckboxItem(isOn:)`, `OUDSRadioItem(isOn:)`, `OUDSCheckboxItemIndeterminate(selection:)` inits - **BREAKING**: `OUDSTabBar(selected:count)` init Co-authored-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com> Co-authored-by: Ludovic Pinel <ludovic.pinel@orange.com> Co-authored-by: boosted-bot <boosted-bot@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2 parents 02ba338 + a5b7e1a commit c487c6b

362 files changed

Lines changed: 8079 additions & 2766 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.

.git-hooks/commit-msg

Lines changed: 145 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,173 @@ PATTERN_SECTION_REMOVED="refactor: remove|refactor: delete|chore: remove|chore:
2424
PATTERN_SECTION_DEPRECATED="refactor\(deprecated\):|chore\(deprecated\)"
2525
PATTERN_SECTION_FIXED="fix:"
2626
PATTERN_SECTION_SECURITY="fix\(security\):"
27-
PATTERN_SECTION_BREAKING="feat!:|chore!:|refactor!:|fix!:"
27+
PATTERN_SECTION_BREAKING="feat!:|chore!:|refactor!:|fix!:|refactor\(🤖\)!:"
2828
PATTERN_SECTION_CHANGED="build:|chore:|chore\(deps\):|chore\(🤖\):|ci:|docs:|style:|refactor:|perf:|test:"
2929

3030
# All acceptable patterns
3131
COMMIT_PREFIX_PATTERN="^($PATTERN_SECTION_ADDED|$PATTERN_SECTION_REMOVED|$PATTERN_SECTION_DEPRECATED|$PATTERN_SECTION_FIXED|$PATTERN_SECTION_SECURITY|$PATTERN_SECTION_BREAKING|$PATTERN_SECTION_CHANGED)"
3232

33+
# Known trailers (Linux Foundation conventions)
34+
# Exact spelling and casing is enforced.
35+
# Format expected for each trailer: Token: First Last <email@example.com> or Token: username <email@example.com>
36+
KNOWN_TRAILERS=(
37+
"Acked-by"
38+
"Assisted-by"
39+
"Co-authored-by"
40+
"Reported-by"
41+
"Reviewed-by"
42+
"Signed-off-by"
43+
"Suggested-by"
44+
"Tested-by"
45+
)
46+
47+
# Functions
48+
# ---------
49+
50+
# Check if a token matches one of the known trailers (exact casing)
51+
is_known_trailer() {
52+
local token="$1"
53+
for trailer in "${KNOWN_TRAILERS[@]}"; do
54+
if [[ "$token" == "$trailer" ]]; then
55+
return 0
56+
fi
57+
done
58+
return 1
59+
}
60+
61+
# Check if a token looks like a known trailer but with wrong casing
62+
is_known_trailer_wrong_case() {
63+
local token_lower
64+
token_lower=$(echo "$1" | tr '[:upper:]' '[:lower:]')
65+
for trailer in "${KNOWN_TRAILERS[@]}"; do
66+
local trailer_lower
67+
trailer_lower=$(echo "$trailer" | tr '[:upper:]' '[:lower:]')
68+
if [[ "$token_lower" == "$trailer_lower" ]]; then
69+
echo "$trailer"
70+
return 0
71+
fi
72+
done
73+
return 1
74+
}
75+
76+
# Validate trailers in the commit message body.
77+
# Prints errors to stdout; returns the error count via exit code.
78+
check_trailers() {
79+
local input_file="$1"
80+
local errors=0
81+
local line_number=0
82+
# Regex stored in a variable to avoid bash misinterpreting '>' as redirection
83+
# Format: "First Last <user@host.tld>" or "username <user@host.tld>" — a space before '<' is always required
84+
local TRAILER_CONTENT_RE='^[^<[:space:]][^<]*[[:space:]]<[^@[:space:]]+@[^@[:space:]]+\.[^@[:space:]]+>$'
85+
86+
# Process substitution instead of input redirection to avoid a subshell,
87+
# so that $errors stays accessible after the loop and can be returned.
88+
while IFS= read -r line; do
89+
line_number=$((line_number + 1))
90+
91+
# Skip the first line (commit subject) and blank lines
92+
[[ $line_number -eq 1 ]] && continue
93+
[[ -z "$line" ]] && continue
94+
95+
# Detect lines that look like a trailer: "Word-Word...: anything" (including empty content)
96+
# The pattern captures the token and optional content separately.
97+
if [[ "$line" =~ ^([A-Za-z][A-Za-z-]+):(.*)$ ]]; then
98+
local token="${BASH_REMATCH[1]}"
99+
local content="${BASH_REMATCH[2]}"
100+
# Trim leading space from content (the ": " separator)
101+
content="${content# }"
102+
103+
# Check if the token is a known trailer (exact casing)
104+
if is_known_trailer "$token"; then
105+
if [[ "$token" == "Assisted-by" ]]; then
106+
# Assisted-by only requires a non-empty value (no email format enforced)
107+
if [[ -z "$content" ]]; then
108+
echo "💥 Malformed trailer (line $line_number): '$line'"
109+
echo "Empty value. Expected: Assisted-by: <non-empty value>"
110+
errors=$((errors + 1))
111+
fi
112+
else
113+
# Validate content format: "First Last <email>" or "username <email>"
114+
# A space before '<' is always required.
115+
if ! [[ "$content" =~ $TRAILER_CONTENT_RE ]]; then
116+
echo "💥 Malformed trailer (line $line_number): '$line'"
117+
echo "Invalid format. Expected: $token: First Last <email@example.com> or $token: username <email@example.com>"
118+
errors=$((errors + 1))
119+
fi
120+
fi
121+
else
122+
# Check if it looks like a known trailer with wrong casing
123+
canonical=$(is_known_trailer_wrong_case "$token")
124+
if [[ $? -eq 0 ]]; then
125+
echo "💥 Malformed trailer (line $line_number): '$line'"
126+
echo "Wrong casing. Use '$canonical:' (not '$token:')"
127+
errors=$((errors + 1))
128+
# Check if it looks like a known trailer with a typo:
129+
# a token that has ≥2 hyphen-separated words and ends with a known trailer suffix.
130+
# e.g. "Reported-off-by" ends with "-by" which is the suffix of known trailers,
131+
# but the full token does not match any known trailer — flagged as a likely typo.
132+
else
133+
local token_lower
134+
token_lower=$(echo "$token" | tr '[:upper:]' '[:lower:]')
135+
local is_trailer_like=0
136+
for trailer in "${KNOWN_TRAILERS[@]}"; do
137+
local trailer_lower
138+
trailer_lower=$(echo "$trailer" | tr '[:upper:]' '[:lower:]')
139+
# Flag as trailer-like if the token ends with the same suffix ("-by", "-on", etc.)
140+
local suffix="${trailer_lower##*-}"
141+
if [[ "$token_lower" == *"-$suffix" ]] && [[ ${#token} -gt ${#trailer} ]]; then
142+
is_trailer_like=1
143+
break
144+
fi
145+
done
146+
if [[ $is_trailer_like -eq 1 ]]; then
147+
echo "💥 Malformed trailer (line $line_number): '$line'"
148+
echo "Unknown trailer '$token:'. Valid trailers are:"
149+
echo "${KNOWN_TRAILERS[*]}"
150+
errors=$((errors + 1))
151+
fi
152+
# Otherwise: regular body line with a colon — silently ignored
153+
fi
154+
fi
155+
fi
156+
done < <(cat "$input_file")
157+
158+
return $errors
159+
}
160+
33161
# Main
34162
# ----
35163

36-
echo "🔎 Checking conventional commit messages commit message"
164+
echo "🔎 Checking conventional commit message"
37165

38166
INPUT_FILE=$1
39-
COMMIT_MESSAGE=`head -n1 $INPUT_FILE`
167+
COMMIT_MESSAGE=$(head -n1 "$INPUT_FILE")
40168
if ! [[ "$COMMIT_MESSAGE" =~ $COMMIT_PREFIX_PATTERN ]]; then
41169
echo "Bad commit message, it must match one of the following patterns:"
42170
echo -e "\tTo add things............: 'feat:' \t \t \t 'chore: add'"
43171
echo -e "\tTo remove things.........: 'refactor: remove' \t \t 'refactor: delete' \t 'chore: remove' \t 'chore: delete'"
44172
echo -e "\tTo deprecate things......: 'refactor(deprecated)' \t 'chore(deprecated)'"
45173
echo -e "\tTo fix things............: 'fix:"
46174
echo -e "\tFor security fixes.......: 'fix(security)'"
47-
echo -e "\tFor breaking changes.....: 'feat!:' \t 'chore!:' \t 'refactor!:' \t \t 'fix!:'"
175+
echo -e "\tFor breaking changes.....: 'feat!:' \t 'chore!:' \t 'refactor!:' \t \t 'refactor(🤖)!: \t \t 'fix!:'"
48176
echo -e "\tFor any other changes....: 'build:' \t 'chore:' \t 'chore(deps)' \t 'chore(🤖)' \t 'ci:' \t \t \t 'docs:' \t \t 'style:' \t 'refactor:' \t 'perf:' \t 'test:'"
49177
echo "Your commit message: '$COMMIT_MESSAGE'"
50178
exit 1
51179
fi
52180

181+
echo "🔎 Checking trailers"
182+
183+
check_trailers "$INPUT_FILE"
184+
TRAILER_ERRORS=$?
185+
186+
if [[ $TRAILER_ERRORS -gt 0 ]]; then
187+
echo ""
188+
echo "Valid trailers: ${KNOWN_TRAILERS[*]}"
189+
echo "Expected format: Token: First Last <email@example.com> or Token: username <email@example.com>"
190+
echo "Exception: Assisted-by: <any non-empty value>"
191+
exit 1
192+
fi
193+
53194
echo "✨ Checking done!"
54195

55196
exit 0

.github/DEVELOP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
> [!IMPORTANT]
3030
> You must have an iOS-ready environment to contribute to the project or at least build it.
31-
> Thus macOS is mandatory and Xcode 26.
31+
> Thus macOS is mandatory and Xcode 26.4.
3232
3333
> [!IMPORTANT]
3434
> You should check wether or not you have the tools in use in the project like Fastlane, SwiftLint, SwiftFormat, etc.
@@ -116,10 +116,10 @@ source ~/.zshrc
116116
ruby --version
117117
```
118118

119-
We use also for our GitLab CI runners **Xcode 26.3**, we suggest you use this version or newer if you want (but not recommended).
119+
We use also for our GitLab CI runners **Xcode 26.4**, we suggest you use this version or newer if you want (but not recommended).
120120

121121
> [!IMPORTANT]
122-
> Xcode 26.3 and Swift 6.2 are used for this project. You must use this configuration.
122+
> Xcode 26.4 and Swift 6.3 are used for this project. You must use this configuration.
123123
> No retrocompatibility is planned.
124124
> If needed, contact us and open a discussino on GitHub Orange-OpenSource/ouds-ios
125125

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Report a bug
2-
description: Tell us about a bug or issue you may have identified in OUDS iOS.
2+
description: Tell us about a bug or issue you may have identified in OUDS iOS (in english if possible)
33
title: "When / For / In / On ... "
44
labels: ["🐞 bug", "🔍 triage"]
55
assignees: ["ludovic35", "pylapp"]
@@ -27,41 +27,47 @@ body:
2727
placeholder: iOS 15.1
2828
validations:
2929
required: true
30-
- type: input
31-
id: app-ouds-lib-version
30+
- type: checkboxes
31+
id: liquid-glass-disabled
3232
attributes:
33-
label: OUDS iOS library version
34-
placeholder: "1.0.0"
33+
label: Is Liquid Glass disabled
34+
options:
35+
- label: Yes, Liquid Glass is disabled (or OS version is older than 26)
36+
- label: No, Liquid Glass is enabled (or OS version is 26 or newer)
3537
validations:
3638
required: true
3739
- type: input
38-
id: app-version
40+
id: app-ouds-lib-version
3941
attributes:
40-
label: Design System Toolbox app version
41-
placeholder: 1.0.0
42+
label: OUDS iOS library version
43+
placeholder: "1.4.0"
44+
validations:
45+
required: true
4246
- type: input
43-
id: app-build-number
47+
id: xcode-version
4448
attributes:
45-
label: Design System Toolbox app build number
46-
placeholder: "1766065729"
49+
label: Xcode version
50+
placeholder: "Add 'xcodebuild -version' command outputs"
51+
validations:
52+
required: false
4753
- type: input
48-
id: app-build-type
54+
id: swift-version
4955
attributes:
50-
label: Design System Toolbox app build type
51-
placeholder: alpha, beta, prod, debug
56+
label: Swift version
57+
placeholder: "Add 'swift --version' command outputs"
5258
validations:
53-
required: false
59+
required: false
5460
- type: input
5561
id: app-orientation
5662
attributes:
57-
label: Design System Toolbox app orientation
63+
label: App orientation
5864
placeholder: Portrait and / or landscape
5965
validations:
6066
required: false
6167
- type: input
6268
id: app-language
6369
attributes:
64-
label: Design System Toolbox app language
70+
label: App language
6571
placeholder: English
6672
validations:
6773
required: false
@@ -71,28 +77,31 @@ body:
7177
label: Device language
7278
placeholder: English
7379
validations:
74-
required: false
80+
required: false
7581
- type: input
7682
id: app-token-lib-version
7783
attributes:
78-
label: Tokens libraries versions embeded in the app
84+
label: Tokens libraries versions embeded in the app (check your logs)
7985
placeholder: "Orange 1.1.0, Core 1.2.0, Sosh 1.0.0, ..."
8086
validations:
81-
required: false
87+
required: false
8288
- type: input
83-
id: xcode-version
89+
id: design-toolbox-app-version
8490
attributes:
85-
label: Xcode version
86-
placeholder: "Add 'xcodebuild -version' command outputs"
87-
validations:
88-
required: false
91+
label: Design System Toolbox app version (if used)
92+
placeholder: 1.0.0
8993
- type: input
90-
id: swift-version
94+
id: design-toolbox-app-build-number
9195
attributes:
92-
label: Swift version
93-
placeholder: "Add 'swift --version' command outputs"
96+
label: Design System Toolbox app build number (if used)
97+
placeholder: "1766065729"
98+
- type: input
99+
id: design-toolbox-app-build-type
100+
attributes:
101+
label: Design System Toolbox app build type (if used)
102+
placeholder: alpha, beta, prod, debug
94103
validations:
95-
required: false
104+
required: false
96105
- type: textarea
97106
id: what-happened
98107
attributes:
@@ -113,4 +122,4 @@ body:
113122
label: Accessibility settings
114123
description: Provide a description about the accessibility settings you have (vocalization with Voice Over, increased text sizes, keyboard navigation, high contrast, etc.)
115124
validations:
116-
required: true
125+
required: true

.github/copilot-instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ It covers contributor and maintainer guidelines: code formatting, architecture,
55

66
## 1. Code formatting
77

8-
The source code is formatted for Swift 6.2. Configuration of formatter is in `.swiftformat` and linter in `.swiftlint`.
8+
The source code is formatted for Swift 6.3. Configuration of formatter is in `.swiftformat` and linter in `.swiftlint`.
99

1010
## 2. Architecture details
1111

@@ -214,8 +214,8 @@ Everything is available on [our guidelines](https://a11y-guidelines.orange.com/f
214214

215215
## 7. Development requirements
216216

217-
- Minimum Swift 6.2 (e.g. 6.2.3)
218-
- Xcode 26.3 or later
217+
- Minimum Swift 6.3 (e.g. 6.3.1)
218+
- Xcode 26.4 or later
219219
- Minimum deployment: iOS 15.0, iPadOS 15.0, macOS 13.0, visionOS 1.0, watchOS 11.6, tvOS 16.6
220220
- Apple Developer account for device testing
221221

.github/workflows/build-and-test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ jobs:
5656
- name: Checkout code
5757
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5858

59-
- name: Set up Xcode 26.3.0
59+
- name: Set up Xcode 26.4.1
6060
run: |
61-
sudo xcode-select -s /Applications/Xcode_26.3.0.app/Contents/Developer
61+
sudo xcode-select -s /Applications/Xcode_26.4.1.app/Contents/Developer
6262
6363
- name: Set up Ruby
64-
uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # v1.301.0, https://github.com/ruby/setup-ruby
64+
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0, https://github.com/ruby/setup-ruby
6565
with:
66-
ruby-version: '4.0.2'
66+
ruby-version: '4.0.3'
6767

6868
- name: Install Fastlane
6969
run: |
@@ -81,14 +81,14 @@ jobs:
8181
- name: Checkout code
8282
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8383

84-
- name: Set up Xcode 26.3.0
84+
- name: Set up Xcode 26.4.1
8585
run: |
86-
sudo xcode-select -s /Applications/Xcode_26.3.0.app/Contents/Developer
86+
sudo xcode-select -s /Applications/Xcode_26.4.1.app/Contents/Developer
8787
8888
- name: Set up Ruby
89-
uses: ruby/setup-ruby@4c56a21280b36d862b5fc31348f463d60bdc55d5 # v1.301.0, https://github.com/ruby/setup-ruby
89+
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0, https://github.com/ruby/setup-ruby
9090
with:
91-
ruby-version: '4.0.2'
91+
ruby-version: '4.0.3'
9292

9393
- name: Install Fastlane
9494
run: |

.github/workflows/build-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ jobs:
5555
- name: Checkout code
5656
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5757

58-
- name: Set up Xcode 26.3.0
58+
- name: Set up Xcode 26.4.1
5959
run: |
60-
sudo xcode-select -s /Applications/Xcode_26.3.0.app/Contents/Developer
60+
sudo xcode-select -s /Applications/Xcode_26.4.1.app/Contents/Developer
6161
6262
- name: Build documentation
6363
run: |

0 commit comments

Comments
 (0)