Skip to content

[Stats Refresh] Add Insights Tags and Categories card - #10831

Merged
ScoutHarris merged 23 commits into
developfrom
feature/10744-insights_tags_and_categories
Jan 17, 2019
Merged

[Stats Refresh] Add Insights Tags and Categories card#10831
ScoutHarris merged 23 commits into
developfrom
feature/10744-insights_tags_and_categories

Conversation

@ScoutHarris

@ScoutHarris ScoutHarris commented Jan 16, 2019

Copy link
Copy Markdown
Contributor

Fixes #10744

This primarily adds the Insights Tags and Categories card.

Secondarily, it also includes:

  • Some (hopefully temporary) logic to swizzle data Strings so the abbreviated numbers can be displayed. Namely:
    • Tags and Categories
    • Follower Totals
    • Comments
    • Followers > total followers.
    • Publicize
  • Some refactoring to DRY out the UITableViewCell code.

Disclaimer:

grouped

To test:


Tags and Categories:

  • On a site with T & C, go to Stats > Insights. (Hogwarts and en.blog are good ones.)
  • Verify:
    • Subtitles are shown.
    • Max of 6 rows are displayed.
    • Rows have a disclosure and data bar.
    • If there are more than 6 data rows, the cell has a View more row.
    • Tapping a row opens a webView for that tag/category.
    • Tapping View more will display a temporary alert.

t_and_c


No Tags and Categories:

  • On a site with no T & C, go to Stats > Insights.
  • Verify:
    • Subtitles are not shown.
    • The cell has only a No data yet row.

no_t_and_c


Now with abbreviated totals!

  • Just a sanity check - these cards should now display abbreviated totals:
    • Follower Totals
    • Comments
    • Followers > total followers.
    • Publicize

Example:
follower_totals

…ue. Using this for the Tags & Categories data bar and display value.
@ScoutHarris ScoutHarris added this to the 11.7 milestone Jan 16, 2019
@ScoutHarris ScoutHarris self-assigned this Jan 16, 2019
@ScoutHarris
ScoutHarris requested a review from jklausa January 16, 2019 00:37
@wpmobilebot

Copy link
Copy Markdown
Contributor
1 Warning
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 Danger

@ScoutHarris

Copy link
Copy Markdown
Contributor Author

@SylvesterWilmott -


iphone


ipad

@jklausa jklausa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes here look good! I've noticed two unrelated things though:

  1. The issue with avatars disappearing seems to still be an problem:
    simulator screen shot - iphone xs max - 2019-01-17 at 04 26 50
  2. Emojis in post titles here get messed up
    simulator screen shot - iphone xs max - 2019-01-17 at 04 26 21


let numberOfDataRows = dataRows.count

if numberOfDataRows == 0 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nitpick and my personal style thing, but this could be written as a guard to ensure we don't accidentally forget to escape the scope when this gets modified in the future :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch! And done!

@SylvesterWilmott

Copy link
Copy Markdown

Look great @ScoutHarris thanks!

@ScoutHarris

Copy link
Copy Markdown
Contributor Author

@jklausa thanks for noticing those two issues. I'll be sure to look at them.

@ScoutHarris
ScoutHarris merged commit 3d19118 into develop Jan 17, 2019
@ScoutHarris
ScoutHarris deleted the feature/10744-insights_tags_and_categories branch January 17, 2019 22:30
@SylvesterWilmott

Copy link
Copy Markdown

Just noticed one thing on the screenshots @ScoutHarris , the "Most Popular Day and Hour" block doesn't have the table headings Day/hour or Views.

@ScoutHarris ScoutHarris mentioned this pull request Jan 21, 2019
45 tasks
@ScoutHarris

Copy link
Copy Markdown
Contributor Author

@SylvesterWilmott oooohhh! Good catch! Thanks!

@ScoutHarris ScoutHarris mentioned this pull request Jun 4, 2019
79 tasks
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.

4 participants