Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,55 @@ The OUDS icon library has been updated to version 1.6. Some icon names or asset
- Review any icon constants or asset paths you reference directly
- Update to the new icon names from v1.6 if you receive compilation errors or missing asset warnings

#### 4. `OudsLink` — Dedicated named constructors for icon and navigation variants

`OudsLink` now provides dedicated named constructors for every non text-only variant. The generic `OudsLink()` constructor's `layout` parameter is now **deprecated** in favor of these constructors.

**Impact**: Low (additive — the default constructor keeps working for text-only and legacy usages)

**Before**:
```dart

OudsLink(
label: 'Label',
icon: 'assets/ic_heart.svg',
)

OudsLink(
label: 'Label',
layout: OudsLinkLayout.back,
)

OudsLink(
label: 'Label',
layout: OudsLinkLayout.next,
)
```

**After**:
```dart
OudsLink.icon(
label: 'Label',
icon: 'assets/ic_heart.svg',
tinted: true,
)

OudsLink.previous(label: 'Label')

OudsLink.next(label: 'Label')

OudsLink.external(label: 'Label')
```

**Required Action**:
- Replace `OudsLink(icon: ...)` with `OudsLink.icon(icon: ..., tinted: ...)`
- Replace `OudsLink(layout: OudsLinkLayout.back)` with `OudsLink.previous(...)`
- Replace `OudsLink(layout: OudsLinkLayout.next)` with `OudsLink.next(...)`
- Use `OudsLink.external(...)` for links navigating outside the current product, service or application
- Text-only links keep using the default `OudsLink(...)` constructor unchanged

**Reason for Change**: Improve type safety and API clarity by making each link variant explicit through its own constructor, consistent with `OudsTag` and `OudsBadge`

### Component Design Version Updates

