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

#168373102 Fix rating stats and readtime estimation #95

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

nkpremices
Copy link
Contributor

What does this PR do?
  • Have the readtime always rounded up
  • Have a default object for article ratings stats

@nkpremices nkpremices changed the title #168373102 Ensure, ratings are shown properly even for an article which doesn't have all stars rated and the readtime is always rounded up #168373102 Ensure, ratings are shown properly even for an article which has only one star rated and the readtime is always rounded up Sep 9, 2019
@nkpremices nkpremices changed the title #168373102 Ensure, ratings are shown properly even for an article which has only one star rated and the readtime is always rounded up #168373102 Ensure, ratings are shown properly even for an article which has only one star rated and ensure that the readtime is always rounded up Sep 9, 2019
@nkpremices nkpremices force-pushed the bg-readtime-ratings-stats-fix-168373102 branch from 66d6ede to 2bef8a4 Compare September 10, 2019 15:47
@nkpremices nkpremices changed the title #168373102 Ensure, ratings are shown properly even for an article which has only one star rated and ensure that the readtime is always rounded up #168373102 Fix rating stats and readtime estimation Sep 10, 2019
@nkpremices nkpremices force-pushed the bg-readtime-ratings-stats-fix-168373102 branch from 2bef8a4 to 55c0f3d Compare September 10, 2019 18:47
@@ -27,6 +29,26 @@ export default (data) => {
percentage: percentages[data.indexOf(element)]
}));

if (data.length < MAX_DATA_LENGTH) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkpremices a comment to describe what you're doing here would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lemme do that @MemunaHaruna

@@ -1,4 +1,4 @@
import chai from 'chai';
import chai, { expect } from 'chai';
Copy link
Contributor

@MemunaHaruna MemunaHaruna Sep 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkpremices can you add a test for the read time estimation fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how I can add a test for that as I'm just rounding up @MCFrank16
Give me an idea please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm going to try

Copy link
Contributor

@MemunaHaruna MemunaHaruna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nkpremices I left a few comments

@nkpremices nkpremices force-pushed the bg-readtime-ratings-stats-fix-168373102 branch from 55c0f3d to f4fa393 Compare September 11, 2019 19:08
@MemunaHaruna MemunaHaruna merged commit d3309c9 into develop Sep 11, 2019
@MemunaHaruna MemunaHaruna deleted the bg-readtime-ratings-stats-fix-168373102 branch September 11, 2019 19:49
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