Skip to content

feat(pinCodeInput): add optional keyboardType (numeric/alphanumeric)#734

Merged
AhmedAmineZr merged 4 commits into
Orange-OpenSource:developfrom
theamiri:733-pin-code-input-keyboard-type-option
May 8, 2026
Merged

feat(pinCodeInput): add optional keyboardType (numeric/alphanumeric)#734
AhmedAmineZr merged 4 commits into
Orange-OpenSource:developfrom
theamiri:733-pin-code-input-keyboard-type-option

Conversation

@theamiri
Copy link
Copy Markdown
Contributor

@theamiri theamiri commented May 7, 2026

Related issues

Closes #733

Description

Adds an optional keyboardType parameter on OudsDigitInputDecoration, exposed publicly via a new enum OudsPinCodeInputKeyboardType with two values: numeric (default) and alphanumeric.

  • When set to numeric, the per-digit TextField requests TextInputType.number and rejects non-digit input via FilteringTextInputFormatter.digitsOnly. The paste handler in OudsPinCodeInput also sanitizes the incoming string to digits only before populating the cells.
  • When set to alphanumeric, the field requests TextInputType.text and accepts any character (typed or pasted).

The default is numeric, so existing call sites are unaffected. The demo app exposes the option as a chip group in the PIN code input customization sheet, the code generator emits the parameter only when non-default, and the new label is localized in EN / FR / AR.

Motivation & Context

The PIN code input was hard-wired to TextInputType.number with no input formatter, so the soft keyboard was always digits-only but the component silently accepted non-digit input via paste or a hardware keyboard. Some flows reusing this component need short alphanumeric verification or recovery codes; today they fall back to a plain OudsTextInput and lose the per-digit cell layout, focus shifting, masking, and design system styling. This change closes both gaps with a single optional parameter.

Types of change

  • New feature (non-breaking change which adds functionality)

Previews

Checklist

Contribution

Accessibility

  • My change follows accessibility good practices

Design

  • My change respects the design guidelines of Orange Unified Design System

Development

  • My change follows the developer guide
  • (NA) I have added unit tests to cover my changes (optional)

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • Manually test (dark mode, RTL, landscape display, tablet)
  • Documentation has been updated if relevant
  • Design review
  • A11y review
  • Internal files have been updated if relevant (THIRD_PARTY, NOTICE)
  • CHANGELOG.md files have been updated respecting keep a changelog rules and referencing the issue

Copy link
Copy Markdown
Member

@AhmedAmineZr AhmedAmineZr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update changelog with number of ticket and update the branch

@AhmedAmineZr AhmedAmineZr added 📖 documentation Improvements or additions to documentation 🧩 enhancement New feature or request ⚛️ component 📱 demo app labels May 8, 2026
@AhmedAmineZr AhmedAmineZr requested a review from nouha06 May 8, 2026 10:35
abdelghafour amiri added 2 commits May 8, 2026 12:02
# Conflicts:
#	ouds_core/lib/components/pin_code_input/digit_input/ouds_digit_input.dart
@theamiri theamiri force-pushed the 733-pin-code-input-keyboard-type-option branch from 67a5881 to fd015b0 Compare May 8, 2026 11:03
@theamiri
Copy link
Copy Markdown
Contributor Author

theamiri commented May 8, 2026

Hi,

The two PRs are already open in Orange-OpenSource/ouds-flutter:

Both target develop, both have the CHANGELOG entry, both are now mergeable after the rebase you asked for.

What you're probably seeing is that the source branches live on my fork (theamiri/ouds-flutter) — that's because my account only has read access on the org repo (verified: permissions: { pull: true, push: false }), so GitHub's standard external-contributor flow is "branch on fork → PR upstream". The PRs themselves are in your repo and behave exactly like internal ones for review and merge.

If you'd prefer the branches to live directly inside Orange-OpenSource/ouds-flutter, you'd need to grant me Write/Triage on the repo and I'll push them over. Otherwise there's nothing else to create — let me know if I'm missing something.

Thanks,
Amir

Comment thread app/lib/l10n/ouds_flutter_ar.arb Outdated
Comment thread app/lib/l10n/ouds_flutter_fr.arb Outdated
@AhmedAmineZr AhmedAmineZr merged commit b7b8dc6 into Orange-OpenSource:develop May 8, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚛️ component 📱 demo app 📖 documentation Improvements or additions to documentation 🧩 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Component] PinCodeInput: optional keyboardType (numeric / alphanumeric)

3 participants