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

Oppia Android Promoted Stories Domain Layer #2272

Merged
merged 295 commits into from
Jan 31, 2021
Merged

Oppia Android Promoted Stories Domain Layer #2272

merged 295 commits into from
Jan 31, 2021

Conversation

veena14cs
Copy link
Contributor

@veena14cs veena14cs commented Dec 16, 2020

Explanation

This PR shows a list of promoted stories on the home screen. This implemenation is Domain layer part and App layer implementation is in PR #2320
The list(referred to as promoted stories list in code) can show one of the following:

  1. Recently Played Stories
  2. Last Played Stories
  3. Stories for you
  4. Recommended Stories
  5. Coming Soon Topics
  6. Or no list.

The number of cases for Stories for you

  • While onboarding new users a list of topics is shown on the HomeScreen , based on this selection it promotes the first chapter from the first story from this particular topic.
  • Based on the selection of the topic, the first chapter from next topic will be recommended.
  • For e.g. If user started first chapter from "Fractions" but not finished, the app promotes ongoing topic "Fraction" and the next topic "Ratios" under Recommended Stories.

The number of cases for Recommended stories

  • If the user has completed first story from "Fractions" , and there are no more ongoing stories, then it promotes only "Ratios" under Recommended Stories.

The number of cases for Recently-played/Last-played stories

  • Considering there are 2 promoted stories "Fractions" and "Ratios" under Recommended Stories.
  • If user starts first chapter from "Ratios" but not finished, it promotes "Ratios" & "Fraction" topics, changes the header from Recommended stories to Recently-played stories
  • If the above topics are in progress from more than a week, header of promoted list is changed to Last-played stories.
  • If the user finishes first story from "Fraction", It will have only one topic "Ratios" under Recently-played stories.
  • Now, if the user has finished first story from "Ratios", It promotes next topic's first story and changes header from Recently-played/Last-played to Recommended Stories.

Coming Soon topics

  • User has finished playing at least one story from all the topics, header of promoted list is changed to Coming Soon topics and a list of coming soon topics is shown.

Design Document
https://docs.google.com/document/d/1o7hOz1rP-hJaKn1f5x6LV6ms0bzhyCpsTifJQY5crCc/edit?ts=5f9fc81b#heading=h.ovlu0iazlug6

Note:
This PR is only focusing on domain layer. As there are high-end changes and app layer CI check are failing. This errors are fixed in PR #2320 .

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 made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@anandwana001
Copy link
Contributor

@veena14cs Most of implementation is changing in the below-mentioned PR for Home RecyclerView, as shifting from Adapter to Bindable Adapter.
#2246

@veena14cs veena14cs marked this pull request as ready for review December 17, 2020 11:32
@veena14cs veena14cs changed the title Oppia Android Promoted Stories Oppia Android Promoted Stories Domain Layer Dec 17, 2020
@veena14cs veena14cs requested a review from BenHenning January 30, 2021 21:40
@veena14cs veena14cs assigned BenHenning and unassigned veena14cs Jan 30, 2021
Copy link
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 @veena14cs! Only nits left. I verified all the tests--they look correct to me now. Glad to see the tests passing as well. I think once the leftover comments are addressed this can be merged.

@veena14cs veena14cs requested a review from BenHenning January 31, 2021 12:26
@BenHenning
Copy link
Member

Thanks @veena14cs. As mentioned in chat, please never force push as it can ruin the PR review. In this case, I checked the forced push commits & the new commits--it seems like the current history is fine. In the future, you can avoid force pushing by performing similar operations that add onto the branch history rather than change it (e.g. cherry-pick, or manually git diffing & git applying changes). If you find yourself in a situation where you think a force push is needed, please reach out & ask. There should be a reasonable alternative that avoids needing to force push.

Regarding the PR, it generally LGTM at this state. I want to make sure the CI checks pass before approving, though, since it seems like there was 1 test failure in the latest commit.

@BenHenning
Copy link
Member

Ah nevermind, it looks like my view of GitHub was just out of date. Everything seems passing now.

Copy link
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 @veena14cs! LGTM.

Note that I'm specifically giving an exception to auto-closing this PR per the force-push due to it not actually affecting the reviewer functionality in this case--the final deltas still look good to me.

@BenHenning
Copy link
Member

Merging this.

@veena14cs
Copy link
Contributor Author

Thanks @veena14cs! LGTM.

Note that I'm specifically giving an exception to auto-closing this PR per the force-push due to it not actually affecting the reviewer functionality in this case--the final deltas still look good to me.

Thanks Ben! there was no any major change. Will make sure to not to force push anytime.

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.

7 participants