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 part of #135: UI Structure:Topic player multiple tabs #230

Merged
merged 73 commits into from
Nov 6, 2019

Conversation

nikitamarysolomanpvt
Copy link
Contributor

@nikitamarysolomanpvt nikitamarysolomanpvt commented Oct 14, 2019

Explanation

fix #135

Mock

https://xd.adobe.com/spec/e2239cf4-9cde-4c08-5296-25316c1f0a14-9412/screen/0fad68f5-5ca4-4947-b8db-b4cf07235fd7/Topic-w-o-Play-19
To test this app, follow these steps:

  1. In AndroidManifest file make TopicActivity as launcher activity.

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.

… topic-player-multiple-tabs

# Conflicts:
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
#	app/src/main/res/values/styles.xml
@nikitamarysolomanpvt nikitamarysolomanpvt changed the title Topic player multiple tabs fix #135 :UI Structure:Topic player multiple tabs Oct 14, 2019
@nikitamarysolomanpvt
Copy link
Contributor Author

@BenHenning Please confirm the approach. Please do suggest the test case for multiple tabs.

@rt4914
Copy link
Contributor

rt4914 commented Oct 17, 2019

@nikitamarysolomanpvt
Revise title:

Fix #135 :UI Structure:Topic player multiple tabs

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.

LGTM.
Left some nit changes and add test-cases.

Also @BenHenning PTAL, basically can you verify this approach first so that @nikitamarysolomanpvt can start working on test-cases for this PR.

app/src/main/AndroidManifest.xml Outdated Show resolved Hide resolved
app/build.gradle Outdated Show resolved Hide resolved
@BenHenning BenHenning changed the title fix #135 :UI Structure:Topic player multiple tabs Fix #135: UI Structure:Topic player multiple tabs Oct 21, 2019
Copy link
Sponsor 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 @nikitamarysolomanpvt! Can you add test cases? E.g. it would be nice to see TopicFragment tests for each of the four tabs that:

  • Verify the presence of the tab
  • Verify navigating to the tab shows the correct content
  • Verify that a configuration change keeps the same tab open

And one test for verifying that the initial tab that's open by default is correct for a total of 13 tests.

@BenHenning BenHenning removed their assignment Oct 21, 2019
@veena14cs veena14cs removed their assignment Oct 23, 2019
@rt4914
Copy link
Contributor

rt4914 commented Oct 24, 2019

