Skip to content

Commit 949e49d

Browse files
committed
docs: improve documentation for newcomers (#982) (#1005)
Improve README with details about how to use the product. Improve DocC documentation for web builds to have things clearer. Closes #982 Closes #1005 Suggested-by: Thomas Martin <thomas2.martin@orange.com> Acked-by: Ludovic Pinel <ludovic.pinel@orange.com> Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
1 parent cf421f2 commit 949e49d

File tree

7 files changed

+78
-26
lines changed

7 files changed

+78
-26
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Changed
1515

1616
- Migration to Xcode 26.0 (Orange-OpenSource/ouds-ios#972)
17+
- Improve README for onboarding and newcomers (Orange-OpenSource/ouds-ios#1005)
18+
- Improve web documentation for onboarding and newcomers (Orange-OpenSource/ouds-ios#982)
1719
- Button component `hierarchy` property renamed to `appearance` (Orange-OpenSource/ouds-ios#969)
1820

1921
## [0.19.0](https://github.com/Orange-OpenSource/ouds-ios/compare/0.18.0...0.19.0) - 2025-09-24

OUDS/Core/OUDS/Sources/_OUDS.docc/GettingStarted.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ import OUDSThemesOrange // To use the default Orange theme
2929
import OUDSThemesOrangeInverse // To use the Orange Inverse theme
3030
import OUDSThemesOrangeBusinessTools // To use the Orange Business Tools theme
3131
import OUDSThemesSosh // To use the Sosh theme
32-
import OUDSThemeWireframe // To use the Wireframe theme
32+
import OUDSThemesWireframe // To use the Wireframe theme
3333
import OUDSTokensComponent // If you need to override or use directly components tokens
3434
import OUDSTokenSemantic // If you need to override or use directly semantic tokens
3535
import OUDSTokensRaw // If you need to override or use directly raw tokens
3636
```
3737

3838
### Chose your theme
3939

40-
The *Orange Unified Design System* framework provides several themes:
40+
The *Orange Unified Design System* framework provides today five themes:
4141

4242
Theme | Description
4343
------------------------- | -------------------------------------
@@ -90,4 +90,4 @@ Wireframe | For mockups, prototypes and prooves of concepts wito
9090
}
9191
}
9292

93-
> Tip: Keep in mind only one theme can be used within the `OUDSThemeableView`.
93+
> Tip: Keep in mind only one theme can be used within one `OUDSThemeableView`.

OUDS/Core/OUDS/Sources/_OUDS.docc/Themes.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,18 @@ OUDSThemeableView(theme: YourCustomTheme()) {
6666

6767
Some themes like `OrangeTheme`, `OrangeInverse` and `OrangeBusinessTools` can be tuned so as to be more flexible and adapt to some countries
6868
or affiliates constraints.
69-
However other themes like `SoshTheme` and `WireframeTheme` cannot be tuned
69+
However other themes like `SoshTheme` and `WireframeTheme` cannot be tuned.
70+
71+
> Note: Tuning represents the group of "flexibility points" allowed by the Orange Brand to tailor and customize themes for particular contexts.
7072
7173
### Tuned values
7274

7375
There are few elements which can be tuned. Some tunings have also been defined.
7476

75-
Tunable elements | Default values | Orange France | Orange Business | Max It |
76-
-------------------------------------- | -------------- | ------------- | --------------- | -------- |
77-
rounded corners for buttons | false | false | false | true |
78-
rounded corners for text inputs | false | false | true | true |
77+
Tunable elements | Default values | Orange France | Orange Business | Max It |
78+
-------------------------------------- | ----------------- | ---------------- | ------------------ | ----------- |
79+
rounded corners for buttons | false | false | false | true |
80+
rounded corners for text inputs | false | false | true | true |
7981

8082
### Tuning usages
8183

@@ -96,21 +98,6 @@ The tuning to apply must be done at theme init.
9698
let maxItTheme = OrangeTheme(tuning: Tuning.MaxIt)
9799
```
98100

99-
### "Max it" case
100-
101-
A predefined tuning configuration is also available for "Max it":
102-
103-
```swift
104-
let theme = OrangeTheme(tuning: Tuning.MaxIt)
105-
```
106-
107-
It applies the following settings:
108-
109-
Tunable elements | Default values
110-
------------------------------ | -------------------------------------
111-
rounded corners | true
112-
113-
114101
## Define a custom theme if needed
115102

116103
You will have to create a _Swift class_ which will inherit from `OrangeTheme` (if you need Orange brand assets) or `OUDSTheme`.

OUDS/Core/OUDS/Sources/_OUDS.docc/Tokens.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@PageImage(purpose: card, source: "ic_design_token_intro")
66
}
77

8-
Design tokens represent the small, repeated design decisions that make up a design system's visual style. Tokens wrap hard-coded static values, such as hexadecimal codes for color, with self-explanatory names.
8+
Design tokens represent the small, repeated design decisions that make up a design system's visual style. Tokens wrap hard-coded static values, such as hexadecimal codes for color, with self-explanatory names. They are used to define the look and feel and the style of everything. They are exposed through the themes and can be used as they are.
99

1010
## Component tokens
1111

OUDS/Core/OUDS/Sources/_OUDS.docc/_OUDS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Do not add @PageImage(purpose: card) because not managed for landing page of onl
1010
See https://github.com/swiftlang/swift-docc/issues/1283
1111
-->
1212

13-
The iOS library of *Orange Unified Design System*, the new design system unified and cohesive across all platforms to build Orange mobile applications for everyone everywhere.
13+
The Apple OS Swift Package of *Orange Unified Design System*, the new design system unified and cohesive across all platforms to build Orange mobile applications for everyone everywhere.
1414

1515
## Overview
1616

@@ -35,6 +35,8 @@ You can get details about the this design system in [the official website unifie
3535
3636
> Important: Orange Unified Design System framework focuses on iOS / iPadOS, other platforms like visionOS, watchOS, macOS and tvOS are not scoped yet.
3737
38+
> Tip: Feel free to submit pull requests if you can improve the support of macOS, visionOS, tvOS and watchOS!
39+
3840
## Topics
3941

4042
### Essentials

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,67 @@ The project is open source (except some assets) and topics like accessibility an
6161

6262
It replaces internal frameworks and also [ODS](https://github.com/Orange-OpenSource/ods-ios) as the only one design system for Orange group and affiliates.
6363

64+
> Important: It brings components and API for *SwiftUI*.
65+
66+
## Quick start
67+
68+
### Add the dependency
69+
70+
First, you must add as _package dependency_ of your _project_ the URL of this _Swift Package_ GitHub repository:
71+
72+
```text
73+
https://github.com/Orange-OpenSource/ouds-ios
74+
```
75+
76+
You can choose the _dependency rule_ you want. Keep in mind OUDS iOS releases are frozen and are based on semantic versioning.
77+
78+
### Add the librairies
79+
80+
In your Xcode _targets_, add the librairies you need. Everything is splitted so as to let users choose the content to embed they want.
81+
In most of cases, the `OUDS` library at least must be imported, it brings abstraction layer.
82+
Components are available with `OUDSComponents`. Themes are available through their librairies too (`OUDSThemeOrange`, `OUDSThemeSosh`, `OUDSThemeWireframe`, etc.).
83+
84+
You can have more details [in the wiki](https://github.com/Orange-OpenSource/ouds-ios/wiki/30-%E2%80%90-About-the-architecture#the-ouds-ios-swift-package).
85+
86+
### Instanciate and inject theme
87+
88+
In the root view of your app, add the `OUDSThemeableView` with inside the _theme_ object you want to apply.
89+
You can instanciate the theme object on the fly, but only once.
90+
91+
```swift
92+
import OUDS
93+
import SwiftUI
94+
95+
@main
96+
struct YourApp: App {
97+
98+
var body: some Scene {
99+
WindowGroup {
100+
OUDSThemeableView(theme: theTheme) { // theTheme can be: OrangeTheme(), SoshTheme(), WirefameTheme(), etc.
101+
AppRootView() // Add your app root view here
102+
}
103+
}
104+
}
105+
}
106+
```
107+
108+
Feel free to read the [online documentation](https://ios.unified-design-system.orange.com/documentation/ouds/gettingstarted).
109+
You can find also [more details about theme instanciations online](https://ios.unified-design-system.orange.com/documentation/ouds/themes).
110+
111+
### Get the theme
112+
113+
If you need to get configuration details from the theme (colors, dimensions, etc.), get the theme through _environment object_:
114+
115+
```swift
116+
@Environment(\.theme) var theme
117+
```
118+
119+
### Use the components
120+
121+
Import the `OUDSComponents` library and instanciate the component you need. All of them are described [in the online documentation (and grouped by categories)](https://ios.unified-design-system.orange.com/documentation/oudscomponents).
122+
123+
The wiki lists also [the components and their availability](https://github.com/Orange-OpenSource/ouds-ios/wiki/01-%E2%80%90-Available-API).
124+
64125
## Content
65126

66127
> [!NOTE]

docs_release/generateWebDocumentation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ fi
231231
# Landing page of generated documentation is broken, real content is in /documentation
232232
# Override this page and force by code redirection
233233
# See Orange-OpenSource/ouds-ios#636
234-
echo '<!doctype html><html><head><meta http-equiv="refresh" content="0; URL= https://ios.unified-design-system.orange.com/documentation/"></head><body>Redirecting to https://ios.unified-design-system.orange.com/documentation/</body></html>' > "$DOCUMENTATION_HTML_LOCATION/index.html"
234+
echo '<!doctype html><html><head><meta http-equiv="refresh" content="0; URL= https://ios.unified-design-system.orange.com/documentation/ouds"></head><body>Redirecting to https://ios.unified-design-system.orange.com/documentation/ouds</body></html>' > "$DOCUMENTATION_HTML_LOCATION/index.html"
235235

236236
# Step 5 - Checkout to service pages dedicated branch (if relevant)
237237
# ------------------------------------------------------------------

0 commit comments

Comments
 (0)