-
Notifications
You must be signed in to change notification settings - Fork 510
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
Conversation
… topic-player-multiple-tabs # Conflicts: # app/build.gradle # app/src/main/AndroidManifest.xml # app/src/main/res/values/styles.xml
@BenHenning Please confirm the approach. Please do suggest the test case for multiple tabs. |
@nikitamarysolomanpvt
|
There was a problem hiding this 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/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
@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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
app/src/main/java/org/oppia/app/topic/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
@nikitamarysolomanpvt Because of latest code merge your PR now has merge conflicts, please resolve them. |
Merged with develop |
There was a problem hiding this 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/TopicFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/TopicFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/TopicFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/TopicFragmentTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
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. |
There was a problem hiding this 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
toTopic
items ofHomeFragment
. - Introducing
TopicTestActivity
and its corresponding presenter to loadTopicFragment
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 insideTopicPlayFragment
If you think something else is missing feel free to add that too.
|
||
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 |
There was a problem hiding this comment.
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/sharedTest/java/org/oppia/app/topic/TopicFragmentTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@nikitamarysolomanpvt I think you missed out on this comment before merging the PR. |
Sorry i missed this comment.
|
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:
AndroidManifest
file makeTopicActivity
as launcher activity.Checklist