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: Add tooltip for wrong decimal format in Text Entry #400

Merged
merged 11 commits into from
Jun 10, 2024

Conversation

taopkorczak
Copy link
Contributor

Related to: https://oat-sa.atlassian.net/browse/TR-6116

When the Text Entry input field is blurred:

A red border to the input is displayed.

A tooltip is displayed above the input, mentioning the accepted number format for the input (adapted for configured decimalSeparator and thousandsSeparator), for example Invalid value, use . (dot) for decimal point and , (comma) for thousands separator.
Zrzut ekranu 2024-05-22 o 08 02 02
Zrzut ekranu 2024-05-22 o 08 02 36
The value is still truncated if submitted as an invalid value.

Copy link

github-actions bot commented May 22, 2024

Coverage Report

Totals Coverage
Statements: 67.41% ( 9157 / 13585 )
Methods: 69.48% ( 1054 / 1517 )
Lines: 71.9% ( 5436 / 7561 )
Branches: 59.17% ( 2667 / 4507 )

StandWithUkraine

Copy link
Contributor

@olga-kulish olga-kulish left a comment

Choose a reason for hiding this comment

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

Cool idea to check that it's actually a 'thousand' (3 digits)!

@taopkorczak taopkorczak requested a review from olga-kulish May 22, 2024 18:11
@taopkorczak taopkorczak requested a review from olga-kulish May 27, 2024 07:11
@taopkorczak taopkorczak requested a review from olga-kulish May 27, 2024 10:18
@taopkorczak taopkorczak requested a review from olga-kulish June 3, 2024 06:47
Copy link
Contributor

@olga-kulish olga-kulish left a comment

Choose a reason for hiding this comment

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

Works nicely.

But unit tests are failing, please fix them.
Would be nice to add a test for these changes too, unless it's difficult.

PS: Don't forget to npm i/npm run build before npm run test, otherwise code changes won't be applied.

Copy link

github-actions bot commented Jun 5, 2024

Version

Target Version 2.3.0
Last version 2.2.3

There are 0 BREAKING CHANGE, 1 feature, 9 fixes

@olga-kulish olga-kulish self-requested a review June 5, 2024 17:09
@taopkorczak taopkorczak merged commit 730898f into develop Jun 10, 2024
1 of 3 checks passed
@taopkorczak taopkorczak deleted the feature/TR-6116/decimal-validation branch June 10, 2024 08:28
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.

2 participants