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 #379: Collapse past wrong answers #412

Merged
merged 15 commits into from
Nov 26, 2019
Merged

Conversation

BenHenning
Copy link
Member

Fix #379.

This change collapses past submitted answers to an expandable bar similar to Oppia web, and tracks the number of wrong answers currently submitted, minus the most recent one (which may be correct). I tried mimicking the exact behavior around when the list re-expands/collapses based on navigating to/from states, and submitting new answers. It's probably worth checking out the branch and playing with it.

There is no mock for this, but I followed @mschanteltc's guidance via chat on text type, size, and color. Otherwise, I tried mimicking the Oppia web version with some small tweaks to make it a bit more Android-esque.

There are no new tests for this, but those should be done as part of #388.

This splits the adapter into two: one for single-type recycler views,
and another for multi-type recycler views. The latter has also been
updated to require an enum for typing rather than an integer to ensure
type safety. Per existing usages, we may want to switch this to a KClass
in the future since it seems like we typically convert from class type
to enum, anyway.
version of the interaction with a normalized version of the answer.
UserAnswer and submitted answer item replaces this mechanism.
@BenHenning BenHenning changed the base branch from develop to shorten-submitted-answers November 19, 2019 04:53
@BenHenning BenHenning changed the title Fix #379: Collapse past wrong answers Fix #379: Collapse past wrong answers [Blocked: #410] Nov 19, 2019
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

This new implementation looks really good and improves the UX a lot. Awesome work.

@rt4914 rt4914 assigned BenHenning and unassigned rt4914 Nov 19, 2019
Conflicts:
	app/src/main/java/org/oppia/app/topic/conceptcard/ConceptCardFragmentPresenter.kt
…-answers

Conflicts:
	app/src/main/res/layout/fraction_interaction_item.xml
	app/src/main/res/layout/numeric_input_interaction_item.xml
	app/src/main/res/layout/text_input_interaction_item.xml
Conflicts:
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/ContinueInteractionViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/FractionInteractionViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/NumericInputViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/SelectionInteractionViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/StateItemViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/TextInputViewModel.kt
…wers

Conflicts:
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/StateItemViewModel.kt
Copy link
Contributor

@jamesxu0 jamesxu0 left a comment

Choose a reason for hiding this comment

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

LGTM. Good UI improvements!

@jamesxu0 jamesxu0 removed their assignment Nov 21, 2019
Conflicts:
	app/src/main/java/org/oppia/app/testing/InputInteractionViewTestActivity.kt
	app/src/main/res/layout/item_selection_interaction_items.xml
	app/src/main/res/layout/multiple_choice_interaction_items.xml
Conflicts:
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/ContinueInteractionViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/FractionInteractionViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/InteractionViewModelModule.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/NumericInputViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/SelectionInteractionContentViewModel.kt
	app/src/main/java/org/oppia/app/player/state/itemviewmodel/TextInputViewModel.kt
	app/src/main/java/org/oppia/app/testing/InputInteractionViewTestActivity.kt
@BenHenning BenHenning changed the base branch from shorten-submitted-answers to develop November 26, 2019 08:44
@BenHenning
Copy link
Member Author

Thanks!

@BenHenning BenHenning changed the title Fix #379: Collapse past wrong answers [Blocked: #410] Fix #379: Collapse past wrong answers Nov 26, 2019
@BenHenning BenHenning merged commit ebf9e46 into develop Nov 26, 2019
@BenHenning BenHenning deleted the collapse-past-wrong-answers branch November 26, 2019 17:35
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.

Past answers should be collapsed
3 participants