-
Notifications
You must be signed in to change notification settings - Fork 527
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 #42: Exploration player base (Part 1) #42 #100
Conversation
@veena14cs @nikitamarysolomanpvt @BenHenning PTAL. Also, @veena14cs @nikitamarysolomanpvt use this branch as base branch for your subsequent work on exploration-player. |
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 @rt4914! Generally LGTM, but I had one concern around the fake data. Other than that, can you also add the initial tests for the exploration activity so that we have a place to add more as the activity grows? At some point, we need to figure out how to divide activity and fragment specific tests, but for now we can just keep UI tests activity-specific.
import com.squareup.moshi.Moshi | ||
import org.oppia.data.backends.gae.model.GaeExplorationContainer | ||
|
||
// Remove this file at later stage once domain and model module are working. |
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.
I actually think we should be faking data at a higher level than this (e.g. in domain logic controllers). We should spec out those interfaces and submit them with stubs that return structured fake data, then directly rely on those for the UI.
What fake data do we need for this PR? Can we just check in the structure and hook up to domain controllers in a subsequent PR?
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.
Actually, I created this file but we are not using it anywhere, so we can remove this right now.
But still there is one issue, we will be using models which are present in data
module like GaeSubtitledHtml
GaeState
etc. in subsequent PRs and as far as I understand the Technical Document, we should not be interacting directly with data
module from app
module. So for that case I think domain
module will need something similar to models defined in data
module.
Any comments or suggestions on this?
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.
If this is for testing purposes, we can use the mock GAE services directly in tests to influence the data returned by domain controllers. We can extend those services to actually set up state rather than returning the same fixed data.
If this isn't for tests, app code does not need to rely on GaeSubtitledHtml, etc. since it will receive data via the domain layer defined in the model module (see how topic list data is piped in #106).
Does this help clarify?
app/src/main/java/org/oppia/app/player/exploration/ExplorationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/exploration/ExplorationActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/exploration/ExplorationActivityController.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/exploration/ExplorationFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/player/exploration/ExplorationFragmentController.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.
Made changes related to all the files. (Test cases are pending)
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 @rt4914! This LGTM. Once my last few comments are resolved, feel free to submit.
app/src/sharedTest/java/org/oppia/app/player/exploration/ExplorationActivityTest.kt
Outdated
Show resolved
Hide resolved
import com.squareup.moshi.Moshi | ||
import org.oppia.data.backends.gae.model.GaeExplorationContainer | ||
|
||
// Remove this file at later stage once domain and model module are working. |
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.
If this is for testing purposes, we can use the mock GAE services directly in tests to influence the data returned by domain controllers. We can extend those services to actually set up state rather than returning the same fixed data.
If this isn't for tests, app code does not need to rely on GaeSubtitledHtml, etc. since it will receive data via the domain layer defined in the model module (see how topic list data is piped in #106).
Does this help clarify?
LGTM |
@BenHenning Check the error related to test cases. |
Ack, will follow up with a fix. Thanks for pointing this out. |
#131 is now out for review, so sending this back to you to merge once ready. |
This PR can be merged now and everything has been clarified in respective comments. |
Merging this code now. |
Explanation
This PR contains basic activities/fragment structure for exploration player. Currently the controllers are not functional which will be covered in subsequent PRs. Also this PR also contains one class for
FakeDataProvider
, this class is for couple of PRs only and later on it can be removed oncedomain
/model
layers are finishedProject structure:
Checklist