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

[Stats Refresh] Show grey bars when chart is empty #11887

Merged
merged 11 commits into from
Jun 11, 2019

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Jun 11, 2019

Ref #11876
Fixes #11888

This change displays light grey bars when a chart view is empty.

This also fixes an issue where chart Likes was not being updated after the Likes query finished.

To test:


Latest Post Summary chart:

  • The empty view on this one is a bit hard to trigger.
    • A site with views, but no views in the past 2 weeks.
    • A site with no views, but has Likes or Comments.
  • Verify light grey bars appear on the chart.

lps


Period Overview chart:

  • On a site with no Views, Visitors, Likes, and/or Comments for all the periods on the chart.
  • Verify light grey bars appear on the chart.

no_likes

no_views


Post Stats chart:

  • Access Post Stats for a site with no stats in the past 2 weeks.
  • Verify light grey bars appear on the chart.

post_stats


Chart Likes:

  • On a site with Likes.
  • Verify Likes updates after the query finishes.

likes_init

likes_updated

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@ScoutHarris ScoutHarris added this to the 12.6 ❄️ milestone Jun 11, 2019
@ScoutHarris ScoutHarris requested a review from jklausa June 11, 2019 00:54
@ScoutHarris ScoutHarris self-assigned this Jun 11, 2019
@ScoutHarris
Copy link
Contributor Author

@danielebogo - I'm adding you as a reviewer in case you can get to this before @jklausa . Thanks!

let totalViews = summaryData.compactMap({$0.viewsCount}).reduce(0, +)
let totalVisitors = summaryData.compactMap({$0.visitorsCount}).reduce(0, +)
let totalLikes = summaryData.compactMap({$0.likesCount}).reduce(0, +)
let totalComments = summaryData.compactMap({$0.commentsCount}).reduce(0, +)
Copy link
Contributor

Choose a reason for hiding this comment

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

love it!

Copy link
Contributor

@jklausa jklausa left a comment

Choose a reason for hiding this comment

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

:shipit:

Those empty charts look so much nicer now!

@SylvesterWilmott
Copy link

SylvesterWilmott commented Jun 17, 2019

Looks good @ScoutHarris

Are we going to be able to update the bars to the gradient type at any point? if not can you add a version for consideration where the bars are the full height of the chart?

@ScoutHarris
Copy link
Contributor Author

Hey @SylvesterWilmott . Honestly I'm not sure. Adding the gradient turned out to be a bit complicated. If we do, it'll be a while. So I went ahead and extended the bar heights with #11971.

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.

3 participants