Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
23 changes: 23 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ ouds_theme_orange/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_orange/assets/functional/settings-and-tools/hide.svg
ouds_theme_orange/assets/functional/navigation/menu.svg
ouds_theme_orange/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_orange/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_orange/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_orange/assets/component/badge-icon/error-fill.svg
ouds_theme_orange/assets/component/badge-icon/info-fill.svg
ouds_theme_orange/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_orange/fonts/Roboto-Black.ttf
Expand Down Expand Up @@ -167,6 +172,12 @@ ouds_theme_orange_compact/assets/functional/social-and-engagement/heart-empty.sv
ouds_theme_orange_compact/assets/functional/settings-and-tools/hide.svg
ouds_theme_orange_compact/assets/functional/navigation/menu.svg
ouds_theme_orange_compact/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_orange_compact/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_orange_compact/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_orange_compact/assets/component/badge-icon/error-fill.svg
ouds_theme_orange_compact/assets/component/badge-icon/info-fill.svg
ouds_theme_orange_compact/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_orange_compact/fonts/Roboto-Black.ttf
ouds_theme_orange_compact/fonts/Roboto-Bold.ttf
Expand Down Expand Up @@ -211,6 +222,12 @@ ouds_theme_sosh/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_sosh/assets/functional/settings-and-tools/hide.svg
ouds_theme_sosh/assets/functional/navigation/menu.svg
ouds_theme_sosh/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_sosh/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_sosh/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_sosh/assets/component/badge-icon/error-fill.svg
ouds_theme_sosh/assets/component/badge-icon/info-fill.svg
ouds_theme_sosh/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_sosh/fonts/Sosh-Black.ttf
ouds_theme_sosh/fonts/Sosh-Bold.ttf
Expand Down Expand Up @@ -249,6 +266,12 @@ ouds_theme_wireframe/assets/component/tag/close.svg
ouds_theme_wireframe/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_wireframe/assets/functional/settings-and-tools/hide.svg
ouds_theme_wireframe/assets/functional/navigation/menu.svg
ouds_theme_wireframe/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_wireframe/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_wireframe/assets/component/badge-icon/error-fill.svg
ouds_theme_wireframe/assets/component/badge-icon/info-fill.svg
ouds_theme_wireframe/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_wireframe/fonts/ShantellSans-Bold.ttf
ouds_theme_wireframe/fonts/ShantellSans-BoldItalic.ttf
Expand Down
3 changes: 3 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.3.0...develop)
### Added
### Changed
- [DemoApp][Library] update `badge icon` component to 1.3.0 ([#680](https://github.com/Orange-OpenSource/ouds-flutter/issues/680))
- [DemoApp][Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed

## [1.3.0](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.2.0...1.3.0) - 2026-05-08
Expand Down
8 changes: 2 additions & 6 deletions app/lib/ui/components/badge/badge_customization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,15 @@ class BadgeCustomizationState
final isSmallSize =
selectedState == BadgeEnumSize.xsmall ||
selectedState == BadgeEnumSize.small;
final isTypeTrigger =
selectedType == BadgeEnumType.icon ||
selectedType == BadgeEnumType.count;
final isTypeTrigger = selectedType == BadgeEnumType.count;

if (isSmallSize && isTypeTrigger) {
selectedState = BadgeEnumSize.medium;
}
}

bool isSizeDisabled(BadgeEnumSize size) {
final isTypeTrigger =
selectedType == BadgeEnumType.icon ||
selectedType == BadgeEnumType.count;
final isTypeTrigger = selectedType == BadgeEnumType.count;
if (isTypeTrigger &&
(size == BadgeEnumSize.xsmall || size == BadgeEnumSize.small)) {
return true;
Expand Down
16 changes: 14 additions & 2 deletions app/lib/ui/components/badge/badge_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,23 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
final customizationState = BadgeCustomization.of(context)!;
ThemeController? themeController = Provider.of<ThemeController>(
context,
listen: false,
);

Comment thread
nouha06 marked this conversation as resolved.
String getVersion() {
switch (customizationState.selectedType) {
case BadgeEnumType.standard:
return OudsComponentVersion.badge;
case BadgeEnumType.count:
return OudsComponentVersion.badgeCount;
case BadgeEnumType.icon:
return OudsComponentVersion.badgeIcon;
}
}

return DetailScreenDescription(
description: context.l10n.app_components_badge_description_text,
widget: Column(
Expand All @@ -120,7 +133,7 @@ class _BodyState extends State<_Body> {
.fixedMedium,
),
Code(code: BadgeCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(version: OudsComponentVersion.badge),
ReferenceDesignVersionComponent(version: getVersion()),
],
),
);
Expand Down Expand Up @@ -280,7 +293,6 @@ class _CustomizationContentState extends State<_CustomizationContent> {
onSelected: (selectedOption) {
setState(() {
bool isTypeTrigger =
customizationState.selectedType == BadgeEnumType.icon ||
customizationState.selectedType == BadgeEnumType.count;
bool isSizeTrigger =
selectedOption == BadgeEnumSize.xsmall ||
Expand Down
60 changes: 37 additions & 23 deletions app/lib/ui/components/chip/chip_filter_demo_sreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import 'package:provider/provider.dart';
class ChipFilterDemoScreen extends StatefulWidget {
final String? previousPageTitle;

const ChipFilterDemoScreen({super.key,this.previousPageTitle});
const ChipFilterDemoScreen({super.key, this.previousPageTitle});

@override
State<StatefulWidget> createState() => _ChipFilterDemoScreenState();
Expand All @@ -59,7 +59,11 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
child: ChipCustomization(
key: _scaffoldKey,
child: Padding(
padding: EdgeInsets.only(bottom: defaultTargetPlatform == TargetPlatform.android ? MediaQuery.of(context).viewPadding.bottom : OudsTheme.of(context).spaceScheme(context).paddingBlockNone),
padding: EdgeInsets.only(
bottom: defaultTargetPlatform == TargetPlatform.android
? MediaQuery.of(context).viewPadding.bottom
: OudsTheme.of(context).spaceScheme(context).paddingBlockNone,
),
child: Scaffold(
bottomSheet: OudsSheetsBottom(
onExpansionChanged: _onExpansionChanged,
Expand All @@ -70,7 +74,8 @@ class _ChipFilterDemoScreenState extends State<ChipFilterDemoScreen> {
appBar: MainAppBar(
title: context.l10n.app_components_filterChip_label,
showBackButton: true,
previousPageTitle: widget.previousPageTitle,),
previousPageTitle: widget.previousPageTitle,
),
body: ExcludeSemantics(
excluding: !_isBottomSheetExpanded,
child: _Body(),
Expand All @@ -93,19 +98,24 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
ThemeController? themeController = Provider.of<ThemeController>(context, listen: false);
ThemeController? themeController = Provider.of<ThemeController>(
context,
listen: false,
);
return DetailScreenDescription(
description: context.l10n.app_components_chip_filterChip_description_text,
widget: Column(
children: [
_ChipFilterDemo(),
SizedBox(height: themeController.currentTheme.spaceScheme(context).fixedMedium),
Code(
code: ChipFilterCodeGenerator.updateCode(context),
SizedBox(
height: themeController.currentTheme
.spaceScheme(context)
.fixedMedium,
),
Code(code: ChipFilterCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.chip,
)
version: OudsComponentVersion.filterChip,
),
],
),
);
Expand Down Expand Up @@ -134,18 +144,20 @@ class _ChipFilterDemoState extends State<_ChipFilterDemo> {

return LightDarkBox(
child: OudsFilterChip(
label: ChipCustomizationUtils.getText(customizationState),
avatar: ChipCustomizationUtils.getIcon(customizationState, themeController!),
selected: customizationState?.hasSelected,
onSelected: customizationState?.hasEnabled == true
? (newValue) {
setState(
() {
customizationState?.hasSelected = newValue;
},
);
}
: null),
label: ChipCustomizationUtils.getText(customizationState),
avatar: ChipCustomizationUtils.getIcon(
customizationState,
themeController!,
),
selected: customizationState?.hasSelected,
onSelected: customizationState?.hasEnabled == true
? (newValue) {
setState(() {
customizationState?.hasSelected = newValue;
});
}
: null,
),
);
}
}
Expand Down Expand Up @@ -176,7 +188,9 @@ class _CustomizationContentState extends State<_CustomizationContent> {

@override
Widget build(BuildContext context) {
final ChipCustomizationState? customizationState = ChipCustomization.of(context);
final ChipCustomizationState? customizationState = ChipCustomization.of(
context,
);

return CustomizableSection(
children: [
Expand Down Expand Up @@ -212,7 +226,7 @@ class _CustomizationContentState extends State<_CustomizationContent> {
text: customizationState.labelText,
focusNode: labelFocus,
fieldType: FieldType.label,
)
),
],
);
}
Expand Down
4 changes: 3 additions & 1 deletion app/lib/ui/components/chip/chip_suggestion_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ class _BodyState extends State<_Body> {
.fixedMedium,
),
Code(code: ChipSuggestionCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(version: OudsComponentVersion.chip),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.suggestionChip,
),
],
),
);
Expand Down
Loading
Loading