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 Widgets: Abbreviate large values #13196

merged 3 commits into from Jan 8, 2020


Copy link

ScoutHarris commented Jan 8, 2020

Ref #12702

This abbreviates the Today and All-Time widget values to match the app. That is, any number larger than 10,000 will get abbreviated.

To test:

  • On a site with high traffic, go to Stats > Widgets > Use this site.
    • Tip: is a good one.
  • If necessary, add the Today and All-Time stats to the Insights view. Make note of the values.
  • Add the Today and All-Time widgets to the Today view.
  • Verify the widget numbers are abbreviated as they are in the app.
    • Hack: Today is a bit difficult to verify. You can manually set the values in TodayViewController:updateStatsLabels to see the abbreviation. Of course this won't match the app, but it uses the same abbreviation logic.

Insights All-Time:

Widget All-Time:

PR submission checklist:

  • I have considered adding unit tests where possible.

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

ScoutHarris added 2 commits Jan 8, 2020
@ScoutHarris ScoutHarris added this to the 14.0 milestone Jan 8, 2020
@ScoutHarris ScoutHarris requested a review from bjtitus Jan 8, 2020
@ScoutHarris ScoutHarris self-assigned this Jan 8, 2020

This comment has been minimized.

Copy link

peril-wordpress-mobile bot commented Jan 8, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

@ScoutHarris ScoutHarris mentioned this pull request Jan 8, 2020
18 of 21 tasks complete
bjtitus approved these changes Jan 8, 2020
Copy link

bjtitus left a comment


Tested and looks good to me!

@ScoutHarris ScoutHarris merged commit 4d63583 into develop Jan 8, 2020
7 checks passed
7 checks passed
Hound No violations found. Woof!
Peril All green. Congrats.
ci/circleci: Build Tests Your tests passed on CircleCI!
ci/circleci: Installable Build/Hold Your job is on hold on CircleCI!
ci/circleci: UI Tests (iPad Air 3rd generation) Your tests passed on CircleCI!
ci/circleci: UI Tests (iPhone 11) Your tests passed on CircleCI!
ci/circleci: Unit Tests Your tests passed on CircleCI!
@ScoutHarris ScoutHarris deleted the feature/12702-widgets_abbreviate_values branch Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.