Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2e93482
chore: update tokens
boosted-bot May 5, 2026
b9f40b9
chore: update tokens with version 2.4.0
AhmedAmineZr May 5, 2026
b7493bd
chore: update tokens with version 2.4.0
AhmedAmineZr May 5, 2026
1a17b38
Merge remote-tracking branch 'origin/tokenator-update-tokens-20260505…
nouha06 May 5, 2026
60038af
Merge branch 'develop' into tokenator-update-tokens-20260505120328
nouha06 May 8, 2026
53733c5
chore: update version components
AhmedAmineZr May 8, 2026
9f93946
Merge branch 'tokenator-update-tokens-20260505120328' of https://gith…
AhmedAmineZr May 8, 2026
9121be7
Merge branch 'develop' into tokenator-update-tokens-20260505120328
AhmedAmineZr May 8, 2026
0e7bc7c
Merge branch 'develop' into tokenator-update-tokens-20260505120328
AhmedAmineZr May 8, 2026
1657cc3
chore(version): prepare version 2.0.0 (#747)
AhmedAmineZr May 11, 2026
e00a5d5
Merge branch 'develop' into tokenator-update-tokens-20260505120328
nouha06 May 13, 2026
c9a3cda
feat(pin-code-input): update pin code input to v1.3
nouha06 May 13, 2026
5f81ecc
fix(pin-code-input): do not move focus automatically when voice over …
nouha06 May 15, 2026
9c1126d
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 May 20, 2026
6ae9a2b
feat(pin-code-input): update component and fix accessibility issues
nouha06 May 20, 2026
b014d58
feat(pin-code-input): update component and fix accessibility issues
nouha06 May 20, 2026
53ef671
Merge remote-tracking branch 'origin/691-for-pin-code-input-component…
nouha06 May 20, 2026
b8b6a8f
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 May 22, 2026
78c2f9e
chore: update design version in doc
nouha06 May 25, 2026
1f28c21
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 May 25, 2026
38ac6f3
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 May 26, 2026
04af669
fix: glitch when typing on keyboard and Delete Functionality
AhmedAmineZr May 26, 2026
2583592
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
AhmedAmineZr May 26, 2026
c464378
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 May 26, 2026
6ef2c73
chore: update changelog
AhmedAmineZr May 26, 2026
d1dcc36
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
AhmedAmineZr May 26, 2026
4d1b657
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 Jun 3, 2026
277a53a
fix(pin-code-input): improve PIN input accessibility for screen readers
nouha06 Jun 10, 2026
c2a55f1
Merge branch 'prepare-new-version-2.0.0' into 691-for-pin-code-input-…
nouha06 Jun 19, 2026
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
5 changes: 5 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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.1...develop)
### Added
### Changed
- [Library] update `Pin code input` component to v1.3 ([#691](https://github.com/Orange-OpenSource/ouds-flutter/issues/691))
- [Library] `tab bar component`, update the animation of the `selected tab indicator` ([#633](https://github.com/Orange-OpenSource/ouds-flutter/issues/633))
- [DemoApp][Library] Update `ToolBar Top`, with Badge in Trailing Actions ([#642](https://github.com/Orange-OpenSource/ouds-flutter/issues/642))
- [DemoApp][Library] update `alert message`, `switch`, `radio`, `checkbox`, `text input`, `pin code input`, `phone number input`, components to use rich text ([#782](https://github.com/Orange-OpenSource/ouds-flutter/issues/782))
Expand All @@ -25,6 +26,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [DemoApp][Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed
- [Library] `Pin code input` Issue with Delete Functionality in the PIN Field ([#791](https://github.com/Orange-OpenSource/ouds-flutter/issues/791))
- [Library] `Pin code input` glitch when typing on keyboard ([#776](https://github.com/Orange-OpenSource/ouds-flutter/issues/776))
- [Library] `Pin code input` Focus should not move automatically to the next field ([#649](https://github.com/Orange-OpenSource/ouds-flutter/issues/649))
- [Library] `Pin code input` Remove the hint on the group of digits ([#628](https://github.com/Orange-OpenSource/ouds-flutter/issues/628))
- [DemoApp][Library] `Bottom Bar` Inconsistent order of the accessible ([#625](https://github.com/Orange-OpenSource/ouds-flutter/issues/625))
- [Library] `Bottom Bar` Overlap when zoom is activated ([#627](https://github.com/Orange-OpenSource/ouds-flutter/issues/627))
- [DemoApp] Update pubspec icons 1.6 ([#794](https://github.com/Orange-OpenSource/ouds-flutter/issues/794))
Expand Down
132 changes: 97 additions & 35 deletions app/lib/ui/components/pin_code_input/pin_code_input_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import 'package:provider/provider.dart';

class PinCodeInputDemoScreen extends StatefulWidget {
final String? previousPageTitle;
const PinCodeInputDemoScreen({super.key,this.previousPageTitle});
const PinCodeInputDemoScreen({super.key, this.previousPageTitle});

@override
State<PinCodeInputDemoScreen> createState() => _PinCodeInputDemoScreenState();
Expand All @@ -58,13 +58,17 @@ class _PinCodeInputDemoScreenState extends State<PinCodeInputDemoScreen> {
child: PinCodeInputCustomization(
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(
extendBodyBehindAppBar: true,
appBar: MainAppBar(
showBackButton: true,
title: context.l10n.app_components_pinCodeInput_label,
previousPageTitle: widget.previousPageTitle,
showBackButton: true,
title: context.l10n.app_components_pinCodeInput_label,
previousPageTitle: widget.previousPageTitle,
),
bottomSheet: OudsSheetsBottom(
onExpansionChanged: _onExpansionChanged,
Expand Down Expand Up @@ -92,17 +96,24 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
final themeController = Provider.of<ThemeController>(context, listen: false);
final themeController = Provider.of<ThemeController>(
context,
listen: false,
);
return DetailScreenDescription(
description: context.l10n.app_components_pinCodeInput_description_text,
widget: Column(
children: [
const _PinCodeInputDemo(),
SizedBox(height: themeController.currentTheme.spaceScheme(context).fixedMedium),
Code(
code: PinCodeInputCodeGenerator.updateCode(context),
SizedBox(
height: themeController.currentTheme
.spaceScheme(context)
.fixedMedium,
),
Code(code: PinCodeInputCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(
version: OudsComponentVersion.pinCodeInput,
),
ReferenceDesignVersionComponent(version: OudsComponentVersion.pinCodeInput),
],
),
);
Expand All @@ -118,7 +129,18 @@ class _PinCodeInputDemo extends StatefulWidget {

class _PinCodeInputDemoState extends State<_PinCodeInputDemo> {
List<TextEditingController> controllers = [];
late int pinCodeLength;
OudsPinCodeInputLength? _currentLength;

/// Initialises (or reinitialises) the controller list whenever the PIN
/// length changes. Previous controllers are disposed before recreation.
void _syncControllers(OudsPinCodeInputLength length) {
if (_currentLength == length) return;
for (final c in controllers) {
c.dispose();
}
_currentLength = length;
controllers = List.generate(length.digits, (_) => TextEditingController());
}

@override
void dispose() {
Expand All @@ -131,31 +153,57 @@ class _PinCodeInputDemoState extends State<_PinCodeInputDemo> {
@override
Widget build(BuildContext context) {
final customizationState = PinCodeInputCustomization.of(context)!;
for (int i = 0; i < PinCodeInputCustomizationUtils.getLength(customizationState.selectedPinCodeLength as Object).digits; i++) {
controllers.add(TextEditingController());
}
final getLength = PinCodeInputCustomizationUtils.getLength(
customizationState.selectedPinCodeLength as Object,
);

final getLength = PinCodeInputCustomizationUtils.getLength(customizationState.selectedPinCodeLength as Object);
_syncControllers(getLength);

return LightDarkBox(
hasConstrainedMaxWidthOption: true,
child: OudsPinCodeInput(
controllers: controllers,
helperText: customizationState.hasHelperText && customizationState.pinCodeHelperText.isNotEmpty ? PinCodeInputCustomizationUtils.getPinCodeHelperText(customizationState) : null,
helperText:
customizationState.hasHelperText &&
customizationState.pinCodeHelperText.isNotEmpty
? PinCodeInputCustomizationUtils.getPinCodeHelperText(
customizationState,
)
: null,
length: getLength,
errorText: customizationState.hasError ? PinCodeInputCustomizationUtils.getPinCodeErrorText(customizationState) : null,
errorText: customizationState.hasError
? PinCodeInputCustomizationUtils.getPinCodeErrorText(
customizationState,
)
: null,
digitInputDecoration: OudsDigitInputDecoration(
hintText: PinCodeInputCustomizationUtils.getPinCodePlaceholderText(customizationState),
hintText: PinCodeInputCustomizationUtils.getPinCodePlaceholderText(
customizationState,
),
hiddenPassword: customizationState.hasHiddenPassword,
isOutlined: customizationState.hasOutlined,
constrainedMaxWidth: customizationState.hasConstrainedMaxWidth ? true : false,
keyboardType: PinCodeInputCustomizationUtils.getKeyboardType(customizationState.selectedKeyboardType),
constrainedMaxWidth: customizationState.hasConstrainedMaxWidth
? true
: false,
keyboardType: PinCodeInputCustomizationUtils.getKeyboardType(
customizationState.selectedKeyboardType,
),
),
onEditingComplete: (value) async {
final errorLabel = context.l10n.app_components_pinCodeInput_error_label;
final verificationErrorLabel = context.l10n.app_components_pinCodeInput_verification_error_label;
final errorLabel =
context.l10n.app_components_pinCodeInput_error_label;
final verificationErrorLabel =
context.l10n.app_components_pinCodeInput_verification_error_label;
await _handleCompleted(
context, value, PinCodeInputCustomizationUtils.getLength(customizationState.selectedPinCodeLength as Object).digits, customizationState, errorLabel, verificationErrorLabel);
context,
value,
PinCodeInputCustomizationUtils.getLength(
customizationState.selectedPinCodeLength as Object,
).digits,
customizationState,
errorLabel,
verificationErrorLabel,
);
},
onChanged: (value) {
if (value.isEmpty || value.length < getLength.digits) {
Expand All @@ -169,10 +217,19 @@ class _PinCodeInputDemoState extends State<_PinCodeInputDemo> {

Future<bool> _fakeVerify(String code) async {
await Future.delayed(Duration(milliseconds: 300));
return code == "1234" || code == "123456" || code == "12345678"; // demo logic
return code == "1234" ||
code == "123456" ||
code == "12345678"; // demo logic
}

Future<void> _handleCompleted(BuildContext context, String value, int digitLength, PinCodeInputCustomizationState customizationState, String errorLabel, String verificationErrorLabel) async {
Future<void> _handleCompleted(
BuildContext context,
String value,
int digitLength,
PinCodeInputCustomizationState customizationState,
String errorLabel,
String verificationErrorLabel,
) async {
final isValid = await _fakeVerify(value);

String errorText = "";
Expand Down Expand Up @@ -231,11 +288,15 @@ class _CustomizationContentState extends State<_CustomizationContent> {
CustomizableSwitch(
title: context.l10n.app_components_common_error_label,
value: customizationState.hasError,
onChanged: customizationState.hasHelperText && !customizationState.hasError
onChanged:
customizationState.hasHelperText && !customizationState.hasError
? null
: (value) {
customizationState.hasError = value;
value ? customizationState.pinCodeErrorText = context.l10n.app_components_pinCodeInput_error_label : customizationState.pinCodeErrorText = "";
value
? customizationState.pinCodeErrorText =
context.l10n.app_components_pinCodeInput_error_label
: customizationState.pinCodeErrorText = "";
},
),
CustomizableSwitch(
Expand All @@ -248,14 +309,15 @@ class _CustomizationContentState extends State<_CustomizationContent> {
},
),
Visibility(
visible: customizationState.hasHelperText,
child: CustomizableTextField(
fieldEnable: !customizationState.hasError,
title: context.l10n.app_components_common_helperText_label,
text: customizationState.pinCodeHelperText,
focusNode: helperFocus,
fieldType: FieldType.helper,
)),
visible: customizationState.hasHelperText,
child: CustomizableTextField(
fieldEnable: !customizationState.hasError,
title: context.l10n.app_components_common_helperText_label,
text: customizationState.pinCodeHelperText,
focusNode: helperFocus,
fieldType: FieldType.helper,
),
),
CustomizableSwitch(
title: context.l10n.app_components_pinCodeInput_hidden_password_label,
value: customizationState.hasHiddenPassword,
Expand Down
5 changes: 5 additions & 0 deletions ouds_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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.1...develop)
### Added
### Changed
- [Library] update `Pin code input` component to v1.3 ([#691](https://github.com/Orange-OpenSource/ouds-flutter/issues/691))
- [Library] `tab bar component`, update the animation of the `selected tab indicator` ([#633](https://github.com/Orange-OpenSource/ouds-flutter/issues/633))
- [Library] Update `ToolBar Top`, with Badge in Trailing Actions ([#642](https://github.com/Orange-OpenSource/ouds-flutter/issues/642))
- [Library] update `alert message`, `switch`, `radio`, `checkbox`, `text input`, `pin code input`, `phone number input`, components to use rich text ([#782](https://github.com/Orange-OpenSource/ouds-flutter/issues/782))
Expand All @@ -24,6 +25,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed
- [Library] `Pin code input` Issue with Delete Functionality in the PIN Field ([#791](https://github.com/Orange-OpenSource/ouds-flutter/issues/791))
- [Library] `Pin code input` glitch when typing on keyboard ([#776](https://github.com/Orange-OpenSource/ouds-flutter/issues/776))
- [Library] `Pin code input` Focus should not move automatically to the next field ([#649](https://github.com/Orange-OpenSource/ouds-flutter/issues/649))
- [Library] `Pin code input` Remove the hint on the group of digits ([#628](https://github.com/Orange-OpenSource/ouds-flutter/issues/628))
- [Library] `Bottom Bar` Inconsistent order of the accessible ([#625](https://github.com/Orange-OpenSource/ouds-flutter/issues/625))
- [Library] `Bottom Bar` Overlap when zoom is activated ([#627](https://github.com/Orange-OpenSource/ouds-flutter/issues/627))
- [Library] `Password input` Label is truncated when zoom is applied ([#600](https://github.com/Orange-OpenSource/ouds-flutter/issues/600))
Expand Down
Loading
Loading