Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Bloquer la saisie des caractères non numérique sur les NumberInput #1240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maximeperraultdev
Copy link
Collaborator

@maximeperraultdev maximeperraultdev commented Jun 20, 2024

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.39%. Comparing base (55930e1) to head (0b1df21).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1240   +/-   ##
=======================================
  Coverage   57.39%   57.39%           
=======================================
  Files          55       55           
  Lines         805      805           
  Branches      267      274    +7     
=======================================
  Hits          462      462           
+ Misses        343      327   -16     
- Partials        0       16   +16     
Flag Coverage Δ
unit 57.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maximeperraultdev maximeperraultdev force-pushed the maxime/feat/changing_number_input branch from 8b72e1c to c47a827 Compare June 20, 2024 10:19
Copy link
Member

@ivangabriele ivangabriele left a comment

Choose a reason for hiding this comment

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

On ne peut pas entrer de nombre flottant. Peut-être que decimal le permet je n'ai pas vérifié.

@@ -119,11 +96,11 @@ export function NumberInput({
$isTransparent={isTransparent}
disabled={disabled}
id={name}
onBlur={handleBlur}
inputMode="numeric"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
inputMode="numeric"
inputMode="decimal"

@maximeperraultdev maximeperraultdev force-pushed the maxime/feat/changing_number_input branch 2 times, most recently from 108174d to cacaff8 Compare June 20, 2024 15:16
@ivangabriele
Copy link
Member

ivangabriele commented Jun 21, 2024

@maximeperraultdev Une fois que tu auras rebased tu auras de nouveau une erreur de commitlint parce que j'ai enforced les scopes sur les feat/fix/style pour conserver des release notes cleans. C'est assez logique normalement car ça suit tout simplement le nom des dossiers src/.

=> fix(fields): forbid non-decimal input in NumberInput

C'est le style que je tente de faire suivre, un verbe + le nom du/des composants concernés.

@maximeperraultdev maximeperraultdev force-pushed the maxime/feat/changing_number_input branch from cacaff8 to 0b1df21 Compare June 27, 2024 08:55
Copy link

sonarcloud bot commented Oct 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants