Skip to content

Commit 9be8886

Browse files
committed
chore: update CHANGELOG, MIGRATION, clean sources (#1346)
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
1 parent fd31f8f commit 9be8886

File tree

8 files changed

+51
-58
lines changed

8 files changed

+51
-58
lines changed

CHANGELOG.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased](https://github.com/Orange-OpenSource/ouds-ios/compare/1.3.0...develop)
88

9-
### Added
10-
11-
- New unprefixed `View` extension methods as non-deprecated alternatives to the deprecated `ouds`-prefixed ones (Orange-OpenSource/ouds-ios#1352)
12-
139
### Changed
1410

15-
- Rename internal `OUDSButtonStyle` to `StyleForButton` (Orange-OpenSource/ouds-ios#1352)
16-
17-
### Deprecated
18-
19-
- `View.oudsForegroundStyle(_:)` replaced by `View.foregroundStyle(_:)` (Orange-OpenSource/ouds-ios#1352)
20-
- `View.oudsForegroundColor(_:)` replaced by `View.foregroundColor(_:)` (Orange-OpenSource/ouds-ios#1352)
21-
- `View.oudsBackground(_:)` replaced by `View.background(_:)` (Orange-OpenSource/ouds-ios#1352)
22-
- `View.oudsAccentColor(_:)` replaced by `View.accentColor(_:)` (Orange-OpenSource/ouds-ios#1352)
23-
- `View.oudsShadow(_:)` replaced by `View.shadow(_:)` (Orange-OpenSource/ouds-ios#1352)
24-
- `View.oudsBorder(style:width:radius:color:)` replaced by `View.border(style:width:radius:color:)` (Orange-OpenSource/ouds-ios#1352)
25-
- `View.oudsColoredSurface(_:)` replaced by `View.coloredSurface(_:)` (Orange-OpenSource/ouds-ios#1352)
26-
- `View.oudsGridMargin(_:)` replaced by `View.gridMargin(_:)` (Orange-OpenSource/ouds-ios#1352)
27-
- `View.oudsRequestAccessibleFocus(_:)` replaced by `View.requestAccessibleFocus(_:)` (Orange-OpenSource/ouds-ios#1352)
28-
- `View.oudsRequestAccessibleFocus(_:for:)` replaced by `View.requestAccessibleFocus(_:for:)` (Orange-OpenSource/ouds-ios#1352)
29-
- `Divider.oudsHorizontalDivider(dividerColor:)` replaced by `Divider.horizontalDivider(dividerColor:)` (Orange-OpenSource/ouds-ios#1352)
30-
- `Divider.oudsVerticalDivider(color:)` replaced by `Divider.verticalDivider(color:)` (Orange-OpenSource/ouds-ios#1352)
11+
- View modifiers and methods prefixed by `ouds` are replaced by same names without such `ouds` (Orange-OpenSource/ouds-ios#1352)
3112

3213
## [1.3.0](https://github.com/Orange-OpenSource/ouds-ios/compare/1.2.0...1.3.0) - 2026-03-26
3314

MIGRATION.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
### Overview
1212

1313
Some public `View` extension methods prefixed with `ouds` have been renamed to remove the prefix, aligning with the naming style of typography helpers.
14-
The old methods are deprecated and will be removed in a future version.
15-
The internal `OUDSButtonStyle` struct has been renamed to `StyleForButton`.
14+
The old methods are deprecated and will be removed in a future major version.
1615

1716
### Before You Begin
1817

@@ -22,40 +21,42 @@ The internal `OUDSButtonStyle` struct has been renamed to `StyleForButton`.
2221

2322
### Deprecated API
2423

25-
#### 1. Renamed `View` extension methods (deprecated, not removed)
24+
#### Renamed `View` extension methods (deprecated, not removed)
2625

2726
The following `View` extension methods have been deprecated in favor of unprefixed versions.
2827
The old methods still compile with a deprecation warning.
2928

3029
**Impact**: Low
3130

32-
| Deprecated | Replacement |
33-
|---|---|
34-
| `.oudsForegroundStyle(_:)` | `.foregroundStyle(_:)` |
35-
| `.oudsForegroundColor(_:)` | `.foregroundColor(_:)` |
36-
| `.oudsBackground(_:)` | `.background(_:)` |
37-
| `.oudsAccentColor(_:)` | `.accentColor(_:)` |
38-
| `.oudsShadow(_:)` | `.shadow(_:)` |
39-
| `.oudsBorder(style:width:radius:color:)` | `.border(style:width:radius:color:)` |
40-
| `.oudsColoredSurface(_:)` | `.coloredSurface(_:)` |
41-
| `.oudsGridMargin(_:)` | `.gridMargin(_:)` |
42-
| `.oudsRequestAccessibleFocus(_:)` | `.requestAccessibleFocus(_:)` |
43-
| `.oudsRequestAccessibleFocus(_:for:)` | `.requestAccessibleFocus(_:for:)` |
44-
| `.oudsHorizontalDivider(dividerColor:)` | `.horizontalDivider(dividerColor:)` |
45-
| `.oudsVerticalDivider(color:)` | `.verticalDivider(color:)` |
31+
| Deprecated | Replacement |
32+
|----------------------------------------------|--------------------------------------|
33+
| `.oudsForegroundStyle(_:)` | `.foregroundStyle(_:)` |
34+
| `.oudsForegroundColor(_:)` | `.foregroundColor(_:)` |
35+
| `.oudsBackground(_:)` | `.background(_:)` |
36+
| `.oudsAccentColor(_:)` | `.accentColor(_:)` |
37+
| `.oudsShadow(_:)` | `.shadow(_:)` |
38+
| `.oudsBorder(style:width:radius:color:)` | `.border(style:width:radius:color:)` |
39+
| `.oudsColoredSurface(_:)` | `.coloredSurface(_:)` |
40+
| `.oudsGridMargin(_:)` | `.gridMargin(_:)` |
41+
| `.oudsRequestAccessibleFocus(_:)` | `.requestAccessibleFocus(_:)` |
42+
| `.oudsRequestAccessibleFocus(_:for:)` | `.requestAccessibleFocus(_:for:)` |
43+
| `.oudsHorizontalDivider(dividerColor:)` | `.horizontalDivider(dividerColor:)` |
44+
| `.oudsVerticalDivider(color:)` | `.verticalDivider(color:)` |
4645

4746
**Before (v1.3.x)**:
4847
```swift
4948
Text("Hello")
5049
.oudsForegroundColor(theme.colors.contentDefault)
5150
.oudsBackground(theme.colors.bgPrimary)
51+
// Etc.
5252

5353
SomeView()
5454
.oudsBorder(style: theme.borders.styleDefault,
5555
width: theme.borders.widthThin,
5656
radius: theme.borders.radiusMedium,
5757
color: theme.colors.borderDefault)
5858
.oudsShadow(theme.elevations.emphasized)
59+
// Etc.
5960
```
6061

6162
**After (v1.4.0)**:
@@ -77,9 +78,10 @@ SomeView()
7778

7879
**Reason for Change**: User feedback indicated the `ouds` prefix on methods was redundant and verbose given that parameter types are strongly typed OUDS tokens which prevent any ambiguity with native SwiftUI overloads.
7980

80-
#### 2. Rename of internal `OUDSButtonStyle` to `StyleForButton`
81+
### Compatibility
8182

82-
**Impact**: None (internal type, not exposed in the public API)
83+
- **Backward Compatibility**: No
84+
- **v1.4.0 Support**: Until release of next minor version
8385

8486
## v1.2.0 → v1.3.0
8587

@@ -139,6 +141,11 @@ var someIconForBulletList: OUDSBulletList.UnorderedAsset {
139141

140142
**Reason for Change**: "asset" word has a better meaning than "icon", and is aligned with Android OUDS library API
141143

144+
### Compatibility
145+
146+
- **Backward Compatibility**: No
147+
- **v1.2.0 Support**: Until release of next minor version
148+
142149
## v1.1.0 → v1.2.0
143150

144151
### Overview
@@ -201,6 +208,11 @@ OrangeCompactTheme()
201208

202209
**Reason for Change**: Use more accurate name for the theme
203210

211+
### Compatibility
212+
213+
- **Backward Compatibility**: No
214+
- **v1.1.0 Support**: Until release of next minor version
215+
204216
## v1.0.0 → v1.1.0
205217

206218
### Overview

OUDS/Core/Components/Sources/Controls/Checkbox/Internal/CheckboxIndicatorModifiers.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ private struct CheckboxIndicatorBorderModifier: ViewModifier {
200200
content
201201
.clipShape(RoundedRectangle(cornerRadius: appliedBorderRadius))
202202
.border(style: theme.borders.styleDefault,
203-
width: appliedBorderWidth,
204-
radius: appliedBorderRadius,
205-
color: appliedColor)
203+
width: appliedBorderWidth,
204+
radius: appliedBorderRadius,
205+
color: appliedColor)
206206
}
207207

208208
// MARK: - Colors

OUDS/Core/Components/Sources/Controls/Radio/Internal/RadioIndicatorModifiers.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ private struct RadioIndicatorBorderModifier: ViewModifier {
186186
func body(content: Content) -> some View {
187187
content
188188
.border(style: theme.borders.styleDefault,
189-
width: appliedBorderWidth,
190-
radius: appliedBorderRadius,
191-
color: appliedColor)
189+
width: appliedBorderWidth,
190+
radius: appliedBorderRadius,
191+
color: appliedColor)
192192
}
193193

194194
// MARK: - Colors

OUDS/Core/Components/Sources/Controls/TextInput/Internal/TextInputBorderModifier.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ struct TextInputBorderModifier: ViewModifier {
3535
} else {
3636
content
3737
.border(style: theme.borders.styleDefault,
38-
width: size,
39-
radius: cornerRadius,
40-
color: outlinedColor)
38+
width: size,
39+
radius: cornerRadius,
40+
color: outlinedColor)
4141
}
4242
} else {
4343
if status == .readOnly {
4444
content
4545
.border(style: theme.borders.styleDefault,
46-
width: theme.textInput.borderWidthDefault,
47-
radius: cornerRadius,
48-
color: theme.colors.borderMuted)
46+
width: theme.textInput.borderWidthDefault,
47+
radius: cornerRadius,
48+
color: theme.colors.borderMuted)
4949
} else {
5050
ZStack(alignment: .bottomLeading) {
5151
content

OUDS/Core/Components/Sources/Dialogs/Alert/Internal/AlertMessage/AlertMessageBorderModifier.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ struct AlertMessageBorderModifier: ViewModifier {
2727
func body(content: Content) -> some View {
2828
content
2929
.border(style: theme.borders.styleDefault,
30-
width: theme.alert.borderWidth,
31-
radius: radius,
32-
color: color)
30+
width: theme.alert.borderWidth,
31+
radius: radius,
32+
color: color)
3333
.clipShape(RoundedRectangle(cornerRadius: radius))
3434
}
3535

OUDS/Core/Components/Sources/_/Internal/ControlItem/ControlItemBordersModifier.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ struct ControlItemBordersModifier: ViewModifier {
3838
if layoutData.isOutlined, let borderColor {
3939
content
4040
.border(style: theme.borders.styleDefault,
41-
width: theme.borders.widthDefault,
42-
radius: radius,
43-
color: borderColor)
41+
width: theme.borders.widthDefault,
42+
radius: radius,
43+
color: borderColor)
4444
} else {
4545
if layoutData.hasDivider {
4646
// Divider must be inside

OUDS/Core/Components/Sources/_/ViewModifiers/BorderModifiers/View+Border.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extension View {
5353
///
5454
/// var body: some View {
5555
/// SomeView()
56-
/// .oudsBorder(
56+
/// .border(
5757
/// style: theme.borders.styleDefault,
5858
/// width: theme.borders.widthThin,
5959
/// radius: theme.borders.radiusNone,

0 commit comments

Comments
 (0)