Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
43eb1d9
chore: prepare next version 0.4.0 (#210)
Tayebsed93 Jun 11, 2025
8abd8b7
feat(🤖): add chip component (tokens library v0.11.0) (#215)
boosted-bot Jun 12, 2025
2a2cb4b
chore(deps): update dependency: bump dartdoc to 8.3.4 (#197)
dependabot[bot] Jun 16, 2025
61c89ba
chore(deps): update dependency: bump flutter_lints to 6.0.0 (#198)
dependabot[bot] Jun 16, 2025
fbae638
fix(divider) : display color options in consistent order (#216)(#217)
Tayebsed93 Jun 17, 2025
01cb2b1
Token grid and space values now adapt based on device type (#218)(#222)
Tayebsed93 Jun 19, 2025
94ec92c
chore : demo app update cards backgrounds token (#204)(#226)
Tayebsed93 Jun 23, 2025
2eb00da
chore : add token version in about page and documentation (#142)(#227)
Tayebsed93 Jun 23, 2025
9b7d37c
chore(deps): update dependency: bump flutter_svg to 2.2.0 (#221)
dependabot[bot] Jun 24, 2025
2eb7ac1
fix: delayed pressed state (#220)(#230)
Tayebsed93 Jun 24, 2025
de00dbf
chore: update tokens 1.1.0 (#225)
boosted-bot Jun 26, 2025
7bda19b
feat: add themeboxcolored for lightDark mode (#223)(#233)
AhmedAmineZr Jun 26, 2025
1970142
feat(🤖): add badge component (tokens library v0.11.0) (#238)
boosted-bot Jun 27, 2025
2dd020c
feat(🤖): add tag component (tokens library v1.1.0) (#241)
boosted-bot Jun 27, 2025
0bf8e82
feat(🤖): add tag component (tokens library v1.2.0) (#236)
boosted-bot Jul 1, 2025
a274256
feat: create component `switch` (#196)(#49)
AhmedAmineZr Jul 9, 2025
d1c3b48
feat: create component `badge` (#243)(#88)
AhmedAmineZr Jul 10, 2025
38ce640
feat: create component `chip suggestion/filter` (#242)(#213)
nouha06 Jul 10, 2025
fd6dee0
fix: add assets component used in `notice.txt` (#250) (#244)
AhmedAmineZr Jul 10, 2025
5841cb7
chore : prepare next version 0.5.0 (#260)
Tayebsed93 Jul 11, 2025
c273443
feat: Integration of Sosh theme (#262)(#265)
Tayebsed93 Jul 15, 2025
4d3b950
chore: add Sosh theme (#267)
boosted-bot Jul 18, 2025
65478e5
chore: replace flutter icon launch app for design toolbox (#268)(#269)
Tayebsed93 Jul 23, 2025
aca3c3a
feat: create `border` tokens (#248)(#266)
AhmedAmineZr Jul 23, 2025
2c87ea6
chore(🤖): update of tokens (library version 1.3.0) (#281)
boosted-bot Jul 25, 2025
f3a0ab6
chore(🤖): add theme component tokens (library version 1.3.0) (#285)
boosted-bot Jul 28, 2025
3d45e52
feat: replace `components illustrations` by the `components themselve…
AhmedAmineZr Jul 29, 2025
1c8a94a
chore : include design component version in design toolbox app (#240)…
Tayebsed93 Jul 29, 2025
4475894
fix: change `Bottom sheet collapsed` by default (#263) (#286)
AhmedAmineZr Jul 30, 2025
b997e2e
bug: wrong role for checkbox a11y and error status not returned (#261…
Tayebsed93 Jul 31, 2025
94c5998
chore(🤖): update of tokens (library version 1.5.0) (#293)(#290)
boosted-bot Aug 1, 2025
ee2408a
chore(🤖): update of tokens (library version 1.5.0) (#52)(#296)
boosted-bot Aug 4, 2025
d2a5dd9
Fix: refactor classes name for Button and Chip components (#302)
nouha06 Aug 8, 2025
1e72d8c
fix: Flutter Web build fails due to Platform usage in theme (#300) (#…
AhmedAmineZr Aug 8, 2025
445a30e
feat: refactor with custom configuration Rounded `Button`, `Tag` and …
AhmedAmineZr Aug 11, 2025
a7caac9
feat : create component tags (#287)(#52)
nouha06 Aug 12, 2025
0b68171
fix the background color of tag input when status is 'Disabled' (#311…
nouha06 Aug 12, 2025
1ac83c7
feat(button) : update component button 3.0 (#279)(#294)
AhmedAmineZr Aug 13, 2025
d0f270f
chore(deps): update dependency: bump package_info_plus (#315)
dependabot[bot] Aug 13, 2025
f85846e
feat(🤖): add pin code input component (tokens library v1.5.0) (#314)
boosted-bot Aug 13, 2025
48ee93a
fix(deps): update kotlin to v2.0.0 (#303)(#305)
nouha06 Aug 13, 2025
9d65e03
feat(button): change apis by replacing the style parameter by a loadi…
AhmedAmineZr Aug 13, 2025
8893940
feat(textInput) : create component `text input` (#50)(#289)
Tayebsed93 Aug 14, 2025
7f34581
chore : prepare next version 0.6.0 (#320)
AhmedAmineZr Aug 14, 2025
e4f0eb9
feat: update to macos-15 to resolve build failed ios (#344)(#345)
AhmedAmineZr Sep 1, 2025
7cca162
bug : wrong title for suggestion chip screen (#340)(#331)
nouha06 Sep 1, 2025
7830196
bug : tag layout consistency (#324) (#339)
nouha06 Sep 3, 2025
3928e6b
chore: update tokens 1.5.0 (#357)
boosted-bot Sep 18, 2025
9894ad7
bug : Token 1.3 update missing (#336) (#363)
nouha06 Sep 18, 2025
9b51203
bug : move dartdoc to dev_dependencies in core (#372) (#350)
nouha06 Sep 19, 2025
e7ef5c4
bug : Tag with bullet/icon has incorrect name (#366) (#377)
nouha06 Sep 25, 2025
efb1ce7
chore: update tokens (#390)
boosted-bot Sep 26, 2025
c037415
chore(deps): update dependency: bump flutter_svg to 2.2.1 (#348)
dependabot[bot] Sep 29, 2025
de9560d
fix : add missing indeterminate status of checkbox for accessibility …
nouha06 Oct 3, 2025
b3dcebd
fix: Label text overflow `Text Input` (#333) (#343)
nouha06 Oct 8, 2025
73c3b85
feat : add orange favicon in doc (#371) (#374)
nouha06 Oct 8, 2025
5cfed65
bug : switch error status not read by talkback and voice over #365 (#…
nouha06 Oct 9, 2025
9896294
chore: handle nodoc insertion in flutter gen-l10n output (#413)
nouha06 Oct 9, 2025
b2941d5
bug : android high contrast for checkbox and radio button #327 (#382)
nouha06 Oct 13, 2025
9df8ce8
chore: update tokens 1.7.0 (#422)
boosted-bot Oct 15, 2025
cc44304
feat: update divider to be hidden by default in control item (#411) (…
AhmedAmineZr Oct 23, 2025
d5f395e
bug: Button loading state should set the disabled state 386 (#428)
nouha06 Oct 27, 2025
2608c0d
bug: a11y badge text enlargement is not applied to icon 368 (#426)
nouha06 Oct 27, 2025
7e40a36
chore: update tokens 1.8.0 (#432)(#436)
boosted-bot Oct 27, 2025
2302584
fix: chip wrong accessible name and missing role (#375) (#378)
nouha06 Oct 28, 2025
1b74f9b
fix: Radio button not correctly read by screen-readers #362 (#424)
nouha06 Oct 28, 2025
57acd77
fix: Wrong accessible name for button text+icon #387 (#429)
nouha06 Oct 28, 2025
2ca9d9b
fix : a11y badge with icon or standard has no accessible name (#385) …
nouha06 Oct 28, 2025
f49e935
fix: Chip Hint is wrong on Android and missing on iOS (#393) (#443)
nouha06 Oct 28, 2025
ea1020c
chore: add data privacy disclaimer in README and documentation (#410)…
nouha06 Oct 28, 2025
f0f4100
chore : new token color missing (#435)(#446)
Tayebsed93 Oct 28, 2025
e5d7bd4
fix: remove the useless focus on switch in control item (#364) (#438)
nouha06 Oct 28, 2025
ed7d5f9
fix: add missing hint on checkbox component (#391) (#442)
nouha06 Oct 28, 2025
bc2d4b3
fix: wrong accessible name for control item with decorative icon (#39…
nouha06 Oct 28, 2025
d0d2f23
fix: Android native tab bar displayed above custom bottom sheet (#358…
nouha06 Oct 31, 2025
ab45ea7
feat : create component link (#46) (#405)
nouha06 Oct 31, 2025
70b0f77
fix: Text input Incorrect reading order and trailing action (#449) (…
nouha06 Nov 5, 2025
8e1a4d2
feat: create component PIN code input (#308) (#307)
nouha06 Nov 5, 2025
c6b0813
chore(deps): update dependency: bump flutter_svg to 2.2.2 (#453)
dependabot[bot] Nov 6, 2025
711b276
feat : component password input (#397)(#398)
Tayebsed93 Nov 6, 2025
f5c09b4
feat(tag): update tag component v1.4 (#421)(#452)
nouha06 Nov 6, 2025
c676767
chore(deps): update dependency: bump com.android.tools.build:gradle (…
dependabot[bot] Nov 11, 2025
9835737
Revert "chore(deps): update dependency: bump com.android.tools.build:…
nouha06 Nov 11, 2025
18cd6f9
chore: update tokens 1.9.0 ( #461)(#462)(#478)
boosted-bot Nov 13, 2025
6fde93c
chore: add solaris icons by themes (#245)(#480)
Tayebsed93 Nov 17, 2025
c268c21
bug: border token of 0 should not show any border (#328) (#472)
nouha06 Nov 18, 2025
a6dedfa
feat: Update of `button` version v3.1 (#396) (#460)
nouha06 Nov 18, 2025
f7fad51
fix: add helper link for text input (#334) (#459)
nouha06 Nov 19, 2025
64ac37d
chore: update badge component v1.2 (#423) (#454)
nouha06 Nov 19, 2025
dbab2c2
chore: update tokens 1.9.0 (#464) (#90) (#91) (#493)
boosted-bot Nov 20, 2025
21e658f
fix: a11y text input incorrect reading order (#491)(#449)
AhmedAmineZr Nov 25, 2025
a9a31fd
chore(deps): update dependency: bump flutter_svg to 2.2.3 (#502)
dependabot[bot] Nov 26, 2025
d5e1f4a
chore(deps): update dependency: bump get to 4.7.3 (#505)
dependabot[bot] Nov 26, 2025
1d7ea15
feat(checkbox,radio-button,switch): update design (#490)
Tayebsed93 Dec 1, 2025
9923af0
chore: prepare new version 0.7.0 (#507)
AhmedAmineZr Dec 1, 2025
c78644a
chore(🤖): Integration of System library v2.3.0, component changelog v…
boosted-bot Dec 2, 2025
04b269e
chore: update homepage documentation (#135) (#239) (#489)
nouha06 Dec 2, 2025
fff5491
chore: Update solaris icons v1.4 (#515) (#520)
AhmedAmineZr Dec 4, 2025
4456ea6
feat: Add key ITSAppUsesNonExemptEncryption (#526)(#527)
AhmedAmineZr Dec 11, 2025
512b354
feat: Update keys, english label and Arabic translations (#518) (#524)
nouha06 Dec 11, 2025
1cbb513
feat(🤖): update `navigation bar` version (tokens library v1.9.0) (#531)
boosted-bot Dec 11, 2025
da86028
feat : Manage the new medium (moderate) font weight in demo app (#403…
nouha06 Dec 12, 2025
a4ae393
fix: input text helper link and accessibility (#334) (#525)
nouha06 Dec 16, 2025
d1e8b0c
feat: Create component - phone number input (#326)(#497)(#498)(#338)
AhmedAmineZr Dec 16, 2025
6774aa5
chore : update doc dsm links (#528) (#532)
nouha06 Dec 16, 2025
a835655
feat(checkbox-item,radio-button-item,switch-item,text-input,pincode-i…
AhmedAmineZr Dec 19, 2025
5c99256
chore: prepare version 1.0.0 (#541)
AhmedAmineZr Dec 19, 2025
efc56d8
fix: Child Element Not Rendered Properly in `Badge` (#577)(#558)
AhmedAmineZr Jan 20, 2026
bc31956
feat: Use the `tag` to show the Component Design Version (#551) (#501)
nouha06 Jan 20, 2026
2d489f9
fix : Add a semantic hint for inputs component and fix the placeholde…
nouha06 Jan 27, 2026
2f4e26a
fix: Removed `dart:io` Platform usage that caused UnsupportedError on…
nouha06 Jan 30, 2026
8a104cc
fix : Button, Chip, Link, Tag components have text overflow (#552)(…
nouha06 Feb 5, 2026
516d942
feat: update `Flutter` and `Dart` SDK (#572)(#573)
AhmedAmineZr Feb 11, 2026
65be14b
fix: Resolve `gradle` version 8.9.1 (#572)(#576)
AhmedAmineZr Feb 11, 2026
9bac97c
feat: create component `navigation bar (#464)(#90)(#384)(#557)(#523)
AhmedAmineZr Feb 18, 2026
a7a6360
feat: let `Button` takes the screen full width (#577)(#473)(#578)
AhmedAmineZr Feb 19, 2026
53005c8
fix: Missing Colors tokens in the token presentation pages (#554)(#586)
AhmedAmineZr Feb 25, 2026
d67d45b
fix: notnull check in different components (#587)(#588)
AhmedAmineZr Feb 26, 2026
810d94a
feat: force theme `tweak theme` to use it into current theme (#583)(#…
AhmedAmineZr Feb 27, 2026
629656e
chore(🤖): update tokens 1.9.0 `Orange Compact theme (#591)
boosted-bot Mar 3, 2026
9191140
chore (🤖): update tokens 1.9.0 `Input tag tokens` (#594)
boosted-bot Mar 3, 2026
fee6960
feat: add Helvetica Neue font for `Orange` theme & `OrangeCompact` th…
nouha06 Mar 6, 2026
4f50911
chore: prepare version 1.1.0 (#604)
AhmedAmineZr Mar 6, 2026
0989c22
chore: prepare version 1.1.1 (#605)
AhmedAmineZr Mar 6, 2026
10ce1dd
fix: Add deprecated.optional to OrangeTheme and OrangeThemeCompact (#…
nouha06 Mar 17, 2026
7030535
fix: resolve multiline regression after focus update (#619)(#611)
nouha06 Mar 17, 2026
26aedee
fix: prepare new version 1.1.2 (#620)
AhmedAmineZr Mar 17, 2026
3a63a6b
chore: prepare release 1.2.0 alpha (#603)(#631)
AhmedAmineZr Mar 24, 2026
4aee166
chore: Update uses icons of status in badge and tag (#597)(#626)
nouha06 Apr 1, 2026
ef62261
fix: add missing accessibility label and fix the hint label (#522)(#514)
nouha06 Apr 7, 2026
3a3dcb3
chore: Remove OudsTagConfig and add rounded corner into Tag component…
nouha06 Apr 8, 2026
34807af
feat: Manage Helvetica Neue Arabic font (#404)(#635)
nouha06 Apr 9, 2026
57f46c0
Add french language and Update components definitions in the library …
nouha06 Apr 9, 2026
538c1f8
fix: remove unused `cupertino_icons` dependency in demo app (#646)(#652)
nouha06 Apr 13, 2026
193822b
feat(app): Improve theme selections and tuning (#356)(#650)
nouha06 Apr 13, 2026
fc9d79b
feat: downgrade to flutter sdk 3.35 and update repository files (#656…
AhmedAmineZr Apr 17, 2026
04f27e7
feat: Add in README `OpenSSF scorecard` (#632)(#658)
AhmedAmineZr Apr 17, 2026
f81325a
feat : create component top app bar (#91)(#534)
nouha06 Apr 17, 2026
733c3af
feat: Improve OSSF score (#659)(#660)
AhmedAmineZr Apr 17, 2026
43aa2b1
fix: dartdoc workflow (#662)(#663)
AhmedAmineZr Apr 17, 2026
c3b2838
chore: update files to improve score (#664)(#665)
AhmedAmineZr Apr 17, 2026
05104d7
chore: Improve gitHub workflow (#666)(#667)
AhmedAmineZr Apr 20, 2026
f7c830c
feat(version): prepare new version 1.2.0 (#673)
AhmedAmineZr Apr 21, 2026
db55683
docs: improve internal files to make same cleaner, updated and more a…
pylapp Apr 25, 2026
22f981b
chore: prepare version 1.3.0 (#679)
AhmedAmineZr Apr 28, 2026
93cee2e
feat(🤖): add `Alert` component (tokens library 1.9.0)
boosted-bot Apr 28, 2026
4cf1d19
feat🤖): Add `Icon` and `BulletList` component
boosted-bot Apr 29, 2026
d939c2a
fix: Ensure suggestion chips trigger actions on click (#723)(#724)
nouha06 May 6, 2026
84a3874
fix: Correct display issues in `orange compact` components and access…
nouha06 May 8, 2026
7c73f0a
feat: create component alert message - inline alert (#670)(#696)
nouha06 May 8, 2026
a622a67
feat: create BottomSheet component (#671)(#705)
AhmedAmineZr May 8, 2026
22d7c13
fix(pinCodeInput): delete previous digit instantly on backspace (#735…
theamiri May 8, 2026
b7b8dc6
feat(pinCodeInput): add optional keyboardType (numeric/alphanumeric) …
theamiri May 8, 2026
19b3018
chore(version): prepare new version 1.3.0 (#742)
AhmedAmineZr May 11, 2026
f31856e
chore(version): prepare fix version 1.3.1 (#755)
AhmedAmineZr May 13, 2026
3313808
chore: resolve null check of a11y highcontrast (#756)(#759)
AhmedAmineZr May 13, 2026
f810d2f
chore: update workflow doc github (#758)(#760)
AhmedAmineZr May 14, 2026
d796835
fix: resolve zoom a11Y for token version display (#748)(#763)
AhmedAmineZr May 14, 2026
d957389
fix: `pin code input` properly distribute pasted content across digit…
theamiri May 14, 2026
015a16b
chore: prepare new fix version 1.3.1 (#764)
AhmedAmineZr May 14, 2026
7061bca
chore(version): prepare new version 2.0.0 (#772)
AhmedAmineZr Jun 19, 2026
88a97a4
Merge branch 'main' into sync-devlop-main-2.0.0
AhmedAmineZr Jun 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .claude/skills
270 changes: 270 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
# OUDS Flutter - GitHub Copilot Instructions

This file provides guidance to GitHub Copilot when working on this repository.
It covers contributor and maintainer guidelines: code formatting, architecture, build process, best practices, accessibility, development requirements, build commands and review guidelines.

## Skills

Load the appropriate skill before acting on the related task:

| Task | Skill to load |
|------|---------------|
| Ask about or explain OUDS-specific terms (Tokenator, token, raw token, semantic token, component token, theme, …) | `ouds-flutter-vocabulary` |
| Write or review Dart / Flutter code that uses OUDS components, themes or tokens | `ouds-flutter-framework-usage` |
| Translate a Figma token name or token family into its Dart equivalent | `ouds-flutter-figma-to-dart` |
| Migrate code between OUDS Flutter versions, adopt OUDS from native or custom Flutter components, or remove deprecated APIs | `ouds-flutter-migration-guide` |
| Implement or review accessibility (Semantics, screen readers, text scale, high-contrast, orientation) | `ouds-flutter-accessibility` |

Skills are located in `skills/<name>/SKILL.md` (treat this folder as the source of truth; keep the copies under `.claude/skills/` and `.opencode/skills/` in sync).
## 1. Code formatting

The source code is written in Dart and formatted with `dart format`. Linting is configured via `analysis_options.yaml` in each package using `package:flutter_lints/flutter.yaml`.

Before any commit, run:
```bash
dart format .
flutter analyze --no-pub
```

No `// ignore:` suppression is allowed unless strictly justified with an explanatory comment on the same line.

## 2. Architecture details

The repository is a multi-package Flutter workspace managed with `pub` (native Dart workspace, `pubspec.yaml` at root).

### 2.1 Packages

#### `ouds_core`

Contains all reusable UI components (widgets) provided by OUDS Flutter: buttons, switches, checkboxes, chips, tags, links, badges, navigation bars, top bars, form inputs, etc.

- Components are located in `ouds_core/lib/components/<name>/`
- Each component class is prefixed with `Ouds` (e.g. `OudsButton`, `OudsTag`)
- Every component reads visual values exclusively through the active theme tokens
- Current component areas also include `alert/`, `bottom_sheet/`, `country_selector/`, `divider/`, `link/`, `navigation/`, `pin_code_input/`, `top_bar/`, and form inputs such as `ouds_phone_number_input.dart` and `password_input/ouds_password_input.dart`
- `ouds_core` also contains reusable module screens under `ouds_core/lib/modules/` (currently `module-about/` and `module-more/`)

#### `ouds_theme_contract`

Defines the `OudsThemeContract` abstract interface, the `OudsTheme` `InheritedModel` widget, semantic token abstractions and component token interfaces.

> ⚠️ Token interface files in this package are **generated by Tokenator** (Figma → Dart). Do not edit them manually.

#### `ouds_theme_orange`

Implements `OudsThemeContract` for all Orange brand products. Provides `OrangeTheme`.

#### `ouds_theme_orange_compact`

Implements `OudsThemeContract` for Orange products with tighter space and size constraints. Provides `OrangeCompactTheme`.

#### `ouds_theme_sosh`

Implements `OudsThemeContract` for all Sosh brand products. Provides `SoshTheme`.

#### `ouds_theme_wireframe`

Implements `OudsThemeContract` for prototyping and mockups. Provides `WireframeTheme`.

#### `ouds_global_raw_tokens`

Contains raw design token values (colors as hex, spacing as floats, typography sizes, etc.).

> ⚠️ All files in this package are **generated by Tokenator** (Figma → Dart). Never edit them manually.

#### `ouds_accessibility_plugin`

Native plugin (Android + iOS) providing platform-level accessibility features: high-contrast detection, system font scale. Used internally by `OudsCheckbox`, `OudsSwitch`, `OudsRadioButton`.

#### `app`

Demo application "Design System Toolbox" showcasing all components and tokens interactively. Every component must have a corresponding demo screen registered in `app/lib/ui/components/components.dart`.

### 2.2 Architecture guidelines

- Flutter / Material 3 is the default UI paradigm — embrace its declarative and reactive nature
- When creating a new component, try to match the equivalent Material 3 widget API as closely as possible
- Avoid unnecessary abstractions and over-engineering
- Focus on simplicity, clarity, and idiomatic Dart
- Organize by component — keep related code together
- Use extensions to organise large files
- Follow [Effective Dart](https://dart.dev/guides/language/effective-dart) naming conventions consistently
- Use `sealed class` for exhaustive type modelling (e.g. `OudsIconStatus`)
- Prefer `StatelessWidget` unless state is strictly necessary
- Use `const` constructors wherever possible

## 3. Build verification process ⚠️ CRITICAL

**IMPORTANT**: When editing code, you MUST:
1. Format the sources: `dart format .`
2. Run static analysis: `flutter analyze --no-pub`
3. Fix **all** errors and warnings before proceeding
4. Run tests in every modified package: `flutter test`
5. Check for dead code and remove unused imports, variables and methods

## 4. Best practices

### 4.1 DO

- Write documentation in dartdoc format (`///`) for all public APIs, with at least one minimal code example
- Use Dart's type system for safety — prefer strong types, avoid `dynamic`
- Use `public` only when truly needed — prefer private (`_`) visibility
- Apply **Clean Code, DRY, SOLID** and **TDD** principles
- Use `const` constructors everywhere possible
- Use `StatelessWidget` when state is not needed
- Use `sealed class` / `enum` for exhaustive type modelling
- Split large widgets into smaller private sub-widgets or methods
- Use `final` fields in all widget classes
- Use `static` for utility methods that do not need instance context
- If a third-party dependency is added or updated, document it in `THIRD_PARTY.md`
- Use `OudsTheme.of(context)` to read all colors, spacing, typography and component tokens
- Use `OudsLocalizations.of(context)` or app localizations for user-facing strings
- When introducing breaking changes or API modifications, update `MIGRATION.md` at the root of the repository and `skills/ouds-flutter-migration-guide/SKILL.md` accordingly

### 4.2 DON'T

- Add abstraction layers without clear benefit
- Use `dynamic` or `Object` unless strictly necessary
- Perform heavy computation inside `build()` — move it to `initState`, a provider, or `compute()`
- Call `setState` from `initState` — use `addPostFrameCallback` if needed
- Mix business logic with UI code
- Use `print()` — use `debugPrint` or a proper logging package
- Hardcode colors, dimensions, or strings — always use tokens and localizations
- Edit or create token files in `ouds_global_raw_tokens`, `ouds_theme_contract`, `ouds_theme_orange`, `ouds_theme_orange_compact`, `ouds_theme_sosh`, or `ouds_theme_wireframe`
- Create a root barrel file for `ouds_core` — this repository imports components directly from `package:ouds_core/components/...`

## 5. Accessibility basics 🔴 MANDATORY

Everything is available on [Orange accessibility guidelines](https://a11y-guidelines.orange.com/fr/mobile/).

> Load the **`ouds-flutter-accessibility`** skill for the full reference with code examples, Semantics patterns, high-contrast, TalkBack/VoiceOver and the complete testing checklist.

### 5.1 Components

- Wrap the root interactive element in a `Semantics` widget with appropriate flags (`button`, `checked`, `toggled`, `label`, `hint`, `value`)
- Use `ExcludeSemantics` on purely decorative children
- Use `MergeSemantics` to group related elements into a single focusable node when needed
- Always provide a `semanticsLabel` parameter on components whose meaning is conveyed by color alone (e.g. `OudsBadge`)
- Use `OudsLocalizations.of(context)` for all default accessibility strings — never hardcode them

### 5.2 Display

- Never lock text size — use OUDS typography tokens; never override `MediaQuery.textScalerOf`
- Do not lock the app in portrait mode — support landscape orientation
- Support high-contrast mode via `ouds_accessibility_plugin`
- Test with TalkBack (Android) and VoiceOver (iOS)

## 6. Development requirements

- **Flutter**: `>= 3.35.0`
- **Dart**: `>= 3.9.0`
- **Minimum Android SDK**: API 21 (Android 5.0)
- **Minimum iOS**: 13.0
- **Android Studio** or **Xcode** for platform builds
- A physical device or simulator/emulator for full accessibility testing (TalkBack on Android, VoiceOver on iOS)

## 7. Building commands

### 7.1 Install dependencies

```bash
flutter pub get
(cd ouds_core && dart pub get)
(cd app && flutter pub get)
```

If you modify ARB files in `app/lib/l10n/` or `ouds_core/lib/l10n/`, regenerate the generated localization files in the corresponding package:

```bash
(cd app && flutter gen-l10n)
(cd ouds_core && flutter gen-l10n)
```

### 7.2 Run tests

Run tests in each modified package that currently has a `test/` directory:

```bash
(cd app && flutter test)
(cd ouds_core && flutter test)
(cd ouds_global_raw_tokens && flutter test)
(cd ouds_theme_contract && flutter test)
(cd ouds_theme_orange && flutter test)
(cd ouds_theme_sosh && flutter test)
(cd ouds_theme_wireframe && flutter test)
```

At the time of writing, `ouds_theme_orange_compact` and `ouds_accessibility_plugin` do not contain a `test/` directory.

### 7.3 Run static analysis

```bash
flutter analyze --no-pub
```

### 7.4 Format the sources

```bash
dart format .
```

### 7.5 Build documentation

```bash
cd ouds_core && dart doc
```

## 8. Review guidelines

- [ ] Sources are formatted — `dart format .` produces no diff
- [ ] `flutter analyze --no-pub` passes with zero errors and warnings
- [ ] All tests pass — `flutter test` in every modified package
- [ ] No dead code — leave a comment identifying any element that seems unused
- [ ] Documentation builds without error — `dart doc` in `ouds_core` produces no error
- [ ] No secrets or credentials committed (Gitleaks scan via `.github/workflows/gitleaks.yml`)
- [ ] No function is too long or too complex — keep cyclomatic complexity low, split if needed
- [ ] All commits are signed-off (DCO applied) by their authors
- [ ] All new public APIs have dartdoc comments (`///`) with at least one code example
- [ ] All new interactive widgets use `Semantics` with appropriate flags
- [ ] No hardcoded colors, dimensions, or strings — tokens and localizations are used
- [ ] Component tested visually with all 4 themes (Orange, Orange Compact, Sosh, Wireframe)
- [ ] Component tested in light **and** dark mode
- [ ] Demo screen added or updated in `app/lib/ui/components/<name>/`
- [ ] Demo screen registered in `app/lib/ui/components/components.dart`
- [ ] Commit message follows [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `doc:`, `chore:`, `test:`)
- [ ] `MIGRATION.md` updated if any public API has changed or been deprecated
- [ ] `skills/ouds-flutter-migration-guide/SKILL.md` updated to reflect any new migration steps

## 9. Agent response optimization 🚀

When using GitHub Copilot for code reviews, refactoring, or documentation updates, minimize token consumption:

### Key principles

- **Batch operations**: Combine multiple file edits into single calls; parallelize `grep_search` and `file_search`
- **Skip verbose narrative**: Avoid acknowledgments and filler ("Sounds good!", "Let me now..."); use single-line summaries
- **Compress output**: Use tables/checklists instead of prose; reference line numbers instead of repeating content
- **Front-load context**: Gather all research upfront before proposing changes; use `run_subagent` for large searches
- **Minimize reads**: Read files once with adequate ranges; use search filters to avoid irrelevant files

### Response template (optimized)

```
**[Action summary — 1 line]**

### Changes
[Table or checklist of modifications]

### Verification
[Brief grep/status check results]
```

**Target**: 150–300 tokens per response (50–60% reduction vs. standard approach).

### When to delegate to subagent

Use `run_subagent` when:
- Search scope involves 50+ files
- Result set would exceed 500 tokens
- Task requires multiple sequential searches

1 change: 1 addition & 0 deletions .github/workflows/dartdoc-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
uses: ./.github/actions/setup

- name: Setup Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Setup Ruby
Expand Down
1 change: 1 addition & 0 deletions .opencode/skills
52 changes: 52 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
| Property | Value |
|----------------|----------------------------|
| type | ai-agent-guide |
| framework | OUDS-Flutter |
| language | Dart |
| ui-framework | Flutter / Material 3 |
| platforms | Android, iOS |
| min-sdk | Android API 21 / iOS 13 |

# OUDS Flutter - AI Agent Guide

OUDS (Orange Unified Design System) is a multi-package Flutter workspace providing design tokens, themes and Material 3 components for Orange Group products.
The demo application is called "Design System Toolbox".
The project is open source (MIT) at https://github.com/Orange-OpenSource/ouds-flutter.
Target platforms: Android API 21+, iOS 13+. Language: Dart 3.9+ / Flutter 3.35+.

## Skills

Load skills on demand for detailed guidance:

- **`ouds-flutter-vocabulary`** — glossary of OUDS Flutter-specific terms (Tokenator, token types, theme, …)
- **`ouds-flutter-framework-usage`** — full OUDS Flutter usage reference: imports, themes, tokens, localizations, all components with code examples
- **`ouds-flutter-figma-to-dart`** — how to derive Dart naming and token layer from Figma token families for the OUDS Flutter project (raw, semantic and component tokens)
- **`ouds-flutter-migration-guide`** — adopt OUDS Flutter from native Flutter or custom components, migrate between OUDS Flutter versions, before/after mappings
- **`ouds-flutter-accessibility`** — OUDS Flutter Semantics patterns, text scale, high-contrast, TalkBack / VoiceOver, orientation and full testing checklist

## Key files

| File | Purpose |
|------|---------|
| `.github/copilot-instructions.md` | Architecture, build commands, best practices, accessibility, review checklist |
| `pubspec.yaml` | Workspace manifest — lists all packages |
| `ouds_core/lib/components/` | All OUDS widgets (`OudsButton`, `OudsTag`, …) |
| `ouds_theme_contract/lib/` | Abstract token interfaces — generated by Tokenator, never edit manually |
| `app/lib/ui/components/components.dart` | Demo screen registry — register every new component here |
| `MIGRATION.md` | Public API change log — update for every breaking change or deprecation |

## Critical rules

- Always load the **`ouds-flutter-vocabulary`** skill before discussing tokens or themes.
- Always load the **`ouds-flutter-framework-usage`** skill before writing or reviewing code that uses OUDS components or tokens.
- Always load the **`ouds-flutter-figma-to-dart`** skill when asked to find or map a Figma token name to its Dart equivalent.
- Always load the **`ouds-flutter-migration-guide`** skill when asked to migrate code, adopt OUDS in an existing app, replace native/custom Flutter components with OUDS equivalents, or remove deprecated APIs.
- Always load the **`ouds-flutter-accessibility`** skill when asked about Semantics, screen readers, TalkBack, VoiceOver, text scale, high-contrast or orientation.
- Before committing: `dart format .` → `flutter analyze --no-pub` → fix all errors → `flutter test` in every modified package (see `.github/copilot-instructions.md §7`).
- **Never** create or edit token files in `ouds_global_raw_tokens`, `ouds_theme_contract`, `ouds_theme_orange`, `ouds_theme_orange_compact`, `ouds_theme_sosh`, or `ouds_theme_wireframe` — all content is generated by Tokenator.
- **Never** create a root barrel file for `ouds_core` — import components directly (e.g. `package:ouds_core/components/button/ouds_button.dart`).
- When introducing a breaking change or deprecation: update **both** `MIGRATION.md` **and** `skills/ouds-flutter-migration-guide/SKILL.md`.
- Use `OudsTheme.of(context)` for all colors, spacing, typography and component tokens — never hardcode values.
- Use `OudsLocalizations.of(context)` for all user-facing and accessibility strings — never hardcode them.
- Prefix all OUDS widgets with `Ouds` (e.g. `OudsButton`, `OudsTag`).
- Every new interactive widget must wrap its root element in a `Semantics` widget with appropriate flags (`button`, `checked`, `toggled`, `label`, `hint`, `value`).
Loading
Loading