-
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
[Feature Request]: Disable the submit button until an answer option is selected or an answer is typed #5070
Comments
can I work on this issue? |
Hi @adityabarodiya, thanks for your interest in contributing at oppia-android. This issue requires a bit of context about interactions in the app, and I would suggest you start with a good first issue to farmiliarize. Could you please look at this: #3930 |
I think we need clarity from the product team here. The current the app already keeps the submit button disabled until an answer is selected. Should we be enabling it and then showing the requested errors for each interaction type if the submit button is clicked without an answer being entered? |
@seanlip could you please provide context? |
Yup, the plan is to enable the button and show the requested errors for each interaction type if the submit button is clicked without an answer being entered. However, I'm going to adjust the impact of this to "low" since it looks like the button is already disabled until an answer is selected (so this is not as big an issue as it seems to have been before). I think in the longer run, it would be good for this to match the behaviour on Web: oppia/oppia#18379. The reason for this is that it is helpful to show a message to instruct the learner on what to do, but we can't do this when clicking on a disabled button for accessibility reasons (see oppia/design-team#71 (comment)). So this seemed like the best option. |
I created a draft PR #5197 for a single interaction: fraction interaction. It contains a demo with the UI changes. Please review and let me know if the direction is good; I will then finalize the PR with tests. |
… button enabled when answer is empty. (#5224) Fix part of #5070: In FractionInteraction UI, leave submit button enabled when answer is empty. Show an error on submitting an empty answer. The error message already exists and is the same as in oppia/oppia#18379. Demo video: [leave_submit_button_enabled_on_empty_answer_v3.webm](https://github.com/oppia/oppia-android/assets/103062089/d072ae88-c462-455c-a324-57680d4a82c5) The new error messages for empty inputs on submit are listed here: [oppia/design-team#71(comment)](oppia/design-team#71 (comment)) I added an accessibility-label exemption for FractionInputInteractionViewTestActivity as this activity is only used in tests. Fix #4135: incidentaly, this change also fixes #4135, since I had to split the tests for FractionInputInteraction ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
…ction (#5263) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5070 Enables the `submit_answer_button` when the pending answer is empty. Instead of disabling the button, an error message, stating "_**Enter a ratio to continue.**_", is now displayed when the user attempts to submit a blank answer. `RatioInputInteractionViewTestActivity` is added to accessibility-label exemption as this is a test activity. https://github.com/oppia/oppia-android/assets/84731134/33c797c5-af44-4eaa-980e-fafaccf72d26 ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
Continuing with |
I would like to work on Text input. |
Continuing with Selection Input which includes both |
Working on Click on image. |
Working on MathExpressionInteractionsView, which includes Math equation, Algebraic expression, Numeric expression. |
Continuing with |
Going with Number with units |
…action (#5310) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5070 Enables the `submit_answer_button` when the pending answer is empty. Instead of disabling the button, an error message, stating "_**Enter a number to continue.**_", is now displayed when the user attempts to submit a blank answer. https://github.com/oppia/oppia-android/assets/84731134/820021bb-94bb-432f-b545-e3bc89e49e17 ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
Can anybody help me find the topic where |
Hi @Vishwajith-Shettigar, I did a bit of searching in the codebase. I believe NumberWithUnitsInteractionView is not yet implemented in the app as per issue #30. |
Great finding, thank you. |
…ion (#5319) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5070 Enables the `submit_answer_button` when the pending answer is empty. Instead of disabling the button, an error message, stating "_**Choose an answer to continue.**_", is now displayed when the user attempts to submit without selecting any input. https://github.com/oppia/oppia-android/assets/84731134/ba918fb9-5857-4daf-b851-8645791e1acb ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing
…ction (#5316) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation Fix part of #5070, In Image interaction UI, leave submit button enabled when answer is empty. Show an error on submitting an empty answer. [image_blank_input.webm](https://github.com/oppia/oppia-android/assets/76042077/51d5f2d6-03c1-468b-aed0-0fc75560ac48) ([Grammar error](b944f99#:~:text=Select%20an%20image%20to%20continue) fixed ) <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [ ] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [ ] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [ ] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [ ] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [ ] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [ ] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
…tion (#5311) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation Fixes part of #5070, In TextInteraction UI, leave submit button enabled when answer is empty. Show an error on submitting an empty answer. Created own test suite for text input interaction view. [text_input.webm](https://github.com/oppia/oppia-android/assets/76042077/a5882904-8152-4422-b9c9-c937cb056dd5) <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [ ] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [ ] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [ ] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [ ] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [ ] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [ ] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing
…input interac…" This reverts commit 59a41ab.
…nput interaction. (#5317) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation Fix part of #5070, In Math expressions Interaction UI, leave submit button enabled when answer is empty. Show an error on submitting an empty answer. MathExpressionInteractionsViewTestActivity added to accessibility_label_exemptions and test_file_exemptions files. ### Numeric expression [numerix_expression.webm](https://github.com/oppia/oppia-android/assets/76042077/ce7e3e2a-e209-4197-ac3b-4a4ab281ac53) ### Algebraic expression [algebraic_expression.webm](https://github.com/oppia/oppia-android/assets/76042077/62222fe4-9cef-49cf-a86d-d74a0908d0a0) ### Math equation [math_equation.webm](https://github.com/oppia/oppia-android/assets/76042077/fb097e88-c8b2-4159-bdcf-2b4e64386d78) <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing
@seanlip, FYI for product--this issue has been addressed with the exception of number with units, which we currently don't have in the app. |
…nteraction (#5323) <!-- READ ME FIRST: Please fill in the explanation section below and check off every point from the Essential Checklist! --> ## Explanation <!-- - Explain what your PR does. If this PR fixes an existing bug, please include - "Fixes #bugnum:" in the explanation so that GitHub can auto-close the issue - when this PR is merged. --> Fixes part of #5070 Enables the `submit_answer_button` when the pending answer is empty. Instead of disabling the button, an error message, stating "_**Arrange the boxes to continue.**_", is now displayed when the user attempts to submit without arranging the boxes. https://github.com/oppia/oppia-android/assets/84731134/c0083266-8641-414a-b14d-de662123d4a2 ## Essential Checklist <!-- Please tick the relevant boxes by putting an "x" in them. --> - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only <!-- Delete these section if this PR does not include UI-related changes. --> If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Adhiambo Peres <[email protected]>
This has been fully implemented except Moving to backlog. |
Marking as complete because we don't have number with units yet. |
Is your feature request related to a problem? Please describe.
We've received some learner feedback that:
Describe the solution you'd like
We plan to disable the Submit button until an answer/response is selected and provide "help text" to instruct the learner on what to do. Once the learner modifies the answer field, the Submit button should become active again.
Please see the Mock up and the Figma file created by @Himali07, as well as this design thread comment for all the error messages.
This issue can be collaborated on by multiple contributors, by updating one interaction at a time. Here is the list of interactions:
Number with units (e.g. 4 km)
Fraction input @masclot in Fix #4135, Fix part of #5070: In FractionInteraction UI, leave submit button enabled when answer is empty. #5224
Ratio input @theMr17 in Fix part of #5070: Display empty answer message in ratio input interaction #5263
Checkbox input @theMr17 Fix part of #5070: Display empty answer message in selection interaction #5319
Multiple choice input @theMr17 Fix part of #5070: Display empty answer message in selection interaction #5319
Math equation (e.g. 2x + 3y = 5) @Vishwajith-Shettigar Fix part of #5070: Display empty answer message in Math expressions input interaction. #5317
Algebraic expression (e.g. 2x + 3y) @Vishwajith-Shettigar Fix part of #5070: Display empty answer message in Math expressions input interaction. #5317
Number input @theMr17 Fix part of #5070: Display empty answer message in number input interaction #5310
Numeric expression (e.g. 5 + 2) @Vishwajith-Shettigar Fix part of #5070: Display empty answer message in Math expressions input interaction. #5317
Text input @Vishwajith-Shettigar Fix part of #5070: Display empty answer message in text input interaction #5311
Click on image @Vishwajith-Shettigar Fix part of #5070: Display empty answer message in image click interaction #5316
Drag-and-drop sort @theMr17 Fix part of #5070: Display empty answer message in drag & drop sort interaction #5323
The text was updated successfully, but these errors were encountered: