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

Fixes #160: Integrating topic controller into Concept Card #198

Merged
merged 19 commits into from
Oct 11, 2019

Conversation

jamesxu0
Copy link
Contributor

Explanation

Fixes #160: Integrates the topic controller into Concept Card. Concept Card uses data binding to bind the explanation and worked examples into text views (blocked on #26). Uses the binable recyclerview introduced in PR #172, which has not been merged yet.

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 assigned to an appropriate reviewer.

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @jamesxu0! Generally this LGTM. I think you're blocked on #172 being submitted first, though, so I'll prioritize that work.

@BenHenning BenHenning assigned jamesxu0 and unassigned BenHenning Oct 1, 2019
@jamesxu0 jamesxu0 changed the base branch from develop to introduce-data-binding-recycler-view-adapter October 1, 2019 22:25
@jamesxu0
Copy link
Contributor Author

jamesxu0 commented Oct 3, 2019

@BenHenning PTAL. Add test cases for ConceptCard using ActivityTestRule (for screen rotation).

@jamesxu0 jamesxu0 assigned BenHenning and unassigned jamesxu0 Oct 3, 2019
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Ah, I think that the base branch is a bit behind develop. I'll prioritize finishing that work tonight and then this PR can be updated to base off of develop to simplfiy the review.

Passing this back over to you @jamesxu0 to update the base branch once #172 is merged in.

@@ -0,0 +1,551 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="305dp"
Copy link
Member

Choose a reason for hiding this comment

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

@BenHenning BenHenning assigned jamesxu0 and unassigned BenHenning Oct 4, 2019
Conflicts:
	app/build.gradle
	app/src/main/AndroidManifest.xml
	app/src/main/java/org/oppia/app/activity/ActivityComponent.kt
	app/src/main/java/org/oppia/app/fragment/FragmentComponent.kt
	app/src/main/java/org/oppia/app/player/audio/AudioFragment.kt
@jamesxu0 jamesxu0 changed the base branch from introduce-data-binding-recycler-view-adapter to develop October 4, 2019 19:37
@jamesxu0
Copy link
Contributor Author

jamesxu0 commented Oct 8, 2019

@BenHenning PTAL. I merged in the bindable recyclerview to this branch again, so only my changes show in the diff.

@jamesxu0 jamesxu0 assigned BenHenning and unassigned jamesxu0 Oct 8, 2019
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @jamesxu0! I only had one concern around the configuration testing, but otherwise this LGTM!

@Test
fun testConceptCardFragment_openDialogFragmentWithSkill2_afterConfigurationChange_workedExamplesAreDisplayed() {
onView(withId(R.id.open_dialog_2)).perform(click())
activityTestRule.activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
Copy link
Member

Choose a reason for hiding this comment

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

Does this work as-is or do you also need to call recreate on the activity scenario? Did you verify via step debugging that the activity is recreated? Please update test accordingly to make sure that it does go through the rotation as expected.

@BenHenning BenHenning assigned jamesxu0 and unassigned BenHenning Oct 9, 2019
@jamesxu0 jamesxu0 merged commit f1ec4bf into develop Oct 11, 2019
@jamesxu0 jamesxu0 deleted the concept-card-topic-controller branch October 11, 2019 22:25
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.

UI Structure: ConceptCardFragment
2 participants