-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
There was a problem hiding this 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)!
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
src/qtiCommonRenderer/renderers/interactions/TextEntryInteraction.js
Outdated
Show resolved
Hide resolved
…a/tao-item-runner-qti-fe into feature/TR-6116/decimal-validation
Version
There are 0 BREAKING CHANGE, 1 feature, 9 fixes |
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.
The value is still truncated if submitted as an invalid value.