Commit Graph

76 Commits

Author SHA1 Message Date
Joshua T Flowers 847b59246d Add transient notices (https://github.com/woocommerce/woocommerce-admin/pull/1423)
* Add initial transient notices component

* Animate notices to slide in and out

* Add notices to wc-api

* Map notices from wc-api to transient notices

* Add success message on settings save

* Add save notices to Settings page

* Remove all margin and padding from notice box when empty

* Add role alert to transient notices

* Add prefers reduced motion media query for transient animation

* Remove initial test notice

* Remove notices from wc-api

* Add wc-admin store for transient notices

* Pull transient notices from newly implemented store

* Use speak instead of role alert for accessibility

* Only show success message after request is complete

* Destructure state in componentDidUpdate

* Add store notice tests and fixtures

* Add box shadow to transient notice

* Move transient notices to bottom left

* Fix indentation
2019-02-13 19:44:58 +08:00
Justin Shreve 53a6e49874 Finish cleaning up client/store. (https://github.com/woocommerce/woocommerce-admin/pull/1403) 2019-01-30 02:22:10 -05:00
Kevin Killingsworth 833345dfee Remove 'wc-admin' client/store implementation (https://github.com/woocommerce/woocommerce-admin/pull/1344)
This has been replaced by the `wc-api` store, under client/wc-api
2019-01-28 14:18:21 -05:00
Joshua T Flowers 7cdbbf87e8 Update all wc-admin endpoints to v4 (https://github.com/woocommerce/woocommerce-admin/pull/1298)
* Update all wc-admin endpoints to v4

* Add namespace for products and customers controllers

* Include product quantity in orders data store

* Add coupons to extended data in the orders data store

* Format order statuses response from database

* Hook up orders table to orders endpoint

* Add namespace to data endpoint controller

* Add namespaces to remaining extended controllers

* Use NAMESPACE var in place of wc/v4

* Update product links in orders table to products reports

* Add coupons rest controller override

* Format coupon code in response

Co-Authored-By: joshuatf <joshuatf@gmail.com>
2019-01-18 10:52:58 +08:00
Albert Juhé Lluveras 059cd0ef0d Set default order to 'desc' in time tables (https://github.com/woocommerce/woocommerce-admin/pull/1341) 2019-01-17 22:14:12 +01:00
Paul Sealock d214e229ae refactor timeStampFilterDates 2019-01-17 13:57:11 +13:00
Paul Sealock af98c7dd91 better tests 2019-01-17 13:35:20 +13:00
Paul Sealock aaceb781fd tests 2019-01-17 09:37:43 +13:00
Paul Sealock b3d7e96a00 jsDoc 2019-01-17 09:08:04 +13:00
Paul Sealock 7b11e40981 timeStampFilterDates 2019-01-15 15:40:12 +13:00
Paul Sealock 7556b45eab Advanced Filters: Dates, fix query formats 2019-01-15 13:02:24 +13:00
Albert Juhé Lluveras 6ca0c628b2 Connect Downloads report to REST API (https://github.com/woocommerce/woocommerce-admin/pull/1238)
* Connect downloads chart and table to REST API

* Display date picker in Downloads report

* Fix missing value for 'days' in Downloads table summary

* Fix download_count being a string instead of a number

* Minor date packages comment fixes

* Fix filters in Downloads report

* Add back empty line

* JSDoc comments style fixes

* Fix username filter not working

* Fix days counter off by 1

* Fix alignment issue
2019-01-07 12:54:42 +01:00
Albert Juhé Lluveras 3a90c07e76 Fix date issues introduced in woocommerce/woocommerce-admin#1203 (https://github.com/woocommerce/woocommerce-admin/pull/1229)
* Revert "Show today charts up to the current hour (https://github.com/woocommerce/woocommerce-admin/pull/1203)"

This reverts commit 029ff9cc9c.

* Add current hour to timestamp of queries ending in today

* Fix getCurrentDates not returning moment objects as specified in the docs but returning string dates

* Set appendTimestamp( ..., 'now') seconds to 00

* Add test for appendTimestamp( ..., 'now' )

* Don't accept string dates in 'appendTimestamp'

* Fix 'moment' dependency deprecation warning
2019-01-07 11:41:46 +01:00
Timmy Crawford 78ca63a72d Dashboard: Add Leaderboard Component (https://github.com/woocommerce/woocommerce-admin/pull/1198)
* Create Leaderboard component. Update Top Selling Products to use it.

* Use date picker values in Top Selling Products.

* Convert top selling products tests into leaderboard tests

* Updates per feedback.

* Skipping failing test for now.
2018-12-31 14:42:46 +08:00
Albert Juhé Lluveras 029ff9cc9c Show today charts up to the current hour (https://github.com/woocommerce/woocommerce-admin/pull/1203)
* Show today charts up to the current hour

* Fix tests

* Fix doc comment
2018-12-28 10:10:40 -08:00
Joshua T Flowers 716ebc0658 Hook up coupons to REST API (https://github.com/woocommerce/woocommerce-admin/pull/1112) 2018-12-21 10:13:57 +08:00
Paul Sealock 15bbbe739d Hook up Categories table to endpoint 2018-12-19 08:36:42 +13:00
Joshua T Flowers 9486ab7896 Update/taxes endpoint hookup/941 (https://github.com/woocommerce/woocommerce-admin/pull/1008)
* Hook up taxes to endpoint

* Hook up tax stats endpoint

* Add default tax stat totals for empty results

* Create subtotals from intervals in API

* Change orders to orders_count to keep consistent naming
2018-12-18 10:26:46 +08:00
Albert Juhé Lluveras 501842a421 Rename 'isError' methods to 'getError' when they return an object instead of a boolean 2018-12-15 13:38:54 +01:00
Paul Sealock 2240d3d713 Customers: add one advanced filter 2018-12-11 09:01:22 +13:00
Albert Juhé Lluveras d79b490dda Add Customers Report page (https://github.com/woocommerce/woocommerce-admin/pull/1018)
* Create Customers Report page

* Hide date range filter if dateRangeFilter.show is false

* Rename dateRangeFilter.show to showDatePicker in filters config

* Add correct key 'average_order_value'

* Fix customers autocompleter not working
2018-12-10 13:26:43 -06:00
Albert Juhé Lluveras bb3e66ef32 Fix wrong default data structure in 'getReportTableData' (https://github.com/woocommerce/woocommerce-admin/pull/1042)
* Fix wrong default data structure in 'getReportTableData'

* Update tests

* Change default prop for tableData from null to an empty object in ReportTable
2018-12-10 09:51:11 -06:00
Jeff Stieler be74e22a01 Remove unnecessary variable and rename Report Items selectors for consistency. 2018-12-07 16:39:44 -07:00
Jeff Stieler e3362ddcde Update report utils tests to use wc-api. 2018-12-07 16:39:44 -07:00
Jeff Stieler 16f24a31ba Hook up ReportTable to wc-api. 2018-12-07 16:39:42 -07:00
Jeff Stieler 98478653e4 Attempt to include report stats type in resource name prefix rather than identifier. 2018-12-07 16:39:42 -07:00
Jeff Stieler de1da53aaa Use wc-api for Report Chart data. 2018-12-07 16:39:41 -07:00
Albert Juhé Lluveras d161732c0a Create Customers Report page 2018-12-06 16:25:31 -06:00
Paul Sealock da4dea57be Variations: Add endopoint repsonse to table data 2018-12-03 12:16:43 +13:00
Albert Juhé Lluveras 540a191b57 Use X-WP-Total header to set the total number of items in tables (https://github.com/woocommerce/woocommerce-admin/pull/952)
* Use X-WP-Total header to set the total number of items in tables

* Improve naming

* Improve tests

* Make getReportItems() return a 'data' property by default

* Make getSummary prop behavior more clear
2018-11-29 08:03:04 -06:00
Albert Juhé Lluveras c65709f2db Fix false positives in Reports stats resolvers (https://github.com/woocommerce/woocommerce-admin/pull/955) 2018-11-28 13:08:53 -06:00
Albert Juhé Lluveras 2057741853 Merge table stores (https://github.com/woocommerce/woocommerce-admin/pull/896) 2018-11-22 17:12:12 -06:00
Albert Juhé Lluveras 23d032d675 Remove unnecessary IF in reports/utils.js (https://github.com/woocommerce/woocommerce-admin/pull/909) 2018-11-22 14:49:52 -06:00
Robert Elliott 24758bc80d squashed commits for chart packaging
expand formatting function to xFormats

adding getTooltipValueFormat

remove old chart examples

remove magic numbers and use variables

refactor getTooltipRowValue

update package-lock

allow function formatters and use @wordpress/elements
2018-11-21 16:10:56 +02:00
Paul Sealock 67c7dabc29 Add Variations table 2018-11-20 13:42:55 +13:00
Albert Juhé Lluveras 9938707970 Add Taxes report table (https://github.com/woocommerce/woocommerce-admin/pull/881)
* Add Taxes report table

* Add taxes autocompleter to Search

* Minor fixes

* Improve @TODO comment explanation
2018-11-19 09:55:15 -06:00
Jonathan Belcher 8ddcb7ce4a Adds UI wiring for Catgories chart and summary (https://github.com/woocommerce/woocommerce-admin/pull/725)
* Adds UI wiring for Catgories chart and summary

* Use new format for charts

* Use swagger api

* Get rid of store references

* Final touch ups

* Seperate out WooCommerce dep
2018-11-16 08:33:58 -05:00
Albert Juhé Lluveras cc86233e0f Add Coupons report table (https://github.com/woocommerce/woocommerce-admin/pull/867)
* Add Coupons report table

* Fix propTypes warning in CouponsReportTable

* Remove unnecessary constructors from tables
2018-11-15 21:35:10 -06:00
Albert Juhé Lluveras ba7d6ef29f Minor fixes to stores (https://github.com/woocommerce/woocommerce-admin/pull/868)
* Minor fixes to stores

* Fix 'parameters' typo
2018-11-15 21:32:11 -06:00
Jonathan Belcher 2dbe3e8cc7 Adds UI wiring for Taxes chart and summary (https://github.com/woocommerce/woocommerce-admin/pull/779)
* Adds UI wiring for Taxes chart and summary

* Update to latest method for creating summary/chart

* Switch out API for swagger

* Fix copy pasta

* Implement swagger api

* Update config to match swagger API

* Code review fixes

* Remove store code as it isnt used
2018-11-14 16:04:59 -05:00
Jonathan Belcher 5132e81b7c Fixes code comments on return value type (https://github.com/woocommerce/woocommerce-admin/pull/850) 2018-11-14 15:33:13 -05:00
Kelly Dwan 89cee0df90 Build: Move filter code to the navigation package (https://github.com/woocommerce/woocommerce-admin/pull/803)
* Move filter code to the navigation package

- Moves filter-related code to navigation, so it can be shared between components and the app
- Fixes spelling of “flatten”
- Update README docs with new functions

* Use `get` to prevent errors if options is not an array/is empty

* Update documentation and tests
2018-11-12 11:17:18 -05:00
Kevin Killingsworth fbed89eb19 Update @wordpress/data for 3.x (https://github.com/woocommerce/woocommerce-admin/pull/783)
* fix: Remove state argument from resolvers.

State is no longer the first argument to resolvers as of @wordpress/data
version 3.0.0

* Update @wordpress/data to 3.1.0

* Adjust resolvers to work with v2 and v3 wp.data

This adds code to inspect the arguments of the resolvers to allow for
working with v2 or v3 wp.data. This is only temporary.

* resolvers: fix tests

This fixes tests by removing empty state objects from them.
2018-11-05 18:30:32 -05:00
Kelly Dwan d27cb26ef7 Build: Move `lib/nav-utils` and `lib/history` to `@woocommerce/navigation` (https://github.com/woocommerce/woocommerce-admin/pull/763)
* Move nav-utils and history to new package

* Update config to build and use new navigation package

* Update all imports to use new navigation package

* Remove unnecessary README

* Update nav-utils path
2018-11-05 16:02:04 -05:00
Kelly Dwan 2b29dc7d1c Build: Switch react imports to use core packages (https://github.com/woocommerce/woocommerce-admin/pull/755)
* Remove react, react-dom, and redux imports in favor of core packages

* Move build dependencies out of `devDependencies`
2018-11-02 15:37:28 -04:00
Paul Sealock e8f3258d47 Filters: Add Variations extra filters 2018-10-31 11:26:05 +13:00
Kelly Dwan f62537fc17 Try: Add Lerna to split out utility packages (https://github.com/woocommerce/woocommerce-admin/pull/678)
* Add lerna & GB package-building script

* Move currency library to lerna module

* Update lerna config

* Add publish commands

* Add currency as an faux-external module

* Add separate command to build just core files

* Update dependency path

* Update build script to build all packages into `dist`

* Add packages to the jest test setup

* Move date library to packages

* Update imports to use @woocommerce/date

* Output wcSettings definition before any scripts are output

Fixes issues where wc-dates lib relies on settings object

* Add the build step into travis

* Update jest config to dynamically get package paths

* Update package postcss config to match wc-admin’s main config

* Add combined watch scripts for package+app, add a `clean` command to clean up old build files

* Ignore PHPCS error (leave todo message to fix)

* Concat files with a space, fix issue where all files join in one continuous string and fail the check
2018-10-30 14:57:48 -04:00
Jonathan Belcher c3391e78f5 Fix code comment (https://github.com/woocommerce/woocommerce-admin/pull/723) 2018-10-29 15:46:51 -04:00
Paul Sealock 2b36f53253 Filters: Add query from config directly to url
Add/filter params to queries
2018-10-29 13:15:27 +13:00
Paul Sealock 7e5c124ce1 Filters: Add params to request query 2018-10-29 13:07:13 +13:00