Commit Graph

92 Commits

Author SHA1 Message Date
Justin Shreve 423757a7e2 Add Onboarding Step 5 - Industry (https://github.com/woocommerce/woocommerce-admin/pull/2323)
* Add Onboarding Step 5 - Industry

* Handle PR feedback: Switch to updateProfileItems, remove unnecessary css class, remove unecessary translation call
2019-05-30 14:31:07 +08:00
Joshua T Flowers 3b945b4bba Add profile onboarding mutators and selectors to wc-api (https://github.com/woocommerce/woocommerce-admin/pull/2310)
* Add onboarding profile selectors and mutators to wc-api

* Show onboarding profiler depending on API results

* Add initial state hydration for onboarding profile

* Add onboarding namespace constant
2019-05-28 22:45:52 +08:00
Joshua T Flowers 74d02bc717 Store state settings individually to prevent overwriting (https://github.com/woocommerce/woocommerce-admin/pull/2317) 2019-05-28 22:23:05 +08:00
Joshua T Flowers 72206d296c Update settings wc-api to accept multiple setting groups (https://github.com/woocommerce/woocommerce-admin/pull/2293)
* Allow getSettings to read settings from any group

* Change updateSettings to accept object with multiple setting groups
2019-05-24 15:22:21 +08:00
Jeff Stieler 3c243ffe00 Remove errant import update operation from wp-api spec. 2019-05-21 13:36:01 -06:00
Albert Juhé Lluveras a382fd6143 Hook up import/totals endpoint to Historical Data Import screen (https://github.com/woocommerce/woocommerce-admin/pull/2208)
* Hook up import/totals endpoint to Historical Data Import screen

* Remove getImportTotalsError and isGetImportTotalsRequesting selectors which were not used

* Remove duplicate style import

* Fix RTL displays
2019-05-20 22:50:25 +02:00
Albert Juhé Lluveras cab0e38c30 Save section/block preferences in user data (https://github.com/woocommerce/woocommerce-admin/pull/2148)
* Save section/block preferences in user data

* Optimize updateSection code

* Remove no longer used prop

* Refactor dashboard blocks to make them extendable

* Check that defaultSection exists before merging

* Rename 'sectionsDefinion' to 'defaultSections'

* Add Dashboard README

* Update README with new props

* Update settings when moving/removing dashboard sections

* Add missing props to README example

* Move 'section.js' inside 'components' folder

* Fix README sentence
2019-05-07 09:21:34 +02:00
Albert Juhé Lluveras 40b47c3a18 Add empty state for the Reviews panels (https://github.com/woocommerce/woocommerce-admin/pull/2124)
* Add message to empty Reviews panel in the Activity Panel

* Add other reviews unread messages

* Cleanup

* Open external links in new tabs

* Avoid doing unnecessary API calls

* Remove 'activity_panel_reviews_last_read'
2019-04-30 11:40:10 +02:00
Joshua T Flowers c17baa02cd Encode and decode persited query as JSON string in the leaderboards controller (https://github.com/woocommerce/woocommerce-admin/pull/2100)
* Encode and decode persited query as JSON string in leaderboards controller

* Update peristed query tests to use JSON string
2019-04-24 04:38:49 +08:00
Albert Juhé Lluveras b4c3998e7e Add empty states for the Inbox and Orders panels (https://github.com/woocommerce/woocommerce-admin/pull/2037)
* Add empty states for the Inbox and Orders panels

* Typos

* Apply PR feedback
2019-04-15 09:06:34 +02:00
Jeff Stieler ef0fd73f2c Merge pull request woocommerce/woocommerce-admin#1998 from woocommerce/add/247-stock-panel
Hook up Stock panel
2019-04-12 09:19:21 -06:00
Justin Shreve 7fc70157c9 WC_Admin_Loader/PHP Refactor + Method to publish core ready features (https://github.com/woocommerce/woocommerce-admin/pull/1863)
* Try: Setup plugin to publish core library on npm

* Documentation clean up.

* Handle PR Feedback: Fix notices from happening in WC Core from API usage, fix sidebar dashboard ordering in menu, remove preload function check since we are supporting WP 5+, add a filter for preloading data and move usage to respective feature code, move features to a specific folder for bundiling, fix script translations.

* Fix code comment on analytics preload

* Continue refactoring code, and make it possible to launch 'embedded' features via the process as well.

* Fix note hook

* Fix note load order

* Address PR feedback: Fix class name, load leaderboard endpoint

* Remove example code prior to merge
2019-04-11 14:31:31 -04:00
Joshua T Flowers eb0b137020 Hook up leaderboards endpoint to dashboard (https://github.com/woocommerce/woocommerce-admin/pull/2004)
* Add allowed leaderboards endpoint to prefetch list

* Hook up leadboards endpoint to dashboard

* Skip data fetch for leaderboard if per page is less than 1

* Add tests to check for rendered html display
2019-04-11 10:53:05 +08:00
Kevin Killingsworth 007ff933ce Fix withSelect to release resources on unmount (https://github.com/woocommerce/woocommerce-admin/pull/1999)
* Add fresh-data dev info support for dev builds.

This adds support for dev info to be accessed from the JavaScript
console for more information about resources handled by fresh-data.

* Update fresh-data to 0.6.0

* Fix withSelect to release resources on unmount

Previously, withSelect wasn't releasing resources from fresh-data when
it was unmounting. This fixes that behavior and now clears a component's
requirements correctly when unmounting.
2019-04-09 09:56:25 -05:00
Kevin Killingsworth 85fda4d61f Add fresh-data dev info support for dev builds. (https://github.com/woocommerce/woocommerce-admin/pull/1978)
* Add fresh-data dev info support for dev builds.

This adds support for dev info to be accessed from the JavaScript
console for more information about resources handled by fresh-data.

* Update fresh-data to 0.6.0
2019-04-09 09:55:01 -05:00
Jeff Stieler f4691827b1 Include item ID in product update resource name.
Keep state in sync when updating product stock quantity.
2019-04-01 17:38:36 -06:00
Jeff Stieler ad7cc4226a Handle updating product variation stock quantity. 2019-04-01 11:28:10 -06:00
Jeff Stieler 68e49a9574 Add update method for products to wc-api. 2019-04-01 11:28:10 -06:00
Paul Sealock 36e0831ac8 getItems: modify parse flag by isUnboundedRequest 2019-04-01 13:47:52 +13:00
Joshua T Flowers 6ff9d0673a Add low product stock indicator (https://github.com/woocommerce/woocommerce-admin/pull/1866)
* Move product low stock count to controller param instead of data store

* Add totalCount to items API

* Extract unread indicators to separate file and add unread stock

* Trim initial search variable in wp_query

* Parse low stock option as an absolute integer

* Fix low stock meta comparison with product specific low stock amount

* Make group by query function static

* Check for empty strings and null values for product low_stock_amount
2019-03-29 10:45:19 +08:00
Albert Juhé Lluveras b737087d35 Load on hold reviews in the Activity Panel (https://github.com/woocommerce/woocommerce-admin/pull/1871)
* Load on hold reviews in the Activity Panel

* Consider reviews on hold as unread
2019-03-28 23:20:17 +01:00
Paul Sealock b32e8afeeb Merge pull request woocommerce/woocommerce-admin#1873 from woocommerce/refactor/config-getQuery
Refactor getFilterQuery by explicitly passing down configs
2019-03-25 13:12:53 +13:00
Paul Sealock b29b232a46 pass in filters 2019-03-25 13:03:53 +13:00
Albert Juhé Lluveras a7af5e4603 Create DEFAULT_ACTIONABLE_STATUSES constant (https://github.com/woocommerce/woocommerce-admin/pull/1867) 2019-03-22 09:48:20 +01:00
Albert Juhé Lluveras 41e5d00708 Activity Panel: set reviews unread indicator based on real data (https://github.com/woocommerce/woocommerce-admin/pull/1860)
* Activity Panel: set reviews unread indicator based on real data

* Unify date comparisons to GMT

* Add numberOfReviews propType

* Verify date_created_gmt exists before using it
2019-03-21 12:35:46 +01:00
Albert Juhé Lluveras 9038bdfdae Table: update columns visibility on headers change (https://github.com/woocommerce/woocommerce-admin/pull/1846)
* Typos

* Table: update columns visibility on headers change

* Make sure initial user pref columns are loaded in all reports

* Return early filterShownHeaders when hiddenKeys is an empty array

* Undo 'headers', 'prevHeaders' order switch
2019-03-21 11:35:00 +01:00
Joshua T Flowers 3bc0582920 Activity Panel: Persist read status for inbox notes (https://github.com/woocommerce/woocommerce-admin/pull/1823)
* Add last read user data for inbox

* Check last read time against inbox note to determine read status

* Set last read in unmount to make component stateless

* Compare latest note time against last read time in activity panel

* Fix error checking and per_page limit

* Use component mount time for last read time in inbox

* Compare unread against note GMT time

* Add missing trailing comma
2019-03-21 10:54:36 +08:00
Joshua T Flowers 6c1f4d105f Check if resources are still loading before skipping dispatch (https://github.com/woocommerce/woocommerce-admin/pull/1821)
* Check if resources are still loading before skipping dispatch

* Use some instead of filter to check if newResource requests exist
2019-03-20 10:55:26 +08:00
Justin Shreve 1348245406 Add store notice around processing historical data. (https://github.com/woocommerce/woocommerce-admin/pull/1763)
* Add store notice around processing historical data.

* Cleanup

* Handle PR feedback.

* Clean up `add` logic and add empty content_data. Also add logic to get_notes_count so that we can hide unactioned statuses.

* Add the ability to update a note, and to also mark a status when an alert is clicked.

* Remove mark_actioned call on sync

* add missing todo
2019-03-12 09:13:20 -04:00
Paul Sealock fd019c4c35 Chart: don't switch to comparison mode directly 2019-03-12 12:03:58 +13:00
Paul Sealock b401a4845b Update configs to simplify Show > Advanced Filters 2019-03-07 10:29:54 +13:00
Joshua T Flowers e45d311581 Add actionable order statuses settings (https://github.com/woocommerce/woocommerce-admin/pull/1727)
* Add actionable status setting

* Add actionable statuses to settings page

* Hook up actionable order statuses to activity panel

* Hook up actionable order statuses to activity panel
2019-03-06 13:14:38 +08:00
Jeff Stieler b23ae97eff Skip dispatching fresh data requests when the window/tab is hidden. 2019-03-04 12:47:48 -07:00
Albert Juhé Lluveras a8ee12e1f9 Fix empty chart and summary numbers when searching in the Categories report (https://github.com/woocommerce/woocommerce-admin/pull/1698) 2019-02-27 17:28:18 +01:00
Albert Juhé Lluveras b85eef53fd Display table placeholder instead of empty table when loading search terms (https://github.com/woocommerce/woocommerce-admin/pull/1682) 2019-02-26 10:28:50 +01:00
Albert Juhé Lluveras 1660484d4c Escape commas in search terms (https://github.com/woocommerce/woocommerce-admin/pull/1605) 2019-02-20 10:21:05 +01:00
Paul Sealock 2e82211616 Add products/stats endpoint to categories 2019-02-15 09:44:46 +13:00
Timmy Crawford ffe45e0658 Up freshness interval default. (https://github.com/woocommerce/woocommerce-admin/pull/1549) 2019-02-14 09:23:36 -08:00
Justin Shreve 24301e0090 Add stock stats endpoint and hook up to the stock report. (https://github.com/woocommerce/woocommerce-admin/pull/1535)
* Add stock stats endpoint and hook up to the stock report.

* Handle PR feedback
2019-02-13 22:31:27 -05:00
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 a1bbd22ca2 Update product details report to use getItems (https://github.com/woocommerce/woocommerce-admin/pull/1488) 2019-02-06 11:24:40 -05:00
Joshua T Flowers b7379def1b Format todo comments to match WC Core format (https://github.com/woocommerce/woocommerce-admin/pull/1474)
* Format todo comments to match WC Core format

* Remove variations todo comment
2019-02-06 14:41:53 +08:00
Justin Shreve 949afce248 Add Product Detail Report & Finish Comparison Chart Mode Functionality (https://github.com/woocommerce/woocommerce-admin/pull/1391)
Product detail report and comparison

Code cleanup

Fix 404 on product variations endpoint after rebase

Fix up tests

Fix loading indicators and add some checks around malformed variation response

Add date filtering SQL bits to the variations query

Handle PR feedback: Fix viewport, fix duplicate product issue, fix legend display reset, fix bargraph overflow, fix some coding standards/whitespace, add extra variation santiziation.

Fix scroll on wide charts, and fix undefined prop getting passed into report chart render
2019-02-05 13:12:58 -05:00
Albert Juhé Lluveras 84ef5ffb89 Show empty table when search returns no results (https://github.com/woocommerce/woocommerce-admin/pull/1452)
* Show empty table when search returns no results

* Fix singular wrong string for 'orders'

Co-Authored-By: Aljullu <aljullu@gmail.com>

* Check if search returned 0 results inside table components instead of passing a prop
2019-02-05 13:00:37 +01:00
Albert Juhé Lluveras 666d8e4a3b Merge getOrders and getItems (https://github.com/woocommerce/woocommerce-admin/pull/1438)
* Move labels loading logic into a lib

* Move lib/labels into lib/async-requests

* Implement tabular data filtering

* Allow searching for string in report tables

* Add table filtering to customers table

* Get ids from searched string to populate the table

* Fix autocompleter keyboard interactions

* Improve props naming

* Cleanup report customers data store

* Prevent an edge case issue that might not update the selectedOptions when directily modifying the URL

* Fix wrong selected autocompleter option

* Add missing translation domain

* Move searchItemsByString to wc-api/items/utils.js

* Avoid autocompleter results appearing when there was no search string

* Alphabetically order 'allowFreeTextSearch' prop

* Reset selected table rows when directly modifying the URL

* Simplify props destructuring

* Undo customers data store change

* Simplify isProductDetailsView expression

* Improve order

* Merge getOrders and getItems
2019-02-01 11:01:42 +01:00
Albert Juhé Lluveras d8ed3b6614 Implement tabular data filtering (https://github.com/woocommerce/woocommerce-admin/pull/1381)
* Move labels loading logic into a lib

* Move lib/labels into lib/async-requests

* Implement tabular data filtering

* Allow searching for string in report tables

* Add table filtering to customers table

* Get ids from searched string to populate the table

* Fix autocompleter keyboard interactions

* Improve props naming

* Cleanup report customers data store

* Prevent an edge case issue that might not update the selectedOptions when directily modifying the URL

* Fix wrong selected autocompleter option

* Add missing translation domain

* Move searchItemsByString to wc-api/items/utils.js

* Avoid autocompleter results appearing when there was no search string

* Alphabetically order 'allowFreeTextSearch' prop

* Reset selected table rows when directly modifying the URL

* Simplify props destructuring

* Undo customers data store change

* Simplify isProductDetailsView expression

* Improve order

* Filter tax code parts before modifying them
2019-02-01 10:55:19 +01:00
Joshua T Flowers 49e78b90cf Add settings page with excluded order statuses (https://github.com/woocommerce/woocommerce-admin/pull/1364)
* Add settings page routes

* Add control options for excluded statuses

* Add control options for excluded statuses

* Add excluded order statuses to rest api

* Add wc settings to wc-api

* Add wc settings to wc-api

* Split and validate multiselect values in settings controller

* Add wcAdminSettings to wcSettings global

* Set initial excluded statuses from serverside wcSettings data

* Add extensible filter for wcSettings global

* Split arrays into comma separated strings in wc-api

* Extract setting as separate component

* Extra settings to config file

* Add checkboxGroup option as input type

* Separate status types into default and custom groups

* Add setting option styling

* Add responsive styling for settings

* Fix wpClosedMenu and wpOpenMenu for settings page

* Add support for resetting to default values

* Only show checkbox group if options are available

* Add proptypes to Setting component

* Add extensible filter to analytics settings

* Add readme for settings config and extensibility

* Hook up excluded status settings to reports

* Pass object to settings API instead of comma delimited string

* Fix inpuType -> inputType typo

* Remove hasError from constructor

* Bump settings API to v4

* Use interpolateComponents instead of dangerously setting html

* Use empty array in initial excldued statuses setting value if none is retrieved

* Remove double check for refunded status in default order statuses

* Update settings wc-api to use namespace

* Add aria=labelledby to checkbox group
2019-01-31 09:04:11 +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
Jeff Stieler 7592dae4bb Merge pull request woocommerce/woocommerce-admin#1385 from woocommerce/add/customers-report-table-summary
Add table summary to Customers Report
2019-01-28 09:59:52 -07:00
Jeff Stieler 0ef976f964 Increase default wc-api timeout to 1 minute.
Large datasets may cause responses to take longer than 5 seconds.
2019-01-22 11:22:28 -07:00