-
Notifications
You must be signed in to change notification settings - Fork 528
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
Fix part #376: Fraction input interaction view validation #419
Fix part #376: Fraction input interaction view validation #419
Conversation
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views # Conflicts: # app/src/main/res/layout/text_input_interaction_item.xml
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views # Conflicts: # app/src/main/res/layout/text_input_interaction_item.xml
… hi-fi-input-interaction-views
On click of input type interaction item, it requires two clicks to display keyboard, which should actually be just a single click. thus preventing scroll due to edit text focus
…ToPosition(0) in processEphemeralStateResult
…://github.com/oppia/oppia-android into hi-fi-input-interaction-views
…hould be larger than 7 digits."
@nikitamarysolomanpvt I have checked your last commits they look fine to me. I will need to defer to @veena14cs on this PR. |
LGTM |
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.
LGTM
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.
Thanks! This looks fantastic. Sorry for the long review--once my comments are addressed feel free to submit this.
Also, did you reach out to someone on the Oppia web team to discuss implementing the new 7-digit error on there? (FYI @seanlip).
app/src/main/java/org/oppia/app/parser/StringToFractionParser.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/answerhandling/InteractionAnswerErrorReceiver.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/state/listener/StateKeyboardButtonListener.kt
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.
LGTM, thanks
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.
LGTM
Explanation
Added validation for fraction input with error messages given below.
INVALID_CHARS = "Please only use numerical digits, spaces or forward slashes (/)"
INVALID_FORMAT = "Please enter a valid fraction (e.g., 5/3 or 1 2/3)"
DIVISION_BY_ZERO = "Please do not put 0 in the denominator"
For testing purpose make following change in code:
Launcher activity should be InputInteractionViewTestActivity
Design Doc
https://docs.google.com/document/d/1QigNdZeMBy-JjHW26QH4qT0UtCyzfvW0xEaStSdY9gM/edit#heading=h.2i0txgpugkgf
Reference
https://www.oppia.org/explore/rfX8jNkPnA-1?collection_id=4UgTQUc1tala
Checklist