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 #137: Topic-play-tab low-fi (part-1) (Without expandable list) #260

Merged
merged 10 commits into from
Oct 24, 2019

Conversation

rt4914
Copy link
Contributor

@rt4914 rt4914 commented Oct 23, 2019

Explanation

This PR corresponds to the Topic-Play-Tab in Topic.

PENDING

  1. Currently the RecyclerView in this PR does not support ExpandableList which displays all the chapter names. This will be done in next PR.

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.

@rt4914
Copy link
Contributor Author

rt4914 commented Oct 23, 2019

@BenHenning This PR includes Topic-Play-Tab. In this I am stuck on one thing, their is progress associated with each story, but I am not able to find any function that I can use from StorySummary to get the progress of the story. You have implemented the StoryProgress also but in that exactly what I can use to get the story progress percentage.

For now I have directly kept progress value as 55 in xml files.

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 @rt4914, this LGTM as a start. Two things:

  1. Please don't block on Fixes #166: Story activity UI structure #195. Feel free to check in a skeleton empty StoryActivity (in the place @hareshkh is implementing it so that it conflicts/his replaces it in-place) to unblock UI Structure: Topic activity/fragment #135 work

  2. I believe you can compute progress using the chapter summaries within the story summary since they have reported completion statuses. Something like the following should work:

val storySummary = ...
val totalChapterCount = storySummary.chapterCount
val chapterSummaries = storySummary.chapterList
val completedChapterCount =
  chapterSummaries.map(ChapterSummary::getPlayability)
    .filter { it == ChapterSummary.Playability.COMPLETED }
    .size

I suggest making this in a subsequent PR to keep this PR unblocked.

@BenHenning BenHenning assigned rt4914 and unassigned BenHenning Oct 24, 2019
@rt4914
Copy link
Contributor Author

rt4914 commented Oct 24, 2019

Thanks @rt4914, this LGTM as a start. Two things:

  1. Please don't block on Fixes #166: Story activity UI structure #195. Feel free to check in a skeleton empty StoryActivity (in the place @hareshkh is implementing it so that it conflicts/his replaces it in-place) to unblock UI Structure: Topic activity/fragment #135 work

Introduced StoryActivity as per suggestion.

  1. I believe you can compute progress using the chapter summaries within the story summary since they have reported completion statuses. Something like the following should work:
val storySummary = ...
val totalChapterCount = storySummary.chapterCount
val chapterSummaries = storySummary.chapterList
val completedChapterCount =
  chapterSummaries.map(ChapterSummary::getPlayability)
    .filter { it == ChapterSummary.Playability.COMPLETED }
    .size

I suggest making this in a subsequent PR to keep this PR unblocked.

Will finish this in a separate PR.

@rt4914
Copy link
Contributor Author

rt4914 commented Oct 24, 2019

All comments have been addressed and solved accordingly. Merging this PR now.

@rt4914 rt4914 merged commit 4555085 into develop Oct 24, 2019
@rt4914 rt4914 deleted the topic-play-low-fi-part-1 branch October 24, 2019 10:03
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.

None yet

4 participants