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
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,31 @@ Looking to contribute something to OUDS Android? **Here's how you can help.**
4
4
5
5
Please take a moment to review this document in order to make the contribution process easy for everyone involved.
6
6
7
-
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this Open Source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
7
+
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this Open Source project. In return, they
8
+
should reciprocate that respect in addressing your issue or assessing patches and features.
8
9
9
10
## Using the Issue Tracker
10
11
11
-
The [issue tracker](https://github.com/Orange-OpenSource/ouds-android/issues) is the preferred channel for [bug reports](#bug-reports), [feature requests](#feature-requests) and [submitting pull requests](#pull-requests), but please respect the following restrictions:
12
+
The [issue tracker](https://github.com/Orange-OpenSource/ouds-android/issues) is the preferred channel
13
+
for [bug reports](#bug-reports), [feature requests](#feature-requests) and [submitting pull requests](#pull-requests), but please respect the following
14
+
restrictions:
12
15
13
-
- Please **do not** use the issue tracker for personal support requests. [GitHub Discussions](https://github.com/Orange-OpenSource/ouds-android/discussions/categories/q-a) or our internal Orange communication tools are better places to get help.
16
+
- Please **do not** use the issue tracker for personal support
17
+
requests. [GitHub Discussions](https://github.com/Orange-OpenSource/ouds-android/discussions/categories/q-a) or our internal Orange communication tools are
18
+
better places to get help.
14
19
15
20
- Please **do not** derail or troll issues. Keep the discussion on topic and respect the opinions of others.
16
21
17
-
- Please **do not** post comments consisting solely of "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) instead. We reserve the right to delete comments which violate this rule.
22
+
- Please **do not** post comments consisting solely of "+1" or ":thumbsup:".
23
+
Use [GitHub's "reactions" feature](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) instead. We reserve the right to
24
+
delete comments which violate this rule.
18
25
19
26
## Issues and Labels
20
27
21
28
Our bug tracker utilizes several labels to help organize and identify issues. Here's what they represent and how we use them:
22
29
23
-
-`feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g., `v1.0.0` to `v1.1.0`).
30
+
-`feature` - Issues asking for a new feature to be added, or an existing one to be extended or modified. New features require a minor version bump (e.g.,
31
+
`v1.0.0` to `v1.1.0`).
24
32
-`help wanted` - Issues we need or would love help from the community to resolve.
25
33
26
34
For a complete look at our labels, see the [project labels page](https://github.com/Orange-OpenSource/ouds-android/labels).
@@ -37,7 +45,9 @@ Guidelines for bug reports:
37
45
38
46
3.**Isolate the problem**— ideally create a reduced reproducible test case.
39
47
40
-
A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What device(s) and OS experience the problem? Do other devices show the bug differently? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
48
+
A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your
49
+
environment? What steps will reproduce the issue? What device(s) and OS experience the problem? Do other devices show the bug differently? What would you expect
50
+
to be the outcome? All these details will help people to fix any potential bugs.
41
51
42
52
Example:
43
53
@@ -59,15 +69,19 @@ Example:
59
69
60
70
## Feature Requests
61
71
62
-
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
72
+
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong
73
+
case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
63
74
64
75
## Pull requests
65
76
66
77
Good pull requests—patches, improvements, new features—are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
67
78
68
-
**Please ask first** before embarking on any **significant** pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. For trivial things, or things that don't require a lot of your time, you can go ahead and make a PR.
79
+
**Please ask first** before embarking on any **significant** pull request (e.g., implementing features, refactoring code, porting to a different language),
80
+
otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project. For trivial things, or
81
+
things that don't require a lot of your time, you can go ahead and make a PR.
69
82
70
-
Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such as test coverage).
83
+
Please adhere to the [coding guidelines](#code-guidelines) used throughout the project (indentation, accurate comments, etc.) and any other requirements (such
84
+
as test coverage).
71
85
72
86
Adhering to the following process is the best way to get your work included in the project:
73
87
@@ -95,7 +109,8 @@ Adhering to the following process is the best way to get your work included in t
95
109
git checkout -b <topic-branch-name>
96
110
```
97
111
98
-
4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/about-git-rebase/) feature to tidy up your commits before making them public.
112
+
4. Commit your changes in logical chunks. Use Git's [interactive rebase](https://help.github.com/articles/about-git-rebase/) feature to tidy up your commits
113
+
before making them public.
99
114
100
115
5. Locally merge (or rebase) the upstream development branch into your topic branch:
Contains the main elements of the OUDS Android library.
3
+
The **OUDS Core** module provides the essential implementation of OUDS Android library. It acts as a semantic wrapper around Material Design 3, ensuring that all UI
4
+
elements strictly adhere to the brand's visual guidelines without requiring manual configuration from the developer.
4
5
5
-
#### Component versions
6
+
This module is divided into two main pillars:
7
+
8
+
1. The **OUDS Theme**: Foundation of colors, typography, sizes, etc.
9
+
2. The **OUDS Components**: Ready-to-use UI elements (Buttons, Chips, Navigation Bar, etc.).
10
+
11
+
## OUDS Theme
12
+
13
+
**Package:** `com.orange.ouds.core.theme`
14
+
15
+
The `OudsTheme` composable is the entry point of OUDS Android. It automatically applies the correct color palette (Light or Dark) to the
16
+
entire application hierarchy and provides OUDS tokens values.
17
+
18
+
### Applying the theme
19
+
20
+
Wrap your application's root composable or any specific screen with OudsTheme. It internally handles the switch between Light and Dark modes based on the system
21
+
settings.
22
+
23
+
```kotlin
24
+
import com.orange.ouds.core.theme.OudsTheme
25
+
26
+
setContent {
27
+
OudsTheme {
28
+
// Your app content goes here
29
+
}
30
+
}
31
+
```
32
+
33
+
### Accessing theme attributes
34
+
35
+
The module exposes a singleton object `OudsTheme` (similar to `MaterialTheme`) to access design tokens within your composables. This object provides direct
36
+
access to all semantic design tokens (colors, typography, borders, etc.) defined in the system, allowing you to build custom UIs that remain consistent with
37
+
the global brand style.
38
+
39
+
**IMPORTANT: You should always use these semantic values instead of hardcoded values.**
40
+
41
+
#### Borders
42
+
43
+
Access border width, radius and style tokens via `OudsTheme.borders`.
44
+
45
+
```kotlin
46
+
Box(
47
+
modifier = Modifier.border(
48
+
width = OudsTheme.borders.width.medium,
49
+
color = OudsTheme.colorScheme.border.default
50
+
)
51
+
)
52
+
```
53
+
54
+
#### Colors
55
+
56
+
Access the semantic color palette via `OudsTheme.colorScheme`. This ensures your UI adapts automatically to Light or Dark mode.
57
+
58
+
```kotlin
59
+
Text(
60
+
text = "Hello World",
61
+
color = OudsTheme.colorScheme.content.default, // Semantic color
62
+
style = OudsTheme.typography.body.strong.large
63
+
)
64
+
```
65
+
66
+
#### Elevations
67
+
68
+
Access elevation tokens via `OudsTheme.elevations`. These values represent the depth of an element on the z-axis (shadows) and follow Material Design elevation principles.
69
+
70
+
```kotlin
71
+
Surface(
72
+
shadowElevation = OudsTheme.elevations.default
73
+
) {
74
+
// Content
75
+
}
76
+
```
77
+
78
+
#### Grids
79
+
80
+
Access layout grid definitions (column gaps, margins, min and max widths) based on the window size via `OudsTheme.grids`.
Access the brand's typography styles via `OudsTheme.typography`.
127
+
128
+
```kotlin
129
+
Text(
130
+
text = "Headline",
131
+
style = OudsTheme.typography.heading.large
132
+
)
133
+
```
134
+
135
+
### Overriding theme modes
136
+
137
+
Sometimes you may need to display a specific part of your screen in a different mode than the rest of the application (e.g., a dark section inside a light
138
+
screen). The module provides the `OudsThemeTweak` composable for this purpose.
139
+
140
+
It allows you to **invert the current mode** or **force a specific mode** (Light or Dark) for its content.
141
+
142
+
```kotlin
143
+
// Example: Force a specific section to be in Dark Mode
// Example: Invert the current mode (Light -> Dark, Dark -> Light)
151
+
OudsThemeTweak(tweak = OudsTheme.Tweak.Invert) {
152
+
// Content with inverted theme
153
+
}
154
+
```
155
+
156
+
## OUDS Components
157
+
158
+
**Package:** `com.orange.ouds.core.component`
159
+
160
+
The Core module exposes a set of Jetpack Compose components prefixed with `Ouds` (e.g., `OudsButton`, `OudsNavigationBar`). These components serve as the
161
+
building blocks for your application's UI.
162
+
163
+
### Implementation strategy
164
+
165
+
The library adopts an hybrid approach to component implementation to best serve the design system:
166
+
167
+
1. **Direct Wrappers:** When the Material Design 3 specification aligns with OUDS, we wrap the standard Material 3 composables and configure them with
168
+
OUDS-specific
169
+
default values (tokens for colors, shapes, typography) to ensure brand consistency without reinventing the wheel.
170
+
2. **Custom Implementations:** When a specific OUDS component diverges significantly from the standard Material 3 behavior or layout, we provide a full custom
171
+
implementation. This ensures that unique design requirements are met pixel-perfectly, rather than forcing a standard component to behave in a way it wasn't
172
+
designed for.
173
+
174
+
Regardless of the implementation strategy, the API remains consistent and easy to use for the developer.
175
+
176
+
### Philosophy
177
+
178
+
- **Zero Configuration:** You do not need to pass design parameters like color or shape for standard states. The component knows how to render itself in
179
+
Enabled, Disabled, Selected, Hovered or Focused states.
180
+
- **Controlled Flexibility:** Components use structured parameters (specific classes or data objects) instead of open composable slots. This ensures that
181
+
while you can customize content like text or icons, the structural integrity and visual consistency of the Orange Unified Design System are always preserved.
182
+
- **Modifier Support:** Following Jetpack Compose best practices, every OUDS component exposes a modifier parameter. This allows you to easily customize layout
183
+
behavior (padding, positioning, semantics) externally without modifying the component's internal logic.
184
+
185
+
### Example: Navigation Bar
186
+
187
+
The `OudsNavigationBar` manages the bottom navigation. It works in tandem with `OudsNavigationBarItem`.
1. **Do not mix Material 3 components directly with OUDS components** if an OUDS equivalent exists. Using the native components might result in incorrect colors
232
+
or spacing that violates the brand guidelines.
233
+
2. **Use `OudsTheme` tokens** for custom layouts. If you need to build a custom card or row, use OudsTheme.colorScheme instead of Color.Black or Color.White to
234
+
ensure Dark mode compatibility.
235
+
3. **Window Insets:** The library is designed to work edge-to-edge. Components like OudsNavigationBar can be transparent to allow content to blur behind them (if supported),
236
+
but they require proper handling of WindowInsets in your layouts.
237
+
13
238
# Package com.orange.ouds.core.component
14
239
15
-
Contains all OUDS basic components: OudsButton, OudsLink,...
240
+
This package contains the catalog of ready-to-use UI components (like OudsButton, OudsNavigationBar) that implement the design system specifications using
241
+
Jetpack Compose.
242
+
243
+
# Package com.orange.ouds.core.component.common
244
+
245
+
This package holds shared elements that are reused across multiple higher-level OUDS components to ensure consistent behavior and reduce code duplication.
246
+
247
+
# Package com.orange.ouds.core.extensions
248
+
249
+
This package contains Kotlin extension functions, providing shorthand utilities to streamline development within the OUDS ecosystem.
16
250
17
251
# Package com.orange.ouds.core.theme
18
252
19
-
Contains the `OudsTheme` composable that can be used in your app to apply a chosen theme. The other files are used to build the theme and don't have to be used
20
-
directly but only through the `OudsTheme`.
253
+
This package contains the logic for the OudsTheme composable, including the OudsThemeTweak mechanism and the implementation of the theme contract that injects
254
+
visual data into the application.
255
+
256
+
# Package com.orange.ouds.core.utilities
257
+
258
+
This package provides internal helper classes and extensions used across the core module to support component logic and layout management.
0 commit comments