@nikitamarysolomanpvt Search for TODO(#135) in code which can be fixed in your PR.

Merge branch 'develop' of https://github.com/oppia/oppia-android into topic-player-multiple-tabs

# Conflicts:
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/org/oppia/app/player/state/StateFragmentPresenter.kt
#	domain/src/main/java/org/oppia/domain/exploration/ExplorationRetriever.kt
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.

LGTM

@rt4914 rt4914 removed their assignment Nov 5, 2019
@rt4914
Copy link
Contributor

rt4914 commented Nov 6, 2019

@nikitamarysolomanpvt Because of latest code merge your PR now has merge conflicts, please resolve them.

@nikitamarysolomanpvt
Copy link
Contributor Author

nikitamarysolomanpvt commented Nov 6, 2019

@nikitamarysolomanpvt Because of latest code merge your PR now has merge conflicts, please resolve them.

Merged with develop

Copy link
Sponsor 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 @nikitamarysolomanpvt--really solid tests!

app/src/main/java/org/oppia/app/topic/TopicActivity.kt Outdated Show resolved Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragment.kt Outdated Show resolved Hide resolved
app/src/main/java/org/oppia/app/topic/TopicTab.kt Outdated Show resolved Hide resolved
Copy link
Sponsor 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 @nikitamarysolomanpvt -- the PR generally LGTM, and I'm deferring on @rt4914 to verify that the specific concerns I brought up in my comments are addressed. Approving so that this can be checked in later today.

@nikitamarysolomanpvt
Copy link
Contributor Author

Thanks @nikitamarysolomanpvt -- the PR generally LGTM, and I'm deferring on @rt4914 to verify that the specific concerns I brought up in my comments are addressed. Approving so that this can be checked in later today.

I would like to make the new suggested changes in the #285. Because #285 is dependent on #230 as well as it is base branch of #285. If you want i can create issue on the same.

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.

LGTM, there are still nit change which needs to be fixed.

Also, I suggest before merging this PR mention one comment regarding what all work which was not finished in this PR, so that anyone going through this PR in future has clear context of our verbal conversations.

Sample:

  • Removing dummy button from home and linking TopicActivity to Topic items of HomeFragment.
  • Introducing TopicTestActivity and its corresponding presenter to load TopicFragment for a specific TOPIC_ID which will be used to test-code.
  • Transfer of TOPIC_ID from TopicFragment to ChildFragment is pending
  • If the TOPIC_ID and STORY_ID is present in TopicActivity then the UI should traverse to a specific STORY inside TopicPlayFragment

If you think something else is missing feel free to add that too.

app/src/main/java/org/oppia/app/topic/TopicActivity.kt Outdated Show resolved Hide resolved

override fun onAttach(context: Context?) {
super.onAttach(context)
fragmentComponent.inject(this)
}

override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return topicFragmentPresenter.handleCreateView(inflater, container)
topicId = arguments?.getString(TOPIC_ID_ARGUMENT_KEY) ?: TEST_TOPIC_ID_0
Copy link
Contributor

Choose a reason for hiding this comment

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

NOTE: TEST_TOPIC_ID_0 will be removed in either #285 or a separate PR. For now we need this successfully running the test-cases.

app/src/main/java/org/oppia/app/topic/ViewPagerAdapter.kt Outdated Show resolved Hide resolved
app/src/main/res/drawable/ic_overview_white_24dp.xml Outdated Show resolved Hide resolved
app/src/main/java/org/oppia/app/topic/TopicTab.kt Outdated Show resolved Hide resolved
@rt4914 rt4914 assigned nikitamarysolomanpvt and unassigned rt4914 Nov 6, 2019
@nikitamarysolomanpvt nikitamarysolomanpvt removed their assignment Nov 6, 2019
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.

LGTM.

@nikitamarysolomanpvt nikitamarysolomanpvt merged commit d127798 into develop Nov 6, 2019
@rt4914
Copy link
Contributor

rt4914 commented Nov 6, 2019

LGTM, there are still nit change which needs to be fixed.

Also, I suggest before merging this PR mention one comment regarding what all work which was not finished in this PR, so that anyone going through this PR in future has clear context of our verbal conversations.

Sample:

  • Removing dummy button from home and linking TopicActivity to Topic items of HomeFragment.
  • Introducing TopicTestActivity and its corresponding presenter to load TopicFragment for a specific TOPIC_ID which will be used to test-code.
  • Transfer of TOPIC_ID from TopicFragment to ChildFragment is pending
  • If the TOPIC_ID and STORY_ID is present in TopicActivity then the UI should traverse to a specific STORY inside TopicPlayFragment

If you think something else is missing feel free to add that too.

@nikitamarysolomanpvt I think you missed out on this comment before merging the PR.

@nikitamarysolomanpvt
Copy link
Contributor Author

Also, I suggest before merging this PR mention one comment regarding what all work which was not finished in this PR, so that anyone going through this PR in future has clear context of our verbal conversations.

Sample:

  • Removing dummy button from home and linking TopicActivity to Topic items of HomeFragment.
  • Introducing TopicTestActivity and its corresponding presenter to load TopicFragment for a specific TOPIC_ID which will be used to test-code.
  • Transfer of TOPIC_ID from TopicFragment to ChildFragment is pending
  • If the TOPIC_ID and STORY_ID is present in TopicActivity then the UI should traverse to a specific STORY inside TopicPlayFragment

If you think something else is missing feel free to add that too.

Sorry i missed this comment.
Adding a few more

  • If the TOPIC_ID and STORY_ID is present in TopicActivity then the UI should traverse to a specific STORY inside TopicPlayFragment and expand the item.
  • If the TOPIC_ID and STORY_ID is present in TopicActivity then the UI should traverse to a specific STORY inside TopicPlayFragment (resolved in Fix part 135: Topic issues fixes #285).

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: Topic activity/fragment
6 participants