-
Notifications
You must be signed in to change notification settings - Fork 499
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 #3487: Make changes to UI to indicate partial progress of explorations. #3500
Conversation
@rt4914 where can I get this icon to represent partial progress? |
@aggarwalpulkit596 Can you please review these changes. |
Now the recently played chapter means chapters that are marked started_not_completed, in_progress_saved and in_progress_not_saved instead of just started_not_completed. There were a lot of functions in
The functions and their tests (present in |
@@ -173,12 +173,50 @@ class RecentlyPlayedFragmentTest { | |||
} | |||
|
|||
@Test | |||
fun testRecentlyPlayedTestActivity_defaultRecentlyPlayedToolbarTitleIsDisplayed() { |
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.
This test was incorrectly passing on robolectic and was failing on espresso.
Title on RecentlyPlayedActivtiy changes depending upon the chapters played. But it takes time to update the title. Adding delay after launching the activity makes this test fail on robolectric too.
This test is now passing.
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 will email @mschanteltc for this. |
chapterInProgressArcPaint.color = | ||
ContextCompat.getColor(context, R.color.oppiaProgressChapterInProgress) | ||
|
||
chapterNotStartedArcPaint = Paint(Paint.ANTI_ALIAS_FLAG) |
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.
Can we move it to helper function since this is being written here twice?
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.
This makes it consistent with chapterFinishedArcPaint
. Doing these two with a helper function and chapterFinishedArcPaint
without a helper function might be slightly misleading.
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.
WDYT?
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.
Since that is also using a similar process i would suggest moving both of them to a helper function.
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.
done
@@ -109,12 +124,20 @@ class SegmentedCircularProgressView : View { | |||
canvas.drawArc(baseRect!!, startAngle, sweepAngle, false, chapterFinishedArcPaint) |
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.
can we use lateinit instead of making it nullable?
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.
done
val inProgressChapterCount = | ||
chapterSummaries.map(ChapterSummary::getChapterPlayState) | ||
.filter { | ||
Log.d("12345", "bindTopicLessonStorySummary: chapter is marked $it") |
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.
Cleanup logs
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.
done
For now, this PR uses the |
I will take a look at this tomorrow. |
Deferring to @aggarwalpulkit596 for approval before I take a look at codeowners. |
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 @MaskedCarrot
Left nit thoughts.
app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/topic/lessons/TopicLessonsFragmentTest.kt
Outdated
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Show resolved
Hide resolved
testing/src/test/java/org/oppia/android/testing/story/StoryProgressTestHelperTest.kt
Show resolved
Hide resolved
@MaskedCarrot I have done following steps and still I am unable to check this implementation.
After these steps I ran the app on emulator
Unable to see any partial-progress icon. Also when I open the exploration again it starts from first state. |
@rt4914 I missed specifying that isCheckpointingEnabled and shouldSavePartialProgress will only have to be changed in topicLessonsFragmentPresenter. I have updated the PR description now. |
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, thanks.
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.
Code owner file LGTM.
Could you please add the Espresso test result screenshot of all the test file in this PR? @MaskedCarrot
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 @MaskedCarrot. Just a couple of follow-ups, otherwise this PR LGTM.
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Outdated
Show resolved
Hide resolved
testing/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
Outdated
Show resolved
Hide resolved
domain/src/test/java/org/oppia/android/domain/topic/TopicListControllerTest.kt
Outdated
Show resolved
Hide resolved
@BenHenning PTAL |
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 @MaskedCarrot. This LGTM!
Explanation
Fixes #3487
Checklist
Espresso Tests
RecentlyPlayedFragmentTest
TopicLessonsFragmentTest
Steps to see these changes or a real/emulator device
shouldSavePartialProgress
andisCheckpointingEnabled
to true in TopicLessonsFragmentPresenter or replace topicLessonsFragmentPresneter with this file.