Skip to content

Commit 684f27b

Browse files
committed
fix: icons never flipped even if toggled in radio item page (Orange-OpenSource/ouds-ios#675) (#19)
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
1 parent 107f9df commit 684f27b

File tree

1,262 files changed

+112
-52
lines changed

Some content is hidden

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

1,262 files changed

+112
-52
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Fixed
1919

20-
- Change color of button loader in high contrast light mode (Orange-OpenSource/ouds-ios#437)
21-
- Change color of indicator and borders in high contrast mode (light scheme) for radio and checkbox components (Orange-OpenSource/ouds-ios#645)
20+
- [DesignToolbox] In radio item page icons never flipped when flip option toggled (Orange-OpenSource/ouds-ios#675)
21+
- [Library] Change color of button loader in high contrast light mode (Orange-OpenSource/ouds-ios#437)
22+
- [Library] Change color of indicator and borders in high contrast mode (light scheme) for radio and checkbox components (Orange-OpenSource/ouds-ios#645)
2223

2324
## [0.15.0](https://github.com/Orange-OpenSource/ouds-ios-design-system-toolbox/releases/tag/0.15.0) - 2025-05-28
2425

DesignToolbox/DesignToolbox/Pages/Components/Radio/RadioItem/RadioItemPage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private struct RadioItemDemo: View {
7878
additionalLabel: model.additionalLabelText,
7979
helper: model.helperText,
8080
icon: icon,
81+
flipIcon: model.flipIcon,
8182
isOutlined: model.outlined,
8283
isReversed: model.isReversed,
8384
isError: model.isError,

DesignToolbox/DesignToolboxSnapshotsTests/__Snapshots__/Components/OUDSCheckboxUITests.swift

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,31 @@ final class OUDSCheckboxUITests: XCTestCase {
180180
CheckboxIndeterminateTest.Layout.default(labelText: "Takoyaki", helperText: nil, icon: nil, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
181181
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: nil, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
182182
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: nil, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
183-
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
184-
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
185-
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
186-
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
183+
184+
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
185+
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
186+
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
187+
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
188+
189+
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
190+
CheckboxIndeterminateTest.Layout.default(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
191+
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
192+
CheckboxIndeterminateTest.Layout.default(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
187193

188194
CheckboxIndeterminateTest.Layout.reversed(labelText: "Takoyaki", helperText: nil, icon: nil, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
189195
CheckboxIndeterminateTest.Layout.reversed(labelText: "Takoyaki", helperText: nil, icon: nil, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
190196
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: nil, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
191197
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: nil, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
192-
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
193-
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
194-
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
195-
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "heart.fill"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
198+
199+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
200+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
201+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: false, isReadOnly: isReadOnly),
202+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), isError: isError, hasDivider: true, isReadOnly: isReadOnly),
203+
204+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
205+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Kammthaar", helperText: nil, icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
206+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: false, isReadOnly: isReadOnly),
207+
CheckboxIndeterminateTest.Layout.reversed(labelText: "Patatas", helperText: "Bravas", icon: Image(systemName: "figure.handball"), flipIcon: true, isError: isError, hasDivider: true, isReadOnly: isReadOnly),
196208
]
197209
}
198210
// swiftlint:enable line_length
@@ -210,12 +222,14 @@ private struct CheckboxIndeterminateTest: View {
210222
case `default`(labelText: String,
211223
helperText: String?,
212224
icon: Image?,
225+
flipIcon: Bool = false,
213226
isError: Bool,
214227
hasDivider: Bool,
215228
isReadOnly: Bool)
216229
case reversed(labelText: String,
217230
helperText: String?,
218231
icon: Image?,
232+
flipIcon: Bool = false,
219233
isError: Bool,
220234
hasDivider: Bool,
221235
isReadOnly: Bool)
@@ -225,10 +239,10 @@ private struct CheckboxIndeterminateTest: View {
225239
switch self {
226240
case let .indicatorOnly(isError):
227241
"layout-indicatorOnly-\(isError ? "error" : "")"
228-
case let .default(_, helperText, icon, isError, hasDivider, isReadOnly):
229-
"layout-default-label-\(helperText != nil ? "withHelper" : "")-\(icon != nil ? "withIcon" : "")-\(isError ? "error" : "")-\(isReadOnly ? "readOnly" : "")-\(hasDivider ? "divider" : "")"
230-
case let .reversed(_, helperText, icon, isError, hasDivider, isReadOnly):
231-
"layout-inverse-label-\(helperText != nil ? "withHelper" : "")-\(icon != nil ? "withIcon" : "")-\(isError ? "error" : "")-\(isReadOnly ? "readOnly" : "")-\(hasDivider ? "divider" : "")"
242+
case let .default(_, helperText, icon, flipIcon, isError, hasDivider, isReadOnly):
243+
"layout-default-label-\(helperText != nil ? "withHelper" : "")-\(icon != nil ? "withIcon" : "")-\(flipIcon ? "flipIcon" : "")-\(isError ? "error" : "")-\(isReadOnly ? "readOnly" : "")-\(hasDivider ? "divider" : "")"
244+
case let .reversed(_, helperText, icon, flipIcon, isError, hasDivider, isReadOnly):
245+
"layout-inverse-label-\(helperText != nil ? "withHelper" : "")-\(icon != nil ? "withIcon" : "")-\(flipIcon ? "flipIcon" : "")-\(isError ? "error" : "")-\(isReadOnly ? "readOnly" : "")-\(hasDivider ? "divider" : "")"
232246
}
233247
}
234248
// swiftlint:enable line_length
@@ -250,21 +264,23 @@ private struct CheckboxIndeterminateTest: View {
250264
accessibilityLabel: "Bazinga!",
251265
isError: isError)
252266
.disabled(isDisabled)
253-
case let .default(labelText, helperText, icon, isError, hasDivider, isReadOnly):
267+
case let .default(labelText, helperText, icon, flipIcon, isError, hasDivider, isReadOnly):
254268
OUDSCheckboxItemIndeterminate(selection: .constant(indicatorState),
255269
label: labelText,
256270
helper: helperText,
257271
icon: icon,
272+
flipIcon: flipIcon,
258273
isReversed: false,
259274
isError: isError,
260275
isReadOnly: isReadOnly,
261276
hasDivider: hasDivider)
262277
.disabled(isDisabled)
263-
case let .reversed(labelText, helperText, icon, isError, hasDivider, isReadOnly):
278+
case let .reversed(labelText, helperText, icon, flipIcon, isError, hasDivider, isReadOnly):
264279
OUDSCheckboxItemIndeterminate(selection: .constant(indicatorState),
265280
label: labelText,
266281
helper: helperText,
267282
icon: icon,
283+
flipIcon: flipIcon,
268284
isReversed: true,
269285
isError: isError,
270286
isReadOnly: isReadOnly,

0 commit comments

Comments
 (0)