You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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#982Closes#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>
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.
Copy file name to clipboardExpand all lines: OUDS/Core/OUDS/Sources/_OUDS.docc/_OUDS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Do not add @PageImage(purpose: card) because not managed for landing page of onl
10
10
See https://github.com/swiftlang/swift-docc/issues/1283
11
11
-->
12
12
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 Packahe of *Orange Unified Design System*, the new design system unified and cohesive across all platforms to build Orange mobile applications for everyone everywhere.
14
14
15
15
## Overview
16
16
@@ -35,6 +35,8 @@ You can get details about the this design system in [the official website unifie
35
35
36
36
> Important: Orange Unified Design System framework focuses on iOS / iPadOS, other platforms like visionOS, watchOS, macOS and tvOS are not scoped yet.
37
37
38
+
> Tip: Feel free to submit pull requests if you can improve the support of macOS, visionOS, tvOS and watchOS!
Copy file name to clipboardExpand all lines: README.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,61 @@ The project is open source (except some assets) and topics like accessibility an
61
61
62
62
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.
63
63
64
+
## Quick start
65
+
66
+
### Add the dependency
67
+
68
+
First, you must add as _package dependency_ of your _project_ the URL of the Swift Package GitHub repository:
69
+
70
+
```text
71
+
https://github.com/Orange-OpenSource/ouds-ios
72
+
```
73
+
74
+
You can choose the _dependency rule_ you want. Keep in mind OUDS iOS releases are frozen and are based on semantic versioning.
75
+
76
+
### Add the librairies
77
+
78
+
In your Xcode _targets_, add the librairies you need. Everything is splitted so as to let users choose the content to embed they want.
79
+
In most of cases, the `OUDS` library at least must be imported, it brings abstraction layer.
80
+
Components are available with `OUDSComponents`. Themes are available through their librairies toos (`OUDSThemeOrange`, `OUDSThemeSosh`, `OUDSThemeWireframe`, etc.).
81
+
82
+
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).
83
+
84
+
### Instanciate and inject theme
85
+
86
+
In the root view of your app, add the `OUDSThemeableView` with inside the _theme_ object you want to apply.
87
+
88
+
```swift
89
+
importOUDS
90
+
importSwiftUI
91
+
92
+
@main
93
+
structDesignToolbox: App {
94
+
95
+
var body: some Scene {
96
+
WindowGroup {
97
+
OUDSThemeableView(theme: theTheme) { // theTheme can be OrangeTheme, SoshTheme, WirefameTheme, etc.
98
+
AppRootView() // Add your app root view here
99
+
}
100
+
}
101
+
}
102
+
}
103
+
```
104
+
105
+
Feel free to read the [online documentation](https://ios.unified-design-system.orange.com/documentation/ouds/gettingstarted).
106
+
107
+
### Get the theme
108
+
109
+
If you need to get configuration details from the theme (colors, dimensions, etc.), get the theme through environment object:
110
+
111
+
```swift
112
+
@Environment(\.theme) var theme
113
+
```
114
+
115
+
### Use the components
116
+
117
+
Import the `OUDSComponents` library and isntanciate 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).
0 commit comments