Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Add performance indicators to dashboard #1343

Merged
merged 5 commits into from Jan 18, 2019

Conversation

justinshreve
Copy link
Collaborator

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 https://github.com/woocommerce/woocommerce-follow-up-emails/pull/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
Copy link
Contributor

timmyc commented Jan 17, 2019

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

❗️❗️❗️❗️❗️

Copy link
Contributor

@timmyc timmyc left a comment

Choose a reason for hiding this comment

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

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.

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
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 Show resolved Hide resolved
@timmyc
Copy link
Contributor

timmyc commented Jan 17, 2019

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

@LevinMedia
Copy link
Contributor

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 Compare January 18, 2019 13:23
@justinshreve justinshreve force-pushed the add/dashboard-store-performance branch from 715d24d to bcca360 Compare January 18, 2019 17:11
@justinshreve
Copy link
Collaborator Author

@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.

Copy link
Contributor

@timmyc timmyc left a comment

Choose a reason for hiding this comment

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

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
@justinshreve justinshreve added this to 🥋Sprint 11 Done in Isotope via automation Jan 18, 2019
@justinshreve justinshreve deleted the add/dashboard-store-performance branch January 18, 2019 19:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants