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

Fix #377: Control submit button #418

Closed
wants to merge 4 commits into from
Closed

Conversation

rt4914
Copy link
Contributor

@rt4914 rt4914 commented Nov 19, 2019

Explanation

This PR controls the styling of "Submit " button.

  1. If answer is not entered -> Submit button is inactive. (Though this UI of inactive submit button does not match with mocks, but this was discussed with Chantel to make this similar to Start button of TopicTrainTab)

Screenshot 2019-11-19 at 6 12 45 PM

  1. If answer is entered -> Submit button is active.

Screenshot 2019-11-19 at 6 12 59 PM

Also, I have found one issue while working on this PR which has been mentioned in #417

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

Copy link
Contributor

@nikitamarysolomanpvt nikitamarysolomanpvt left a comment

Choose a reason for hiding this comment

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

small

While the input is empty submit button should be active color?

Copy link
Contributor

@nikitamarysolomanpvt nikitamarysolomanpvt left a comment

Choose a reason for hiding this comment

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

PTAL on the comment

@nikitamarysolomanpvt nikitamarysolomanpvt removed their assignment Nov 19, 2019
@BenHenning
Copy link
Member

Could we address this via data binding and the top level view model, instead? See https://github.com/oppia/oppia-android/blob/develop/app/src/main/java/org/oppia/app/player/state/StateViewModel.kt#L33

We ought to not have classes directly depend their parents. We could use listeners to indirect this, but there may be a cleaner reactive solution possible.

import org.oppia.app.player.state.answerhandling.InteractionAnswerHandler
import org.oppia.app.player.state.answerhandling.InteractionAnswerReceiver

/** ViewModel for multiple or item-selection input choice list. */
class SelectionInteractionViewModel(
val explorationId: String, interaction: Interaction, private val interactionAnswerReceiver: InteractionAnswerReceiver,
existingAnswer: InteractionObject?, val isReadOnly: Boolean
existingAnswer: InteractionObject?, val isReadOnly: Boolean, @Suppress("UNUSED_PARAMETER") stateFragmentPresenter: StateFragmentPresenter
Copy link
Contributor

Choose a reason for hiding this comment

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

use cmd+option+L to wrap this.

Copy link
Contributor

@veena14cs veena14cs left a comment

Choose a reason for hiding this comment

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

Please update this code with latest develop as there are too many changes.

@rt4914
Copy link
Contributor Author

rt4914 commented Jan 22, 2020

Closing this PR as this will be done once temp-integration-pt-3 code is in develop.

@rt4914 rt4914 closed this Jan 22, 2020
@rt4914 rt4914 deleted the control-submit-button branch January 22, 2020 05:46
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.

4 participants