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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance indicators to dashboard #1343

Merged
merged 5 commits into from Jan 18, 2019

Conversation

@justinshreve
Copy link
Collaborator

justinshreve commented Jan 17, 2019

Fixes #1282. Closes #1281.

This PR hooks up the performance indicators on the dashboard to the new performance indicator REST API.

It also makes some more adjustments to the REST API to make this possible including report links, description/label, chart sorting, and a method of indicating which total should be a performance indicator and of what format.

A few stats off the list in #1282 are missing, because they do not exist in the reports/REST API yet. Once added, they will automatically show up here.

馃専 This also supports extensions. You can test Follow Up Emails via woocommerce/woocommerce-follow-up-emails#698 with this. 馃専

Accessibility

  • I've tested using only a keyboard (no mouse)

Screenshots

screen shot 2019-01-17 at 11 44 32 am

screen shot 2019-01-17 at 11 44 44 am

Detailed test instructions:

  • Run phpunit and make sure all tests pass.
  • Run npm test and make sure all tests pass.
  • View the dashboard, test different date ranges, and verify performance indicators show.
  • Try showing/hiding indicators and testing defaults. You can clear out your usermeta (key dashboard_performance_indicator) to test defaults.
  • Bonus points: Test with follow up emails.
@timmyc

This comment has been minimized.

Copy link
Collaborator

timmyc commented Jan 17, 2019

This also supports extensions. You can test Follow Up Emails via woocommerce/woocommerce-follow-up-emails#698 with this.

鉂楋笍鉂楋笍鉂楋笍鉂楋笍鉂楋笍

@timmyc
Copy link
Collaborator

timmyc left a comment

Amaze.

Some minor comments in the code - I think the only real change might be API versioning. Tests are passing for me, and thanks for adding/updating them.

I'm going to test out the FUE extension too to get the full experience too, but did want to drop this .gif here as when I first activated this branch, and visited the dashboard, this is what I was seeing - its like there is an initial load, and then a subsequent refresh added in two more indicators. Once I toggled some off, and thus had user preferences set, I could no longer see the issue:

loading-indicators

Other than that, this is testing out wonderfully for me, and really takes the dashboard utility level up immensely. Being able to customize these stats, and quickly dive in deeper for further analysis is a real treat that I'm certain store operators will love.

Show resolved Hide resolved client/dashboard/store-performance/index.js Outdated
Show resolved Hide resolved client/dashboard/store-performance/index.js
Show resolved Hide resolved client/lib/number/index.js Outdated
Show resolved Hide resolved ...es/api/class-wc-admin-rest-reports-performance-indicators-controller.php
Show resolved Hide resolved includes/api/class-wc-admin-rest-reports-revenue-stats-controller.php
Show resolved Hide resolved lib/client-assets.php Outdated
Show resolved Hide resolved lib/client-assets.php Outdated
Show resolved Hide resolved packages/components/CHANGELOG.md Outdated
Show resolved Hide resolved packages/components/src/summary/number.js

@timmyc timmyc requested a review from LevinMedia Jan 17, 2019

@timmyc

This comment has been minimized.

Copy link
Collaborator

timmyc commented Jan 17, 2019

@LevinMedia would love to have you give this one a review too.

@psealock psealock referenced this pull request Jan 18, 2019

Merged

SummaryNumbers: close on click for mobile #1332

1 of 1 task complete
@LevinMedia

This comment has been minimized.

Copy link
Contributor

LevinMedia commented Jan 18, 2019

I'm so excited to test this, I'm leaving this comment before I test this. 鉂わ笍

@justinshreve justinshreve force-pushed the add/dashboard-store-performance branch from e835acc to eae74f8 Jan 18, 2019

justinshreve added some commits Jan 18, 2019

@justinshreve justinshreve force-pushed the add/dashboard-store-performance branch from 715d24d to bcca360 Jan 18, 2019

@justinshreve

This comment has been minimized.

Copy link
Collaborator Author

justinshreve commented Jan 18, 2019

@timmyc It took me a bit to debug/track down what was happening with the preferences but I think the issue is fixed now. I've also handled the other PR feedback and rebased this.

If the code looks OK, since this PR is a bit bigger, I wouldn't mind getting this merged and handle any larger changes / design feedback in a future PR.

@timmyc

timmyc approved these changes Jan 18, 2019

Copy link
Collaborator

timmyc left a comment

Changes look great - verified no more flickering on first load when no prefs are set. Totally agree that any items outstanding can be done in a follow-up pr(s).

Awesome feature Justin!

@justinshreve justinshreve merged commit 716d1e4 into master Jan 18, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@justinshreve justinshreve added this to 馃Sprint 11 Done in Isotope via automation Jan 18, 2019

@justinshreve justinshreve deleted the add/dashboard-store-performance branch Jan 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment