Add performance indicators to dashboard #1343
Conversation
❗️❗️❗️❗️❗️ |
There was a problem hiding this 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:
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.
includes/api/class-wc-admin-rest-reports-performance-indicators-controller.php
Show resolved
Hide resolved
@LevinMedia would love to have you give this one a review too. |
I'm so excited to test this, I'm leaving this comment before I test this. ❤️ |
e835acc
to
eae74f8
Compare
715d24d
to
bcca360
Compare
@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. |
There was a problem hiding this 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!
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
Screenshots
Detailed test instructions:
phpunit
and make sure all tests pass.npm test
and make sure all tests pass.