Several components have been updated to align with new design specification versions. These changes are primarily visual and do not require code changes unless you override component tokens in a custom theme.
Expand Down
4 changes: 4 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ouds_theme_orange/assets/component/link/expanded-false.svg
ouds_theme_orange/assets/component/link/expanded-true.svg
ouds_theme_orange/assets/component/link/next.svg
ouds_theme_orange/assets/component/link/previous.svg
ouds_theme_orange/assets/component/link/external-link.svg
ouds_theme_orange/assets/component/radio-button/radio-button-selected.svg
ouds_theme_orange/assets/component/switch/selected-switch.svg
ouds_theme_orange/assets/component/tag/close.svg
Expand Down Expand Up @@ -176,6 +177,7 @@ ouds_theme_orange_compact/assets/component/link/expanded-false.svg
ouds_theme_orange_compact/assets/component/link/expanded-true.svg
ouds_theme_orange_compact/assets/component/link/next.svg
ouds_theme_orange_compact/assets/component/link/previous.svg
ouds_theme_orange_compact/assets/component/link/external-link.svg
ouds_theme_orange_compact/assets/component/radio-button/radio-button-selected.svg
ouds_theme_orange_compact/assets/component/switch/selected-switch.svg
ouds_theme_orange_compact/assets/component/tag/close.svg
Expand Down Expand Up @@ -238,6 +240,7 @@ ouds_theme_sosh/assets/component/link/expanded-false.svg
ouds_theme_sosh/assets/component/link/expanded-true.svg
ouds_theme_sosh/assets/component/link/next.svg
ouds_theme_sosh/assets/component/link/previous.svg
ouds_theme_sosh/assets/component/link/external-link.svg
ouds_theme_sosh/assets/component/radio-button/radio-button-selected.svg
ouds_theme_sosh/assets/component/switch/selected-switch.svg
ouds_theme_sosh/assets/component/tag/close.svg
Expand Down Expand Up @@ -295,6 +298,7 @@ ouds_theme_wireframe/assets/component/link/expanded-false.svg
ouds_theme_wireframe/assets/component/link/expanded-true.svg
ouds_theme_wireframe/assets/component/link/next.svg
ouds_theme_wireframe/assets/component/link/previous.svg
ouds_theme_wireframe/assets/component/link/external-link.svg
ouds_theme_wireframe/assets/component/radio-button/radio-button-selected.svg
ouds_theme_wireframe/assets/component/switch/selected-switch.svg
ouds_theme_wireframe/assets/component/tag/close.svg
Expand Down
2 changes: 2 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- [DemoApp][Library] Create component - `List item` ([#54](https://github.com/Orange-OpenSource/ouds-flutter/issues/54))
### Changed
- [DemoApp][Library] In library, update `link` component to v2.4.0 ([#861](https://github.com/Orange-OpenSource/ouds-flutter/issues/861))
- [DemoApp][Library] In library, update `link` component to v2.3.0 ([#838](https://github.com/Orange-OpenSource/ouds-flutter/issues/838))
- [DemoApp][Library] For `button` component, update to version 3.3.0 ([#832](https://github.com/Orange-OpenSource/ouds-flutter/issues/832))
- [DemoApp][Library] Update `progress-indicator`: add size parameter to OudsCircularProgressIndicator for button integration ([#876](https://github.com/Orange-OpenSource/ouds-flutter/issues/876))
### Fixed
Expand Down
32 changes: 25 additions & 7 deletions app/lib/l10n/gen/ouds_flutter_app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,12 @@ abstract class AppLocalizations {
/// **'Size'**
String get app_components_common_size_label;

/// No description provided for @app_components_common_density_label.
///
/// In en, this message translates to:
/// **'Density'**
String get app_components_common_density_label;

/// No description provided for @app_components_common_textAndLoaderLayout_label.
///
/// In en, this message translates to:
Expand Down Expand Up @@ -625,6 +631,12 @@ abstract class AppLocalizations {
/// **'Type'**
String get app_components_common_type_tech;

/// No description provided for @app_components_common_tinted_tech.
///
/// In en, this message translates to:
/// **'Tinted icon'**
String get app_components_common_tinted_tech;

/// No description provided for @app_components_alert_tech.
///
/// In en, this message translates to:
Expand Down Expand Up @@ -1224,29 +1236,35 @@ abstract class AppLocalizations {
/// **'The phone number can\'t be empty.'**
String get app_components_phoneNumberInput_error_label;

/// No description provided for @app_components_link_label.
/// No description provided for @app_components_link_tech.
///
/// In en, this message translates to:
/// **'Link'**
String get app_components_link_label;
String get app_components_link_tech;

/// No description provided for @app_components_link_description_text.
///
/// In en, this message translates to:
/// **'Link is a UI element that allows to navigate from one location to another, either within the same page or across different pages in the same resource, or to an external resource.'**
String get app_components_link_description_text;

/// No description provided for @app_components_link_backLayout_label.
/// No description provided for @app_components_link_previousLayout_tech.
///
/// In en, this message translates to:
/// **'Back'**
String get app_components_link_backLayout_label;
/// **'Previous'**
String get app_components_link_previousLayout_tech;

/// No description provided for @app_components_link_nextLayout_label.
/// No description provided for @app_components_link_nextLayout_tech.
///
/// In en, this message translates to:
/// **'Next'**
String get app_components_link_nextLayout_label;
String get app_components_link_nextLayout_tech;

/// No description provided for @app_components_link_externalLayout_tech.
///
/// In en, this message translates to:
/// **'External'**
String get app_components_link_externalLayout_tech;

/// No description provided for @app_components_listItem_tech.
///
Expand Down
15 changes: 12 additions & 3 deletions app/lib/l10n/gen/ouds_flutter_app_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get app_components_common_size_label => 'Size';

@override
String get app_components_common_density_label => 'Density';

@override
String get app_components_common_textAndLoaderLayout_label => 'Text + Loader';

Expand Down Expand Up @@ -286,6 +289,9 @@ class AppLocalizationsAr extends AppLocalizations {
@override
String get app_components_common_type_tech => 'Type';

@override
String get app_components_common_tinted_tech => 'Tinted icon';

@override
String get app_components_alert_tech => 'Alert';

Expand Down Expand Up @@ -636,17 +642,20 @@ class AppLocalizationsAr extends AppLocalizations {
'لا يمكن أن يكون رقم الهاتف فارغًا.';

@override
String get app_components_link_label => 'Link';
String get app_components_link_tech => 'Link';

@override
String get app_components_link_description_text =>
'Link هو عنصر واجهة مستخدم يسمح بالتنقل من مكان إلى آخر، سواء داخل نفس الصفحة أو عبر صفحات مختلفة في نفس المورد، أو إلى مورد خارجي';

@override
String get app_components_link_backLayout_label => 'Back';
String get app_components_link_previousLayout_tech => 'Previous';

@override
String get app_components_link_nextLayout_tech => 'Next';

@override
String get app_components_link_nextLayout_label => 'Next';
String get app_components_link_externalLayout_tech => 'External';

@override
String get app_components_listItem_tech => 'List item';
Expand Down
15 changes: 12 additions & 3 deletions app/lib/l10n/gen/ouds_flutter_app_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get app_components_common_size_label => 'Size';

@override
String get app_components_common_density_label => 'Density';

@override
String get app_components_common_textAndLoaderLayout_label => 'Text + Loader';

Expand Down Expand Up @@ -286,6 +289,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get app_components_common_type_tech => 'Type';

@override
String get app_components_common_tinted_tech => 'Tinted icon';

@override
String get app_components_alert_tech => 'Alert';

Expand Down Expand Up @@ -636,17 +642,20 @@ class AppLocalizationsEn extends AppLocalizations {
'The phone number can\'t be empty.';

@override
String get app_components_link_label => 'Link';
String get app_components_link_tech => 'Link';

@override
String get app_components_link_description_text =>
'Link is a UI element that allows to navigate from one location to another, either within the same page or across different pages in the same resource, or to an external resource.';

@override
String get app_components_link_backLayout_label => 'Back';
String get app_components_link_previousLayout_tech => 'Previous';

@override
String get app_components_link_nextLayout_tech => 'Next';

@override
String get app_components_link_nextLayout_label => 'Next';
String get app_components_link_externalLayout_tech => 'External';

@override
String get app_components_listItem_tech => 'List item';
Expand Down
15 changes: 12 additions & 3 deletions app/lib/l10n/gen/ouds_flutter_app_localizations_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get app_components_common_size_label => 'Size';

@override
String get app_components_common_density_label => 'Density';

@override
String get app_components_common_textAndLoaderLayout_label => 'Text + Loader';

Expand Down Expand Up @@ -288,6 +291,9 @@ class AppLocalizationsFr extends AppLocalizations {
@override
String get app_components_common_type_tech => 'Type';

@override
String get app_components_common_tinted_tech => 'Tinted icon';

@override
String get app_components_alert_tech => 'Alert';

Expand Down Expand Up @@ -640,17 +646,20 @@ class AppLocalizationsFr extends AppLocalizations {
'The phone number can\'t be empty.';

@override
String get app_components_link_label => 'Link';
String get app_components_link_tech => 'Link';

@override
String get app_components_link_description_text =>
'Un Link (ou lien) est un élément d\'interface utilisateur qui permet de naviguer d\'un emplacement à un autre, que ce soit au sein de la même page, entre différentes pages de la même ressource ou vers une ressource externe.';

@override
String get app_components_link_backLayout_label => 'Back';
String get app_components_link_previousLayout_tech => 'Previous';

@override
String get app_components_link_nextLayout_tech => 'Next';

@override
String get app_components_link_nextLayout_label => 'Next';
String get app_components_link_externalLayout_tech => 'External';

@override
String get app_components_listItem_tech => 'List item';
Expand Down
9 changes: 6 additions & 3 deletions app/lib/l10n/ouds_flutter_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"app_components_common_onColoredBackground_label": "On colored background",
"app_components_common_status_label": "Status",
"app_components_common_size_label": "Size",
"app_components_common_density_label": "Density",
"app_components_common_textAndLoaderLayout_label": "Text + Loader",
"app_components_common_roundedCorner_label": "Rounded Corner",
"app_components_common_loader_label": "Loader",
Expand All @@ -137,6 +138,7 @@
"app_components_common_description_tech": "Description",
"app_components_common_edgeToEdge_tech": "Edge to edge",
"app_components_common_type_tech" : "Type",
"app_components_common_tinted_tech": "Tinted icon",

"@_components_alert": {},
"app_components_alert_tech": "Alert",
Expand Down Expand Up @@ -273,10 +275,11 @@
"app_components_phoneNumberInput_error_label": "The phone number can't be empty.",

"@_components_link": {},
"app_components_link_label": "Link",
"app_components_link_tech": "Link",
"app_components_link_description_text": "Link is a UI element that allows to navigate from one location to another, either within the same page or across different pages in the same resource, or to an external resource.",
"app_components_link_backLayout_label": "Back",
"app_components_link_nextLayout_label": "Next",
"app_components_link_previousLayout_tech": "Previous",
"app_components_link_nextLayout_tech": "Next",
"app_components_link_externalLayout_tech": "External",

"@_components_list_item": {},
"app_components_listItem_tech" : "List item",
Expand Down
10 changes: 2 additions & 8 deletions app/lib/ui/components/components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,10 @@ List<Component> components(BuildContext context) {
],
),
Component(
context.l10n.app_components_link_label,
context.l10n.app_components_link_tech,
ComponentContainer(
child: Column(
children: [
OudsLink(
label: "Link",
layout: OudsLinkLayout.next,
onPressed: () {},
),
],
children: [OudsLink.next(label: "Link", onPressed: () {})],
),
),
context.l10n.app_components_link_description_text,
Expand Down
Loading
Loading