Commit Graph

1767 Commits

Author SHA1 Message Date
Paul Sealock 52137fe3fa bump wp components and base styles (https://github.com/woocommerce/woocommerce-admin/pull/5293) 2020-10-09 12:10:32 +13:00
Fernando 3fb1fbba6a Invalidating cache for "getTasksStatus" (https://github.com/woocommerce/woocommerce-admin/pull/5291)
This commit invalidates the cache for "getTasksStatus" to force a rerequest of the value.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-08 14:25:41 -07:00
Joel Thiessen 23c19ee1b2 Removing breadcrumbs from wc-admin header, replacing with simple titl… (https://github.com/woocommerce/woocommerce-admin/pull/5232)
Removing breadcrumbs from wc-admin header, replacing with simple title (https://github.com/woocommerce/woocommerce-admin/pull/3963)

This is an interim step towards the integration of wc-navigation, where a back button will be provided to restore the critical functionality of the breadcrumbs. Note that the `breadcrumbs` data was preserved since it's still being utilized do construct the document title (in semi-breadcrumb-fashion) on both the backend and front-end.
2020-10-06 13:42:46 -07:00
Fernando 20a14ca689 Added animation to Inbox note deletion (https://github.com/woocommerce/woocommerce-admin/pull/5263)
This commit adds an animation to Inbox note deletion

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-06 11:07:06 -03:00
Fernando 1da4eedbf0 Moved Inbox Panel component (https://github.com/woocommerce/woocommerce-admin/pull/5252)
This commit moves the Inbox Panel component

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-06 10:13:32 -03:00
Joel Thiessen 484221c0cd Updating Stripe key field validation to support test keys (https://github.com/woocommerce/woocommerce-admin/pull/4391) (https://github.com/woocommerce/woocommerce-admin/pull/5201)
Updating Stripe key field validation to support test keys (https://github.com/woocommerce/woocommerce-admin/pull/4391)

Currently the form to configure Stripe keys accessed via the task list presents an error when test keys are used. I've updated the validation in order to support the format for test keys as well.
2020-10-05 11:52:12 -07:00
Bec Scott a75d1a5254 Change store details tooltip to a popover (https://github.com/woocommerce/woocommerce-admin/pull/5212)
* Change store details tooltip to a popover

* Change 'skip setup' tooltip to be a popover as well

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-02 11:47:08 +10:00
Paul Dechov 4d0e062ee1 Task list: Turn off Stripe test mode when submitting live keys (https://github.com/woocommerce/woocommerce-admin/pull/5226) 2020-09-30 09:24:14 -07:00
Sam Seay 305eff84b3 Fix a bug where the store task list would remain after completion (https://github.com/woocommerce/woocommerce-admin/pull/5205)
* Adjust the logic of display of the store setup link.

* Fix a bug where some values of woocommerce_task_list_complete cause issues with updating.
2020-09-29 08:24:39 -07:00
Fernando 2cf7ea56a8 Onboarding - Store Profiler - Removed selected CBD option for eCommerce plan (https://github.com/woocommerce/woocommerce-admin/pull/5124)
* Added filter to selected industries list

This commit adds a filter to the selected industries list

* Fixed lint error

* Fixed lint issues

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-29 08:10:40 -07:00
Fernando 63f2b9de8b Enlarged store profiler text in two steps (https://github.com/woocommerce/woocommerce-admin/pull/5194)
* Fixed small text in OBW

This commit makes some OBW texts larger

* Fixed list items size

This commit makes the list items in the 2nd step of the OBW larger

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-29 08:04:30 -07:00
Joshua T Flowers 6e8b4bad5f Fix header height and positioning for wc nav (https://github.com/woocommerce/woocommerce-admin/pull/5173)
* Fix header height and positioning for wc nav

* Remove body margin via CSS
2020-09-29 15:57:50 +03:00
Jeff Stieler 264aa8dee4 Add Variations Report (https://github.com/woocommerce/woocommerce-admin/pull/5167)
* Add initial Variations Report to analytics feature.

* Restrict query to variations when not specifying any product IDs.

* Add route to get variations without specifying a parent.

* Move variations table component to variations report directory.

* Add missing LIMIT clause to variations report query.

* Remove broken features from Variations table.

* Add Variations report controller to CSV emailer.

* Add initial Variation Stats endpoint, based on Product Stats.

* Hook Variations Report components up to new stats endpoint.

* Hook attribute filter up to variations report queries.

* Remove variation title filter usage.

See: https://github.com/woocommerce/woocommerce-admin/pull/5100

* Use filtered separator in variation name formatting.

* Add "single variation" to variations report, fix autocompleter API request.

* Fix segmentation by variation.

* Add comparison to variations report.

* Always include manually specified variations in report results.

* Fix variations report table comparison mode.

The ReportTable component expects the `filter` query param.

* Fixing styling of compare button without table search component.

* Add variation filter to Orders report.

* Link orders count to orders report filtered by variation.

* Orders report: include variation attributes in product names.

* Further style tweaks for variations report download button.

* Add variations filter to order stats query.

* Clean up "category includes" login in REST controllers.

Prep for "category excludes" in the Variations report.

* Support category exclusion in report filters.

* Fix filter param used by the variation report table component.

* Add category filter to variations report.

* Fix initial selected ReportTable rows when using non-default compareParam.

* Add a new autocompleter for variable products.

* Add products filter to variations report.

* Fix tests.

* Handle variation IDs that are no longer found.

* Add documentation.

* Use getSetting() instead of directly accessing window properties in client code.

* Fix ordering Variations by SKU.
2020-09-25 09:57:48 -04:00
Fernando 1f667456b2 Modified "Skip setup wizard" button text (https://github.com/woocommerce/woocommerce-admin/pull/5196)
This commit changes the "Skip setup wizard" button text to "Skip setup store details"

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-25 08:48:14 -03:00
Sam Seay e6d5786d1b Adjust the logic of display of the store setup link. (https://github.com/woocommerce/woocommerce-admin/pull/5180) 2020-09-25 09:23:27 +12:00
Fernando ce3dab196e Renamed task list item (https://github.com/woocommerce/woocommerce-admin/pull/5190)
This commit renames the task list item "Store wizard" to "Store details"

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-24 08:53:13 -03:00
Joshua T Flowers 12ffd61133 Show payments task for non-US stores when wcpay installed (https://github.com/woocommerce/woocommerce-admin/pull/5166) 2020-09-23 05:55:19 -07:00
Fernando 4aa01340ab Store Profiler - Industry: reduced padding and removed industry (https://github.com/woocommerce/woocommerce-admin/pull/5157)
* Reduced list padding

This commit reduces the industries list "padding" and its "min-height"

* Removed item from industries list

This commit removes the item "Art, Music & Photography" from the industries list

* Fixed e2e tests

This commit fixes the e2e tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-22 09:20:42 -03:00
Sam Seay b492a2aa15 Use 'yes' to update modal dismiss option. (https://github.com/woocommerce/woocommerce-admin/pull/5152)
Fixes a bug in Atomic sites where dismissing the home screen modal would not set the option causing the modal to come back on each reload.
2020-09-19 08:19:55 +12:00
Paul Sealock 328075abb7 Remove ` @woocommerce/wc-admin-settings` from data package (https://github.com/woocommerce/woocommerce-admin/pull/5158)
* remove getAdminLink

* prep for package release

* correctly pass in args

* tests
2020-09-18 14:22:52 +12:00
Francesco 36f61c89f1 chore: rename WCS to WC Shipping & Tax (https://github.com/woocommerce/woocommerce-admin/pull/5139) 2020-09-16 16:45:16 -05:00
Bec Scott 90567853de Enable the home screen for everybody (https://github.com/woocommerce/woocommerce-admin/pull/5108)
* One-shot to enable the homescreen for everybody

* Make the home page the default (only) experience

* remove option check in activity panel tabs, get tests working, fix lint issues

* Remove is-homescreen CSS class

* Remove extra home page route registration

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-15 09:44:46 +10:00
Bec Scott 5310944f17 Add option to not charge sales tax (https://github.com/woocommerce/woocommerce-admin/pull/5111)
* Add option to not set up sales tax

* Correct JS lint errors

* Add abort option to plugin step

* Inline redirect to home page

* Use testing-library/react for the new test

* Also set woocommerce_calc_taxes to 'no'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-14 08:50:02 +10:00
Adrian Duffell 7cd9e7f929 Remove the chevron icons from the “Finish setup” task list (https://github.com/woocommerce/woocommerce-admin/pull/5114)
* Remove the chevron icons from the “Finish setup” task list

* Add a data-testid attribute to the TaskDashboard dismiss button for testing

* Add test for dismiss button in TaskDashboard component
2020-09-11 14:09:17 +08:00
Jeff Stieler 35ee9901bc Avoid changing product titles by removing variation title filter usage. (https://github.com/woocommerce/woocommerce-admin/pull/5100)
* Remove use of `woocommerce_product_variation_title_include_attributes` filter.

* Use attribute values in product variation titles.

* Include attribute values in product variation name during segmentation.

* Include attribute values in product variations autocompleter query.
2020-09-09 09:29:10 -04:00
Bec Scott cd128488df Add initial end to end test suite (https://github.com/woocommerce/woocommerce-admin/pull/5028)
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-09-04 14:31:09 +12:00
Timmy Crawford 6e419e14ee Onboarding: Add TOS note to bundle install. (https://github.com/woocommerce/woocommerce-admin/pull/5096) 2020-09-03 16:35:06 -07:00
Paul Sealock 3c6483e842 Remove wc api 🎉 (https://github.com/woocommerce/woocommerce-admin/pull/5075)
* remove wc-api selects and constansts

* remove extendedItems dependence on wc-api

* remove wc-api

* PR feedback
2020-09-04 09:45:40 +12:00
Jeff Stieler ebfd28a9e6 Add product attribute filter to Orders Report. (https://github.com/woocommerce/woocommerce-admin/pull/5068)
* Add product attribute filter to Orders report config.

* Add attribute args to Orders report controller.

* Include attribute filters in orders report query.

* Add attribute args to Orders Stats report controller.

* Include attribute filters in orders report stats query.

* Add test for product attribute filter in orders report.

* Add tests for invalid parameter values.

* Add tests for product attribute filter in order stats endpoint.

* Fix tests for PHP 5.6 and WC 3.8.x.
2020-09-03 10:08:06 -04:00
Jeff Stieler 8814f6b46a Fix `analytics_filters_filter` event props. (https://github.com/woocommerce/woocommerce-admin/pull/5079) 2020-09-03 10:04:04 -04:00
Sam Seay 2146ccb78e Add an automated taxes smart default (https://github.com/woocommerce/woocommerce-admin/pull/5076) 2020-09-03 14:56:52 +12:00
Bec Scott b4fef3059c Add ToS agreement copy to the WCPay setup task (https://github.com/woocommerce/woocommerce-admin/pull/5085)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-03 12:28:31 +10:00
Bec Scott b5f9cf5fcd New marketing copy for the Kliken Google Ads plugin (https://github.com/woocommerce/woocommerce-admin/pull/5074)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-02 13:42:04 +10:00
Fernando 29e2dbffc9 Migrated "import" store to "wp.data" (https://github.com/woocommerce/woocommerce-admin/pull/4982)
* Migrated the "import" store to "wp.data"

This commit migrates the "import" store to "wp.data"

# Conflicts:
#	client/analytics/settings/historical-data/layout.js
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

* Added error handling

This commit adds error handling to the apiFetch

* Fixred reducer.js

* Added reducer.js tests

* Removed "endpoint" references

* Tests fixed

* Removed old import store files and wc-api-spec import references

This commit removes old import store files and "wc-api-spec" import references

# Conflicts:
#	client/wc-api/wc-api-spec.js

# Conflicts:
#	client/wc-api/wc-api-spec.js

* Added interval to invalidate resolution of getImportStatus

* Fixed timestamp

* Store dependency removed

* Fixed reimport functionality

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Refactored layout.js

* Refactored clearCache method

* inProgress check refactored

* Using activeImport from store

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed console warning

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Migration done!

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed hasImportFinished

* Test fixed

* Removed "setImportFinished" from actions.js and index.js

* Added style to disabled button

* Fixed incorrect "Finalizing"  status

* Fixed tests

* Fixed notes update on importation start

* Removed local constants

* Removed css for disabled button

* Typo corrected

* Fixed param for getImportError method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-01 10:21:31 -03:00
Sam Seay fb03e64ced Profile wizard style consistency updates (https://github.com/woocommerce/woocommerce-admin/pull/5059)
Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-09-01 20:47:49 +12:00
Bec Scott 440137b555 Show usage modal when skipping the OBW (https://github.com/woocommerce/woocommerce-admin/pull/5061)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-01 10:16:53 +10:00
Chris Shultz 570de23747 Stop using missing installPlugin function and fix WCS 1.24 compatibility (https://github.com/woocommerce/woocommerce-admin/pull/5025)
* Update Shipping Banner to use installPlugins since installPlugin has been removed.

* Fix shipping banner compatibility with WCS 1.24.

* Update metabox content to match WC 4.5 metaboxes.
2020-08-31 08:13:14 -07:00
Joshua T Flowers 94db7f7f76 Add monthly pricing toggle to product types (https://github.com/woocommerce/woocommerce-admin/pull/5015)
* Add monthly pricing toggle

* Move product type label to its own folder

* Add popover to product type label

* Add card help text

* Add product type component tests

* Add tests for product types step

* Refactor validation in product types

* Export ProductTypes component for testing
2020-08-28 15:39:24 +03:00
Paul Sealock 7e7064e38c Fix components internal deps (https://github.com/woocommerce/woocommerce-admin/pull/5018)
* Fix components internal deps

* Pass full response

* remove errant comment
2020-08-28 11:55:48 +12:00
Bec Scott b64efcb2e8 Tweak button padding so it works on Safari (https://github.com/woocommerce/woocommerce-admin/pull/5043)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-28 09:00:12 +10:00
Jeff Stieler 650ecac14a Add "Product Attribute" advanced report filter. (https://github.com/woocommerce/woocommerce-admin/pull/5038)
* Simplify variation name logic.

* Remove errant commas from variation autocomplete options.

* Add single variation filter to products report.

* Include more variations in search results.

Also trim the response fields down.

* Add initial AttributeFilter component.

Only selected of attribute names for now.

* Add attribute term selection control.

* Position attribute filter inputs side by side.

* Add loading indicator to attribute term control.

* Clear term when attribute value changes, and handle backspaces.

* Generate screen reader text.

* Translate filter labels, add field separator.

* Improve grammar in screen reader text.

* Fix lint errors.
2020-08-27 08:11:12 -04:00
Jeff Stieler 5e7f2af61d Rename "profile" to "store details". (https://github.com/woocommerce/woocommerce-admin/pull/4965)
* Rename "profile" to "store details".

* Missed some /profiler links.

* Fix linter error.

* Store details => Setup Wizard.

* Rename task list item.
2020-08-27 08:10:23 -04:00
Sam Seay c0c9a20f73 Fix a bug where an event's data was recorded in camel case. (https://github.com/woocommerce/woocommerce-admin/pull/5051)
Fixes woocommerce/woocommerce-admin#4464 

`wcadmin_tasklist_shipping_label_printing` events were being filtered into rejected events because the data being passed was in camel case instead of snake case. This fixes that issue.
2020-08-27 14:26:59 +12:00
Sam Seay c884f96bf9 Add WooCommerce Mobile App Banner Ad for Android and iOS (https://github.com/woocommerce/woocommerce-admin/pull/5037)
Fixes woocommerce/woocommerce-admin#4654 

The feature calls for a mobile app ad banner to be displayed to users on mobile devices.

Based on the discussion in woocommerce/woocommerce-admin#4654 this implements the following:

1. [an iOS Smart App Banner](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html). This banner is a meta tag that is generated in PHP. It will only display on iOS devices. One note about this: **This tag is not directly trackable like the implemented Android banner. If we would like to track its success then I believe [these instructions are relevant](https://stackoverflow.com/questions/12906502/is-it-possible-to-track-click-throughs-from-iphone-smart-banner/20422334woocommerce/woocommerce-admin#20422334)**. 

2. A mobile app banner ad that **only displays on Android** and only displays at the `738px` breakpoint specified in the issue. To only display this banner ad on Android, we use basic checking of the user agent string. I weighed this up against other approaches and for this kind of niche use case a simple UA string check is (imho) still the best way to do this.

3. The banner ad makes use of user preferences to retain a per user setting that determines if that user has dismissed the Android banner. We don't/can't do anything like this for the iOS Smart App Banner (but in theory we shouldn't need to).
2020-08-27 13:46:53 +12:00
Timmy Crawford 0374d48849 Onboarding: Do not show extensions bundle test if CBD is selected. (https://github.com/woocommerce/woocommerce-admin/pull/5040) 2020-08-26 09:15:02 -07:00
Timmy Crawford dd799b0504 Clean up copy/paste (https://github.com/woocommerce/woocommerce-admin/pull/5039) 2020-08-26 09:14:31 -07:00
Joshua T Flowers d4dd74e44a Remove onboarding feature flag and a/b testing (https://github.com/woocommerce/woocommerce-admin/pull/4999)
* Remove store page creation during new onboarding experience

* Remove onboarding feature flag

* Add back in onboarding feature flag to enable feature loading
2020-08-25 00:51:41 +03:00
Jeff Stieler eea63f602f Refactor task list status to onboarding data store. (https://github.com/woocommerce/woocommerce-admin/pull/4998)
* Add onboarding task status API endpoint.

* Add task status to onboarding data store.

* Update appearance task to use onboarding store for status info.

* Update main task list component to use onboarding data store for status info.

* Clear onboarding status info "cache" when setting shipping rates in the task list.

* Clear onboarding status info "cache" when enabling payment methods from the task list.

* Fix onboarding data store reducer tests.

* Clean up redundant code, nest task status settings under new key for hydration.

* Include tasks status in onboarding data hydration.

* Update tax task to use onboarding data store for status info.

* Avoid continually rehydrating onboarding data.

* Refactor payment task method retrieval to use onboarding data store.

* Fix bug with disappearing appearance tax steps.

* Update appearance completion faster by using hydrated onboarding value.

* Avoid PHP warnings when onboarding isn't enabled.

* Remove unused imports.
2020-08-24 09:20:57 -04:00
Joshua T Flowers f2771ab449 Add complete and incomplete task counts to tasklist_complete event (https://github.com/woocommerce/woocommerce-admin/pull/5000) 2020-08-24 14:19:36 +03:00
Sam Seay e61548d2c5 Refactor the Header component from class to function. (https://github.com/woocommerce/woocommerce-admin/pull/5023)
Working towards woocommerce/woocommerce-admin#4654 this refactors the `<Header>` component to be functional so that it can use hooks. The plan is to use the `useUserPreferences` hook there to determine if the mobile banner should be rendered or not.
2020-08-24 10:46:18 +12:00
Paul Sealock 74e8d7622e Items dataStore: Migrate from wc-api (https://github.com/woocommerce/woocommerce-admin/pull/5009)
* Create wp.data folder

* order panel

* fix isUnboundedRequest with Categories

* products report

* products table

* indicators and leaderboards

* orders and stock panels

* utils

* tests

* save

* updateStock

* remove wc-api items

* updateItems -> setItems
2020-08-21 11:37:41 +12:00
Paul Sealock 2f650b74a0 Replace useFilters with wp's withFilters (https://github.com/woocommerce/woocommerce-admin/pull/4962)
* use wp withFilters

* changelog

* remove altogether

* other uses of withFilters

* Add deprecation warning to README
2020-08-21 11:14:55 +12:00
Joshua T Flowers 0605e614a9 Group tasks by completion status (https://github.com/woocommerce/woocommerce-admin/pull/5001) 2020-08-20 22:33:55 +03:00
Daniel Bitzer d8098d6fd7 Adds `@woocommerce/tracks` package (https://github.com/woocommerce/woocommerce-admin/pull/5017)
* Add @woocommerce/tracks package.json

* Add @woocommerce/tracks .npmrc

* Move lib/tracks.js in to tracks package

* Add tracks package debug dependency

* Add readme for tracks package

* Add changelog for tracks package

* Add info about debugging and opt-ins to tracks package readme

* Load tracks package script

* Add tracks package to packages readme

* Add tracks package to webpack config

* Add tracks package external to starter-pack

* Replace lib/tracks uses with @woocommerce/tracks

* Update package-lock.json
2020-08-20 14:29:52 +09:30
Sam Seay 2f1d65847c Remove usage of __experimentalResolveSelect (https://github.com/woocommerce/woocommerce-admin/pull/4949)
This uses a generator action and hooks to reimplement the CTA as a more
simple and logicless component, with most of the logic now in the
HOC component.
2020-08-20 16:02:01 +12:00
Paul Sealock c7f63f7452 get selectors from wc-api (https://github.com/woocommerce/woocommerce-admin/pull/4997) 2020-08-19 10:03:40 +12:00
Jeff Stieler c16da34c30 Migrate export data store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4958)
* Add export ID to success response and fix typos in endpoint schema.

* Initial export data store.

Allows for starting export, but not checking progress.

* Use new export data store in analytics report tables.

* Remove defunct report export wc-api files.

* Apply review feedback from another wp.data PR.

* Use getResourceName() util for more DRYness.

* Fix linter error.

* Add response status code to fetchWithHeaders control.

* Use HTTP status rather than response body to determine success.

* Fix tests.

* Remove unused import from actions.
2020-08-18 09:04:58 -04:00
Joshua T Flowers df89bb7aac Fix note data actions and consolidate query constants (https://github.com/woocommerce/woocommerce-admin/pull/4990) 2020-08-18 14:45:42 +03:00
Timmy Crawford 7b2aedf88b Final css tweaks for business modal in onboarding wizard. (https://github.com/woocommerce/woocommerce-admin/pull/4994) 2020-08-17 15:11:42 -07:00
Paul Sealock 8afad405d4 Remove unused lib/date (https://github.com/woocommerce/woocommerce-admin/pull/4987) 2020-08-18 09:53:13 +12:00
Paul Sealock 5cbd4ed521 Documentation: Fix Add Report (https://github.com/woocommerce/woocommerce-admin/pull/4991)
* Update readme

* better
2020-08-18 09:45:21 +12:00
Paul Sealock 23846221e6 jsDoc: Fix errors (https://github.com/woocommerce/woocommerce-admin/pull/4985)
* jsDoc errors, round 1

* round 2

* round 3

* voila

* root0 -> props
2020-08-18 09:36:24 +12:00
Timmy Crawford dfdc6d8f28 CSS fixes for Business Features popover. (https://github.com/woocommerce/woocommerce-admin/pull/4907) 2020-08-17 12:13:12 -07:00
Bec Scott c253cc7796 Add updateOptions prop to Layout tests (https://github.com/woocommerce/woocommerce-admin/pull/4986)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-17 10:30:46 +10:00
Jeff Stieler 7ad5ea7d8d Use filtered headers array in onColumnsChange callback. (https://github.com/woocommerce/woocommerce-admin/pull/4964)
* Use filtered headers array in onColumnsChange callback.

* Table column example: show headers when there are no results.
2020-08-14 12:14:04 -04:00
Joshua T Flowers 1d339174f8 Migrate reports data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4966)
* Move controls to data package root

* Add reports data store in wp data

* Move report utils to data package

* Update error state and actions to match existing methods

* Update references to reports data store

* Add error setters

* Fix control registration path

* Add reports reducer tests

* Remove remaining report wc-api references

* Handle PR feedback

* reference packgage, not lib/date

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-08-14 14:19:04 +03:00
Paul Sealock c3d1e1eb61 Stock Report: Fix bad text domains (https://github.com/woocommerce/woocommerce-admin/pull/4980)
* Fix bad text domains

* fix currency bug
2020-08-14 08:25:08 +12:00
Joshua T Flowers 483055dd75 Migrate notes data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4943)
* Add initial notes data store using wp data

* Cache individual note queries

* Update notes undo endpoint to batch update endpoint

* Allow batch updates of notes

* Add requesting state

* Update components to use new note store

* Remove old notes store from wc-api

* Get note IDs from json and validate data in REST API

* Add an updating state to each note

* Throw errors in actions so they can be caught by client

* Add store reducer tests

* Handle PR feedback

* Fix failing tests

* Don't set inbox panel visibility while batch updating

* Move woocommerce block to external dependencies
2020-08-13 16:23:38 +03:00
Jeff Stieler 5fbc511f25 Don't directly import from React, use @wordpress/element. (https://github.com/woocommerce/woocommerce-admin/pull/4978) 2020-08-13 08:29:29 -04:00
Paul Sealock c145783e0a Fix dependency declarations (https://github.com/woocommerce/woocommerce-admin/pull/4972)
* renmove WC comment block

* client routes

* more fixes

* moar search

* getting there

* by hand now

* david beating goliath

* mission accomplished

* client filepath

* save

* got it

* remove script

* fixes

* deal with package internal dep

* remove webpack alias

* fix webpack relative paths

* remove commented rule

* remove extra line

* remove unused modules entry
2020-08-13 14:05:22 +12:00
Joshua T Flowers 92a8a58d2b Remove payment task actions (https://github.com/woocommerce/woocommerce-admin/pull/4917)
* Remove task list payment actions

* Check that the payments task has been marked complete in checkout note

* Track payments completion via enabled gateways

* Allow toggling to unfinish task when no payments enabled
2020-08-11 15:20:48 +03:00
Bec Scott b511469dc8 Automatically add free local shipping zone on completing the profiler (https://github.com/woocommerce/woocommerce-admin/pull/4857)
* Set up profile completed action

* Stub out the steps

* Only run if Jetpack is installed and connected

* Return if WCS isn't active

* Return unless physical is selected as a product type

* Return if there are existing shipping zones

* Shipping labels are enabled when WCS is installed

* Set up free local shipping

* Comment for the profiler complete action

* By default there is no international/catch-all shipping method set up

* Add review shipping settings note

* Record tracks event

* Fix logic

* Add unit test around setting up free local shipping

* Rename some functions

* Use countries service to get all countries

* Drop duplicated possibly_add_note()

* Check the old value when determining if the profiler has completed

* Fall back to country code if country name doesn't exist

* Use admin_url fn to build up URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-11 14:39:25 +10:00
Paul Sealock 8d5718fdb8 Reviews: Create wp.data dataStore (https://github.com/woocommerce/woocommerce-admin/pull/4941)
* scaffold out reviews store

* hook up dataStore

* get controls working

* getReviews working

* get count working

* get errors working

* indicators working

* reducer tests

* reviews

* Remove wc-api

* cleanup

* better way to fetch with headers

* add comment with issue

* better resolver
2020-08-11 12:16:27 +12:00
Jeff Stieler a42d4f4683 Don't redirect to connect Jetpack if "no thanks!" selected. (https://github.com/woocommerce/woocommerce-admin/pull/4944) 2020-08-10 08:18:09 -04:00
Timmy Crawford 2b7fddb16b Setup Payments: Add eWAY for AU/NZ Stores. (https://github.com/woocommerce/woocommerce-admin/pull/4947)
* Setup Payments: Add eWAY for AU/NZ Stores."

* Fix typo
2020-08-06 17:09:10 -07:00
Joshua T Flowers 09415ef7a8 Remove erroneous navigation component (https://github.com/woocommerce/woocommerce-admin/pull/4923) 2020-08-06 17:07:36 -07:00
Harris Wong 276d8455b0 Update style on shipping banner (https://github.com/woocommerce/woocommerce-admin/pull/4948)
* Change is-button to is-primary to address style issues

* Make sure the text is vertically aligned
2020-08-06 17:06:05 -07:00
James Koster 2c592b1209 Update the colors of the illustrations in the welcome modal to use the theme spot color (https://github.com/woocommerce/woocommerce-admin/pull/4945) 2020-08-06 16:58:00 -07:00
Sam Seay 0d95facf92 Task list - add a shortcut back to store setup (https://github.com/woocommerce/woocommerce-admin/pull/4853)
Fixes woocommerce/woocommerce-admin#4592

This adds the functionality to support a store setup tab displayed in ActivityPanel. The tab currently just redirects to the home page, rather than implementing the nice-to-haves of displaying the task list in the panel. The reason for this, is that I found it would require significant refactoring of the task list to support this currently.

As part of this I have also refactored rendering of tabs inside into 2 new functional components: <Tabs> and <Tab>. The reason for this is to decompose large untestable components, test them and by virtue of being decomposed they will also be more reusable in future. Ideally would have been refactored to a functional component as well, but it would have been too large a task.
2020-08-06 10:02:24 +12:00
Sam Seay 34d8d930b0 Display modal with more info about the new homescreen (https://github.com/woocommerce/woocommerce-admin/pull/4890)
Fixes woocommerce/woocommerce-admin#4590

This implements a paged modal via the Gutenberg Guide component. Some styling adjustment was needed to match the designs exactly.

This also introduces 3 SVG based illustrations for display in the modal. According to this comment there is a need to color them based on the theme at some point, but based on a current lack of requirements for that, I felt that could be done at a separate time (that was suggested in the comment as well).
2020-08-05 12:14:56 +12:00
Jason Conroy b078134073 Add product and category props to mock RecommendedExtensionsItem (https://github.com/woocommerce/woocommerce-admin/pull/4912) 2020-08-04 15:04:27 -07:00
Joshua T Flowers cf66e7984c Allow revisiting of the payments task (https://github.com/woocommerce/woocommerce-admin/pull/4918)
* Allow revisiting of the payments task

* Remove un-used import of getAdminLink

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-08-03 16:05:39 -07:00
Fernando Espinosa 95ce793bc0 Remove new WP 5.5 meta box arrows in the shipping banner (https://github.com/woocommerce/woocommerce-admin/pull/4914) 2020-08-03 15:56:31 -07:00
Timmy Crawford 1855057d25 Onboarding: Change account required text on biz step. (https://github.com/woocommerce/woocommerce-admin/pull/4909) 2020-08-03 15:08:07 -07:00
Timmy Crawford 979251784d Use lifesaver icon instead of gridicon for help panel. (https://github.com/woocommerce/woocommerce-admin/pull/4905) 2020-08-03 14:54:57 -07:00
Fernando a39e6fee62 Added personalization to purchase extension task (https://github.com/woocommerce/woocommerce-admin/pull/4849)
* Added personalization to purchase extension task

This commit adds personalization to purchase extension task

* Removed unnecessary naming fix

This commit removes an unnecessary naming fix

* Corrected param description

* Solved translation problem

* Naming corrected

The method 'getGroupedOnboardingProducts' was given a more accurate name.

* Modified string substitution

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-08-03 16:24:57 -03:00
Fernando 5ab72f6137 Activity Panel - event tracking improved (https://github.com/woocommerce/woocommerce-admin/pull/4861)
* Added event recording to `ProductStockCard`

This commit adds event recording to `ProductStockCard`

* Added event recording to `OrdersPanel`

This commit adds event recording to the orders panel

* Added event recording to `ReviewsPanel`

This commit adds event recording to the reviews panel

* Added `learn_more` event recording

* Modified orders event names

* Added event 'wcadmin_activity_panel_orders_learn_more' to Orders

* Modified "orders.js" indentation

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-08-03 13:38:57 -03:00
Joshua T Flowers 2902b8871b Only show WCPay task in US based stores (https://github.com/woocommerce/woocommerce-admin/pull/4899) 2020-08-03 11:22:25 +03:00
Jason Conroy a8275715e3 Use clipRule and fillRule props (https://github.com/woocommerce/woocommerce-admin/pull/4889) 2020-07-31 09:44:56 +09:30
Jeff Stieler adf51fc173 Center all descriptive text on OBW steps. (https://github.com/woocommerce/woocommerce-admin/pull/4902) 2020-07-30 13:58:10 -04:00
Jeff Stieler 53031f3fae OBW: fix product types step bugs (https://github.com/woocommerce/woocommerce-admin/pull/4900)
* OBW: fix tooltip display on product types step.

* Restore physical products as default.

* Slight improvement to screen reader text.
2020-07-30 12:14:18 -04:00
Jeff Stieler ee057bcb37 Enable tax calculation before redirecting to standard tax rates page. (https://github.com/woocommerce/woocommerce-admin/pull/4878) 2020-07-30 12:04:21 -04:00
Paul Sealock 80f4a86515 Declare packages dependencies independently of main package.json (https://github.com/woocommerce/woocommerce-admin/pull/4874)
* create file declaration to packages

* bump wordpress/components in packages

* get format right
2020-07-30 13:51:15 +12:00
Darren Ethier dc5304823b Add @woocommerce/eslint-plugin (https://github.com/woocommerce/woocommerce-admin/pull/4714)
* add new woocommerce/eslint-plugin

* implement eslint-plugin (switch scripts to use wp-scripts etc)

* various linting fixes

* more lint fixes

* improve fix script

* more eslint fixes

* more eslint fixes

* temporary convert rules to warnings until they are all handled

* linting fixes

* update package-lock.json

* remove duplicates

* remove unnecessary `@wordpress/dependency-group` rule config

* add docs and adjust rules

* prettier fix

* fix merge artifact

* convert more rules to warnings

* change order to reflect importance

* install babel-preset-default

* remove unnecessary configuration for babel

* fix dependency group rule and test

* fix test

* handle collapsible whitespace

* add react testing library eslint plugin

* linter errors

* Add back in prettierrc

* package-lock update

* js lint fix with --fix

* disable whitespace in translation

* package-lock update

* make eslint actual dependency, not peer dependency

* pin eslint to v7

* I don't know why, but its working

* fix lint js

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-07-28 14:32:58 +12:00
Joshua T Flowers fe4fcf2467 Add the experimental resolver to WCA data package (https://github.com/woocommerce/woocommerce-admin/pull/4862)
* Add the experimental resolver to WCA data package

* Add note about function origin and deprecation
2020-07-27 17:07:39 -07:00
Paul Sealock ac91a8fd60 Summary number bg (https://github.com/woocommerce/woocommerce-admin/pull/4858) 2020-07-28 11:45:36 +12:00
Bec Scott 533138a335 Center the skip link on the theme selection step (https://github.com/woocommerce/woocommerce-admin/pull/4847)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-23 09:37:40 +10:00
Chris Shultz 795c6ca585 Add copy that WCS TOS will be accepted upon install. (https://github.com/woocommerce/woocommerce-admin/pull/4799)
* Add copy that WCS TOS will be accepted upon install.

* Remove unused getAdminLink import.

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-07-22 10:11:11 +10:00
Timmy Crawford ae6f5d4615 Onboarding: Fix alignment of container on benefits screen. (https://github.com/woocommerce/woocommerce-admin/pull/4837) 2020-07-21 14:03:34 -07:00
Bec Scott 551dfe1f0c Pills and tooltips in product step of OBW (https://github.com/woocommerce/woocommerce-admin/pull/4707)
* Add monthly product prices to OBW

* Remove description for physical and download products

* Use pills in product selection step of OBW

* Add missing translation wrapper, also convert some spaces to tabs

* Add pill to changelog

* Change pills to medium gray text and border

* Make everything line up correctly on smaller viewports

* Get the styles closer to the design

* Breakpoint to set font size to 11px

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-21 14:27:32 +10:00
Sam Seay a6ea004ee8 Rework the store details onboarding screen (https://github.com/woocommerce/woocommerce-admin/pull/4771)
Fixes woocommerce/woocommerce-admin#4566 **(and is dependent on the changes from woocommerce/woocommerce-admin#4759 )**

Changes:

* Use the new `Card` and `Flex` from `@wordpress/components`
* Add contextual tooltips
* Adjust existing styles to match [new designs](https://www.figma.com/file/JH9XMFUCOjfXdr3N09AHRD/On-boarding-iterations-June-'20)
2020-07-21 12:12:19 +12:00
Paul Sealock 2b56a9c015 Dashboard: Fix filter extensibility (https://github.com/woocommerce/woocommerce-admin/pull/4758)
* pass filterQuery to components

* pass filters to charts

* apply formatting
2020-07-21 10:17:28 +12:00
Joshua T Flowers 50ba675040 Create single source of truth for task list array (https://github.com/woocommerce/woocommerce-admin/pull/4825)
* Remove duplicate getAllTasks call

* Create single source of truth for task list array
2020-07-20 09:19:01 +03:00
James Koster 2fc2ad6ca9 Update store management links (https://github.com/woocommerce/woocommerce-admin/pull/4790)
Remove chevrons
2020-07-17 13:47:18 +01:00
Sam Seay b448ff60b7 Update @wordpress/base-styles and replace deprecated variables (https://github.com/woocommerce/woocommerce-admin/pull/4759)
Fixes woocommerce/woocommerce-admin#4732

This updates `@wordpress/base-styles`, and because `@wordpress/components` depends on variables from it, that must be updated as well.

There are 3 major changes required as part of updating:

1. The $theme-color variable is no longer exposed by base-styles. Instead there are 3 css vars exposed. These are made available by use of a provided mixin. Situations where $theme-color was darkened using scss have been mapped as best as possible to the 2 other darkened shades of the css var that are available such as `--wp-admin-theme-color-darker-20` and `--wp-admin-theme-color-darker-10`. In some cases this means the colors are not exactly the same as before.

2. The post css `theme()` call is no longer available. All uses of this have been consolidated to use of the main theme css var `--wp-admin-theme-color`. This means that calls like `theme(secondary)` or `theme(outline)` etc have all been consolidated to the one color.

3. Many of the variables used for different shades of gray have been deprecated. These have been mapped across to the new gray variables. (Mapped according to the list described in woocommerce/woocommerce-admin#4732)
2020-07-17 12:11:42 +12:00
Fernando c950b9fafd Reordered home screen tasks (https://github.com/woocommerce/woocommerce-admin/pull/4754)
* Removed task item `connect`

This commit removes the task item `Connect your store to WooCommerce.com`

# Conflicts:
#	client/task-list/tasks.js

* Reordered home screen tasks

This commit reorders the task list visible on the home screen.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-16 15:09:36 -03:00
Fernando 0c4dfb823c Added event recording to home/dashboard task list (https://github.com/woocommerce/woocommerce-admin/pull/4743)
This commit adds event recording to home/dashboard task list

# Conflicts:
#	client/task-list/tasks.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-16 13:54:31 -03:00
Fernando a7a59583c9 Added skip profiler functionality (https://github.com/woocommerce/woocommerce-admin/pull/4721)
* Added skip profiler functionality

This commit adds the skip profiler functionality, leaving the Home screen `Store details` as incomplete.

# Conflicts:
#	client/task-list/tasks.js

* Unit tests repaiared

* Added OBW page

This commit makes the necessary changes to add an OBW page

# Conflicts:
#	client/profile-wizard/index.js

* Event name changed

This commit renames the event name we were recording since it was wrong.

* Redirection modified

This commit modifies the way we do redirection

# Conflicts:
#	client/profile-wizard/index.js

* Removed `profiler` feature flag

* Removed `profiler` feature flag

This commit removes the `profiler` feature flag

* Added error handling for `updateProfileItems`

This commit adds error handling for the method `updateProfileItems`

* Update client/profile-wizard/index.js

Co-authored-by: Matt Sherman <matt.sherman@automattic.com>

* Removed "throw" from "then"

* Update client/dashboard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/profile-wizard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Modified redirection URL

This commit modifies the redirection URL.

# Conflicts:
#	client/task-list/tasks.js

# Conflicts:
#	client/profile-wizard/index.js

* Removed the variable "lastStep" and the related logic.

* Removed change of state for variable "skipped"

* Added error trowing to onboarding actions

This commit adds error trowing to onboarding actions

* Removed response handling for `updateProfileItems`

* Added default value for "profileItems" in Homescreen and Dashboard

* Removed `step` from OnboardingProfile and test

This commit removes the `step` from OnboardingProfile.php and from tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-07-16 12:17:10 -03:00
Jason Conroy 8afaa58b9e Update marketing tab styles (https://github.com/woocommerce/woocommerce-admin/pull/4794)
* Fix incorrect woocommere-admin spelling

* Update styles

* Add icons

* Add hover effect for coupon icons

* Remove variable comment

* Update color case

* Style lint fixes

* Use $theme-color

* Update icons, use wordpress/icons where possible

* Adjustment for using smaller default icons and no fills in the svgs

* Use var(--wp-admin-theme-color) instead of $theme-color

* Reorg coupons stylesheet

* Update PropTypes for ProductIcon

* Adjust icon export

* Rever to using $theme-color

* Add versions of link, people and currency-dollar

* Overide coupons icon background color

* Add background transition to icon wrapper
2020-07-16 15:22:06 +09:30
Joshua T Flowers 90c1431129 Update connection flow for Bundle UI (https://github.com/woocommerce/woocommerce-admin/pull/4717)
* Move Jetpack connection from benefits to profiler completion

* Handle profiler completion and connection URL async

* Update cached components on each profiler step

* Show bundle install UI based on segment

* Create notice on error catch

* Refactor redirect after promise completion

* Fix up accessiblity issues in bundle popover UI
2020-07-15 17:52:21 +03:00
Jeff Stieler 98f09e2b7d Add option to automatically create a PayPal account (https://github.com/woocommerce/woocommerce-admin/pull/4804)
* Add "create an account" option to PayPal setup.

Requires a connected Jetpack and WCS.

* Incorporate account creation into multiple flows.

Consolidate form code as well.

* Empty emails aren't valid.

* Remove defunct manual form render.

* Only validate API credentials if needed.

* Update PayPal settings for account creation flow.

* Add first basic test for PayPal setup task.

* Add more test coverage.

* Add some padding to the create account form.

* Only show "create account" if WCS TOS has been accepted.
2020-07-15 08:10:21 -04:00
Matt Sherman c85f6bf0f3 Onboarding: Center continue buttons in profile wizard (https://github.com/woocommerce/woocommerce-admin/pull/4802) 2020-07-15 07:24:00 -04:00
Bec Scott 480362ca29 Admin note to install other payment providers (https://github.com/woocommerce/woocommerce-admin/pull/4795)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-15 12:09:49 +10:00
Jeff Stieler 7da3a59465 Show "Help" Activity Panel When Working Single Task List Item (https://github.com/woocommerce/woocommerce-admin/pull/4779)
* Add initial (rough) help panel.

Only includes "products" task items.

* Add help links for other tasks.

* Add header to help tab content.

* Toggle activity panel tabs when performing a setup task.

* Move query string parsing up a level.

* Pass query string as prop to ActivityPanel.

Fixes rerendering issue when entering a task.

* Pass current task to Help panel.

* Filter payments task help items by available payment methods.

* Filter shipping and tax help items based on WCS install.

* Add generic docs link to all help panels.

* Track help panel open.

* Track help panel link clicks.

* Show WCS help items when prompted to install.

* Tasks are only performed on the main route.

E.g. no value for "path".

* Small tweaks to make AcivityPanel more easily testable.

* Add initial tests for ActivityPanel tab logic.

* Modify HelpPanel component for easier testing.

* Add tests for conditional help panel links.

* Fix tracking keyboard "clicks" on help links.

* Fix query prop on embedded pages.

* Allow filtering of help tab items.
2020-07-14 08:20:51 -04:00
Joshua T Flowers 49a0a9f3a2 Add option to dismiss tasks (https://github.com/woocommerce/woocommerce-admin/pull/4733)
* Add dismiss button as task list item option

* Add option to undo task dismissal

* Record modal dismissal event

* Add transition animation to list items

* Use key for list items instead of index

* Remove dismissed tasks on recompleting profiler steps
2020-07-14 13:46:25 +03:00
Bec Scott 213fba853a Highlight WooCommerce Payments task (https://github.com/woocommerce/woocommerce-admin/pull/4793)
* Add wcpay setup task and hide normal payment task if the wcpay plugin is installed

* Record an event when selecting the wcpay task

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-14 11:40:56 +10:00
Timmy Crawford e02003b46d Onboarding: Don't show tracking modal if site is already opted in to usage tracking. (https://github.com/woocommerce/woocommerce-admin/pull/4766) 2020-07-13 15:35:20 -07:00
Bec Scott a6a8b82280 Limit status to unactioned notes (https://github.com/woocommerce/woocommerce-admin/pull/4765)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-09 14:49:13 +10:00
Bec Scott 3e79e973ab Toggle the “Physical products” checkbox on by default (https://github.com/woocommerce/woocommerce-admin/pull/4702)
* Toggle the “Physical products” checkbox on by default

* change 'preselect' to 'default'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-08 12:14:57 +10:00
Paul Sealock d03f3e9553 fix staticParams (https://github.com/woocommerce/woocommerce-admin/pull/4704) 2020-07-08 12:38:50 +12:00
Joshua T Flowers bfb8b68aa6 Remove navigation feature (https://github.com/woocommerce/woocommerce-admin/pull/4740) 2020-07-06 10:21:15 +03:00
Fernando 7b1a485100 Added new note type (https://github.com/woocommerce/woocommerce-admin/pull/4686)
* Added new note type

This commit adds a new note type `survey`. The note is deleted after calling its CTA.

* Now using const from WC_Admin_Note

* Now using const from WC_Admin_Note in WC_Admin_Notes too

* Moved note deletion from NoteActions to WC_Admin_Notes

This commit moves the note deletion from NoteActions to WC_Admin_Notes. Also adds a hook to clean up actioned survey notes.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-02 15:56:06 -03:00
Joshua T Flowers 44dd1a25b5 Add bundle install UI to Business Details step (https://github.com/woocommerce/woocommerce-admin/pull/4695)
* Add simple business extension install form input

* Install all business extensions when checked

* Add popover with business extension benefits

* Remove errant hasInstallActivateError setState call

* Show popover on click and record event
2020-07-01 15:20:24 +03:00
Joshua T Flowers 8e5291e231 Refactor task tax to use promise chain (https://github.com/woocommerce/woocommerce-admin/pull/4683)
* Show success screen based on conditions instead of step

* Use promise chain to handle updating tax settings

* Fix up error handling for failed setting updates

* Skip store location step if complete address exists

* Fix up pending/requesting state logic

* Allow opt in to TOS on tax task

* Don't complete task from completeStep

* Add caption styling to TOS text
2020-07-01 15:19:15 +03:00
Fernando 1d5e7db33d Preventing refresh after answering a survey note (https://github.com/woocommerce/woocommerce-admin/pull/4711)
* Preventing refresh after answering a survey note

This commit adds the code necessary to prevent a webpage refresh after answering a survey note.

* Modified `action` URL check

This commit refactors the check we do for the action URL.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-30 12:14:55 -03:00
Jeff Stieler c4e9796244 Don't show the inbox panel on the new home screen. (https://github.com/woocommerce/woocommerce-admin/pull/4699)
* Don't show the inbox panel on the new home screen.

* Fix use of withRouter HoC on un-routed embed pages.
2020-06-30 11:10:26 -04:00
Paul Sealock 7dda8ad440 Inbox header: Update styles (https://github.com/woocommerce/woocommerce-admin/pull/4692) 2020-06-29 11:34:53 +12:00
Fernando 0d35c1c791 Added event prop 'screen' to be recorded (https://github.com/woocommerce/woocommerce-admin/pull/4643)
* Added event prop to be recorded

This commit adds the event prop `screen` to `wcadmin_wcadmin_inbox_action_click`

* Getting screen name from referer

Now the we get the screen name from the referer

* The screen name is not being sent anymore to the API

The screen name is not sent anymore to the API. Also, the $screen_name is set as empty in the API to make the method more defensive.

* Created method `get_screen_name`

This commit moves the code related  to getting the screen name to a specific method.

* Added screen name recording for individual posts

This commits adds screen name recording for individual posts

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-25 10:36:59 -03:00
Jeff Stieler a6195efad6 Fix Historical (deleted) Coupon Reporting (https://github.com/woocommerce/woocommerce-admin/pull/4671)
* Add (failing) test for deleted coupon amounts in reporting.

* Always sync an ID into the order-coupon lookup table.

* Don't remove coupon data from order analytics when the coupon is deleted.

* Fix coupon ID lookup from order item metadata.

* Allow negative coupon_id in the lookup table.

Representing deleted coupons.

* Handle deleted coupons when gathering extended info.

* Add more tests for deleted coupon handling.

* Handle deleted coupons in coupons report table.

* Fix lint errors.
2020-06-25 08:51:17 -04:00
Joshua T Flowers 774fd910c2 Refactor Jetpack connection flows (https://github.com/woocommerce/woocommerce-admin/pull/4655)
* Resolve Jetpack connection URL on benefits screen

* Resolve Jetpack connection URL in connection stats

* Fix up error handling for Jetpack connection flows

* Remove autoConnect option from Connect component
2020-06-25 15:01:33 +03:00
Paul Sealock a0d641d7ad Include dash stylesheets in homescreen (https://github.com/woocommerce/woocommerce-admin/pull/4693) 2020-06-24 18:08:30 -07:00
Bec Scott ced920a115 Fix reselecting advanced filters in the customer list (https://github.com/woocommerce/woocommerce-admin/pull/4650)
* Add advanced args to configured static args so it is persistent

* Make sure unique keys are set in loaded labels

* Simplify the key selection because javascript

* Smarten up the filter picker so it only navigates if the selected button has changed

* Add static params for advanced order filters

* Add static param to product comparison config

* Add static param to category comparison config

* Add static param to coupon comparison config

* Add static param to taxes comparison config

* Add static params to downloads comparison config

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-25 10:22:24 +10:00
Bec Scott 7011603c82 Fix dashboard task list menu placement (https://github.com/woocommerce/woocommerce-admin/pull/4664)
* Bring homescreen styles into task list so it is styled correctly in the dashboard view

* Copy homescreen card styles to new .woocommerce-dashboard-card class

* Move styles to dashboard stylesheet.

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-06-25 08:14:44 +10:00
Bec Scott 11ee8aac2d Tweak the embed page CSS so the top content sits better (https://github.com/woocommerce/woocommerce-admin/pull/4622)
* Tweak the embed page CSS so the top content sits better

* Tweak the CSS to take notices into consideration

* Further tweak header styles

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-24 13:52:03 -07:00
James Koster 1649706b22 Fix spacing between stats overview and store management cards (https://github.com/woocommerce/woocommerce-admin/pull/4681)
* Fix spacing between stats overview and store management cards

* Revert "Fix spacing between stats overview and store management cards"

This reverts commit 993374313657f7ecf7803cc738b82bf63ecdf490.

* Home screen div margins
2020-06-24 13:08:59 -07:00
Fernando d1862b725c Added unread notes counter styles (https://github.com/woocommerce/woocommerce-admin/pull/4690)
This commit adds the styles to unread notes counter.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-24 14:58:40 -03:00
Paul Sealock a3b89c8867 save all settings (https://github.com/woocommerce/woocommerce-admin/pull/4661) 2020-06-23 14:47:02 +12:00
Paul Sealock c97e9d5ad1 Tax Task: don't rely on settings requesting (https://github.com/woocommerce/woocommerce-admin/pull/4660) 2020-06-23 13:14:57 +12:00
Daniel Rey López 86d2bc3837 Fix WCPay sometimes not appearing on the task list (https://github.com/woocommerce/woocommerce-admin/pull/4647)
* Fix WCPay sometimes not appearing on the task list

* preload general settings

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-06-23 10:18:35 +12:00
Paul Sealock ee360d14b3 UserPrefs store: Introduce optimistic update (https://github.com/woocommerce/woocommerce-admin/pull/4637)
* optimistically save woo meta

* dashboard

* save only once
2020-06-23 09:25:01 +12:00
James Koster 612ded1cf5 Fix inbox spacing (https://github.com/woocommerce/woocommerce-admin/pull/4632)
* Fix inbox spacing

* css tidy up

* Task list and stats margin
2020-06-22 13:17:17 -07:00
Fernando e0df6fa899 Inbox panel - Actioned inbox notifications now are visible (https://github.com/woocommerce/woocommerce-admin/pull/4621)
* Fix: Actioned inbox notifications now are visible

This commit fixes the actioned inbox notifications, now they are always visible.

* Fixed getUnreadNotes method

This commit fixes the getUnreadNotes method since it was returning the wrong information.

* Added two @todo

This commit adds two @todo referring to a few changes to do after implementing pagination

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-22 11:53:36 -03:00
Bec Scott 062279ffbf Tweak tag remove button style so it is properly centered (https://github.com/woocommerce/woocommerce-admin/pull/4651)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-22 16:02:35 +10:00
Paul Sealock c938b66ee7 Task List: Cleanup styles (https://github.com/woocommerce/woocommerce-admin/pull/4627) 2020-06-19 12:13:41 +12:00
Paul Sealock b5214e95d3 Stats Overview: Cleanup styles (https://github.com/woocommerce/woocommerce-admin/pull/4625) 2020-06-19 11:44:00 +12:00
Ron Rennick 8a22576a95 Count total unique customers instead of new/returning in order stats (https://github.com/woocommerce/woocommerce-admin/pull/4430)
* Count total unique customers instead of new/returning in order stats

* Add customer name to table instead of customer type

* Add customer total to segments

* Update tests for new stats

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-06-18 20:43:56 +03:00
Jeff Stieler 9794fed139 Disable task list on analytics dashboard when homepage is enabled. (https://github.com/woocommerce/woocommerce-admin/pull/4617)
Regression from 8a2750c973.
2020-06-18 10:56:30 -04:00
Bec Scott 76ce5d84f3 Fix logic error that was stopping dismiss link from appearing on the inbox cards (https://github.com/woocommerce/woocommerce-admin/pull/4624)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 14:00:27 +10:00
Bec Scott d36fdc01d7 Add Insight note (https://github.com/woocommerce/woocommerce-admin/pull/4516)
* Add Insight note

* Change actioned_label to actioned_text

* Move actioned text up a level

* Fix comment

* Rename insight class

* Add deny action to insight first sale and fix the button actions

* fix spacing

* Tweak conditions in the inbox card

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 11:28:27 +10:00
Paul Sealock 03db742cdd Currency package: make naming clearer (https://github.com/woocommerce/woocommerce-admin/pull/4560) 2020-06-18 11:33:40 +12:00
Jeff Stieler 6e85cf977a Style cleanup from components update (https://github.com/woocommerce/woocommerce-admin/pull/4606)
* Fix secondary button style in OBW.

* Center snackbar notices in OBW.

* Scope snackbar changes to just the OBW.

* Add busy treatment to Jetpack connect button when redirecting.

* Remove color override for form toggles in ellipsis menus.

* Fix styling of task list.

* Fix button styles in date range picker component.

* Use admin theme colors in calendar component selections.

* Fix datepicker styling on analytics settings page.
2020-06-17 08:58:35 -04:00
Jeff Stieler d591d77a53 Fix deleted products breaking Downloads Report (https://github.com/woocommerce/woocommerce-admin/pull/4582)
* Don't attempt order download information retrieval when the product has been deleted.

* Handle display of download names when product has been deleted.

* Add deleted product test case for download report endpoint.

* Fix date() usage in download report tests.
2020-06-16 09:47:27 -04:00
Bec Scott ad9cf27eaa Add a bottom border to the Install Jetpack CTA (https://github.com/woocommerce/woocommerce-admin/pull/4589)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-16 16:47:49 +10:00
Jason Conroy 4cf586c4f1 Add Coupon feature (https://github.com/woocommerce/woocommerce-admin/pull/4526)
* Handle new object for posts and recommendations

* Set breadcrumb parent for woocommerce-coupons to be woocommerce-marketing

* Add main coupon wrapping component

* Render coupon wrapper element below coupon table using wp-admin-scripts

* Finish off implementing category param for data store resolvers

* Create a helper trait for legacy coupons

* Add coupon related titles and descriptions

* Add note for the coupons being moved

* Allow for querying by note name in the notes Data Store

* Revamp coupon moved trait

* Add the new note only if we don't have an unactioned note and perform a redirect to ensure menu updates

* set_icon is deprecated

* Move coupon menu, adding a note for customers

* Translate title and descriptions

* Whitespace

* Account for coupon functionality being disabled

* Hide legacy menu before redirect

* Don’t keep adding the note if customer dismisses it from inbox

* Move behind feature flag

* Add note if feature enabled

* Add filter to override coupon feature

* Tweak option name to refer to wc_admin

To help with finding etc.

* use css variables

* Add the new note only if we don't have an unactioned note

* Switch the filter logic so `false` turns off the feature

This is a bit more intuitive when utilizing the filter

* Remove extraneous string and add trailing new lines

* Use correct posts object in tests

* Revert accidental removal of where_types

* Add coupons category to RecommendedExtensions

* Use 1.1 api to get categorized recommendations

* Add missing text domains

* Fix menu handling to point to woocommerce-marketing

* Only load coupon scripts on the coupon page

* Rework marketing menu logic to register pages more properly

* Use correct wc-admin path for marketing page

* Remove separate feature flag

WC Admin has existing feature flags to load enable/disable the feature

* Only set the coupon parent to marketing when the feature is enabled

* Only load coupon feature if marketing feature is enabled

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
2020-06-16 12:00:41 +09:30
Paul Sealock 77ce9448a3 Fix Task List styles (https://github.com/woocommerce/woocommerce-admin/pull/4573) 2020-06-16 14:07:06 +12:00
Bec Scott 21aa058a67 Clean up Jetpack CTA styles to use base component styles (https://github.com/woocommerce/woocommerce-admin/pull/4562)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 18:39:45 -07:00
Timmy Crawford 8dc7b4cbea G2: Remove pink/purple from ActivityPanels and Header (https://github.com/woocommerce/woocommerce-admin/pull/4586)
* G2: Remove pink/purple from ActivityPanels and Header

* Manage all orders purple.
2020-06-15 17:24:01 -07:00
Paul Sealock 91bd554637 Add overrides for OBW styles (https://github.com/woocommerce/woocommerce-admin/pull/4572) 2020-06-16 10:50:22 +12:00
Joshua T Flowers 701f90cc23 Only mark purchase task as complete when products exist (https://github.com/woocommerce/woocommerce-admin/pull/4574) 2020-06-15 15:38:36 -07:00
Fernando 16d9535700 Onboarding: Fixed choose a theme from the Live demo (https://github.com/woocommerce/woocommerce-admin/pull/4583)
* Bugfix: there was a problem with the method onChoose in onboarding

This commit fixes a problem with the method onChoose in the last onboarding step

* Small fix

This commit adds a small fix in the use of an element

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-15 15:32:36 -07:00
Joshua T Flowers 6baebd1e11 Check for enabled methods before payment task completion (https://github.com/woocommerce/woocommerce-admin/pull/4530) 2020-06-15 08:43:22 +03:00
Paul Sealock fea332b5b4 Change homepage to homesceen (https://github.com/woocommerce/woocommerce-admin/pull/4549) 2020-06-15 14:17:12 +12:00
Paul Sealock fd78bca347 Theme color: Use dynamic variable from user preferences (https://github.com/woocommerce/woocommerce-admin/pull/4558) 2020-06-15 14:00:25 +12:00
Bec Scott 07222c08ff Don't show store location in the tax and shipping tasks if it's already been provided (https://github.com/woocommerce/woocommerce-admin/pull/4507)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 09:20:52 +10:00
Fernando f8d7dc13a2 Dismiss dropdown styles fixed (https://github.com/woocommerce/woocommerce-admin/pull/4569)
* Dismiss dropdown styles fixed

This commit fixes the "Dismiss" dropdown styles

* Text color replaced in Dismiss dropdown

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-12 17:55:42 -07:00
Daniel Bitzer ca517af7c0 Make it possible (far easier) to add menu items under 'Marketing' (https://github.com/woocommerce/woocommerce-admin/pull/4561)
* Make it possible to add marketing submenu pages

* Always set the parent value for marketing pages

* phpcs

* Add ‘overview’ to breadcrumb and path

* Fix permission check conditional

* Add parent menu at priority of 9, before other items are usually added

* Revert to use `/marketing` as the page path
2020-06-13 07:25:15 +09:30
Joshua T Flowers 0cc93957a5 Try: WC Pay payment method with custom onClick handler (https://github.com/woocommerce/woocommerce-admin/pull/4552)
* Update recommended method on construct and update

* Update wcpay method requirements

* Add custom click handler to methods

* Add onClick handler to wcpay payment method

* Don't set busy state for default setup actions

* Handle PR feedback
2020-06-12 10:38:02 +01:00
Joshua T Flowers 960bc68dba Use label tag for toggleable shipping zones (https://github.com/woocommerce/woocommerce-admin/pull/4554) 2020-06-12 10:48:49 +03:00
Joshua T Flowers 0eb906f56d Use single dash for country/state dropdown options (https://github.com/woocommerce/woocommerce-admin/pull/4553) 2020-06-12 10:47:14 +03:00
Jason Conroy 8f291d2ec3 Refactor marketing components to make more reusable. (https://github.com/woocommerce/woocommerce-admin/pull/4524)
* refactor slider component to be functional

* Refactor RecommendedExtensions

* Refactor KnowledgeBase

* Refactor API to account for component location changes and categories

* Fix missing param description

* Remove unnessary use

* Pass down the category of the received plugins.

* Store the recommended plugins for the different categories separately.

* Pass down the category.

* Add new functions to get by category.

* set categories

* Handle new object for posts and recommendations

* Update tests

* Finish off implementing category param for data store resolvers

* Update js tests

* Fix incorrect reference to kb component

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
2020-06-12 16:47:17 +09:30
Joshua T Flowers 046f6c8bd4 Create action for installing and activate plugins (https://github.com/woocommerce/woocommerce-admin/pull/4473)
* Add installAndActivatePlugins method to plugin store

* Use new install/actiate method in Plugins component

* Refactor benefits page to use await

* Refactor business details page to use new install method

* Replace Plugins component in Jetpack CTA

* Format and throw errors in plugin data store

* Add generic response handling function

* Add default error messages to plugin API
2020-06-12 09:38:33 +03:00
Paul Sealock 41481a7299 Button: Remove deprecated isDefault (https://github.com/woocommerce/woocommerce-admin/pull/4548) 2020-06-12 07:22:20 +12:00
Matt Sherman bea82c93cd QuickLinks: Prevent jsdom "Error: Not implemented: navigation" test output (https://github.com/woocommerce/woocommerce-admin/pull/4547) 2020-06-11 07:58:09 -04:00
Matt Sherman 227a499343 Mock QuickLinks and add tests to ensure that QuickLinks is rendered when it should be. (https://github.com/woocommerce/woocommerce-admin/pull/4546) 2020-06-11 07:55:53 -04:00
Paul Sealock d7aec170f1 Runtime feature config override (https://github.com/woocommerce/woocommerce-admin/pull/4523) 2020-06-11 12:26:20 +12:00
Paul Sealock 41eeb4f9f9 Options: Add data store (https://github.com/woocommerce/woocommerce-admin/pull/4144) 2020-06-11 11:49:27 +12:00
Goran Radosevic cabb4c136c Fixed null issue in wpNavMenuClassChange (https://github.com/woocommerce/woocommerce-admin/pull/4513) 2020-06-10 14:56:01 -07:00
Timmy Crawford 1fb8c3caad Tracks: Change isEmbedded prop to is_embedded (https://github.com/woocommerce/woocommerce-admin/pull/4533) 2020-06-10 10:06:13 -07:00
Jeff Stieler 8a2750c973 Migrate user store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4505)
* Initial user preferences custom hook (wc meta).

* Organize dependencies.

* Specify dependencies in useSelect() call.

* Remove specifying preference keys.

There's currently no performance benefit to be had.

* Add HoC for hydrating current user data.

* Add user prefs update method.

* Export user prefs hook and HoC in data package.

* Handle error condition when updating user preferences.

* Use closure to get user ID for prefs update.

* Refactor analytics dashboard to use new user hook.

* Refactor ReportTable component to use new user hook.

* Move prop access to top of function component.

* Add todo for potential manual resolution logic.

* Refactor DashboardCharts component to use new user preferences hook.

* Move code out of functional component where possible.

* Fix chart interval query property.

* Refactor Leaderboards component to use new user preferences hook.

* Move code out of functional component where possible.

* Refactor Inbox panel to use user prefs hook.

@todo - updating last read isn't working.

* Use user prefs hook in StatsOverview component.

* Export user preferences store name.

* Use new store for unread inbox indicator.

* Hydrate current user data higher up in the app.

* Update "last read" timestamp in inbox panel.

* Fix StatsOverview test.

* Remove unused dispatch method from StorePerformance component.

* Remove now defunct user methods from wc-api spec.

* Add tests for isRequesting.

* JSON decode WC meta on updated user object.

* Test user prefs retrieval and save.

* Remove todo comment.

* Use user prefs hook in Jetpack install CTA on homepage.
2020-06-10 11:46:46 -05:00
Fernando 289636abba Modified layout.js withSelect (https://github.com/woocommerce/woocommerce-admin/pull/4480)
* Changed some API responses

This commit adds changes to some API responses

* Changed "woocommerce_task_list_complete" loading in frontend

* Updated "$migrated_options" array

This commit updates "$migrated_options" array and adds a deletion control

* Changed "taskListComplete" in customizable.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:33:30 -03:00
Fernando 7d42d389b8 Inbox notification: fixed Dismiss dropdowns for IE 11 (https://github.com/woocommerce/woocommerce-admin/pull/4504)
* Added refactor in "handleBlur" for IE compatibility

This commit adds a refactor in the method "handleBlur" for IE compatibility

* Modified styles for IE compatibility

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:32:55 -03:00
Bec Scott df0c2823ff Use plugins store rather than getSettings (https://github.com/woocommerce/woocommerce-admin/pull/4470)
* Use plugins store rather than getSettings

* Show install Jetpack CTA if Jetpack is not connected

* Fix redirect URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-10 12:59:05 +10:00
Paul Sealock 134be1c08b Update/@wordpress components base styles (https://github.com/woocommerce/woocommerce-admin/pull/4427) 2020-06-10 13:55:06 +12:00
Jason Conroy 987b2bf5eb Refactor and add tests for the marketing WelcomeCard component (https://github.com/woocommerce/woocommerce-admin/pull/4495)
* Convert welcome card to functional component

* Add tests for the WelcomeCard
2020-06-10 11:00:25 +09:30
Jason Conroy 9e03657451 Correctly remove reference to debounced updateSliderHeight method (https://github.com/woocommerce/woocommerce-admin/pull/4522) 2020-06-09 11:39:43 +09:30
James Koster 69b11c30db Store setup -> Finish setup (https://github.com/woocommerce/woocommerce-admin/pull/4517) 2020-06-09 14:06:35 +12:00
Matt Sherman f922e5b430 Only show quick links if task list is not shown. (https://github.com/woocommerce/woocommerce-admin/pull/4511) 2020-06-08 14:35:37 -04:00
Fernando 621f568297 Inbox panel on the home screen (https://github.com/woocommerce/woocommerce-admin/pull/4496)
* Homepage InboxPanel integration

# Conflicts:
#	client/homepage/layout.js
#	client/homepage/test/index.js

* InboxPanel refactor

This commit removes "context" prop and adds "isPanelEmpty" method to InboxPanel.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:28:25 -03:00
Fernando d5b40ae01f Usage of URLSearchParams breaks in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/4501)
* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Revert "Removed URLSearchParams method"

This reverts commit c2b24b34c93d16264c62b3bf522f4fbc94354d58.

* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Created folder utils with global utils

This commit moves the method "getUrlParams" to a utils file. Also some unit test were added

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:07:28 -03:00
Bec Scott b4c735f0de Jetpack stats on home page (https://github.com/woocommerce/woocommerce-admin/pull/4481)
* Get Jetpack stats appearing on the home page

* Update hidden stats in stats overview test

* Make jetpack stats appear by default

* Add reportUrlType to dashboard store performance area

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-05 09:14:55 +10:00
Daniel Rey López 479817cdad Fix the WCPay method not appearing as recommended sometimes (https://github.com/woocommerce/woocommerce-admin/pull/4345)
* Fix the WCPay method not appearing as recommended sometimes

* Recalculate the recommendedMethod variable only on componentDidUpdate
2020-06-04 10:36:57 +01:00
Paul Sealock 7f8149563b Homescreen: Add option to disable (https://github.com/woocommerce/woocommerce-admin/pull/4450)
* Add homescreen option

* change opt name to homescreen
2020-06-04 08:42:30 +12:00
Fernando aefbafea9b Inbox notification: layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4218)
* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Add undo snackbar button after deletion (https://github.com/woocommerce/woocommerce-admin/pull/4281)

* Added undo snakbar button for a single note

# Conflicts:
#	client/wc-api/notes/mutations.js
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Notes.php

* Added a button to undo the deletion of all notes

# Conflicts:
#	client/wc-api/notes/operations.js
#	src/API/Notes.php

* Code adapted to make code reviewing easier

There was some code that also was present in another PR, that code was removed to make code reviewing easier.

* UnitTest added

This commit adds some unit tests

* Added verification for API response

* Added casting to $note_id

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

# Conflicts:
#	client/header/activity-panel/panels/inbox/card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Bugfix: solved problem when a note was undismissed

There was a problem with the undismiss functionality. When a note was undismissed, it always was recovered with "plain" layout. This commit solves this problem.

* Inbox notification: add event recording (https://github.com/woocommerce/woocommerce-admin/pull/4320)

* Added events recording

This commit adds events recording to the inbox notifications

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Added 'home_screen' verification

Changed recorded name, now when the client is in the WooCommerce 'home' page we record 'home_screen' instead of 'wc-admin'.

* Added a naming fix and a new prop to the recordEvent

* bugfix: added control before interaction with bodyNotificationRef

* Added more unit tests for new endpoints

This commit adds tests for deleting a single note and for deleting all the notes, both without permission.

* Modified variable name

* Refactor: prop rename and small logic change

* Screen name getter moved into the InboxNoteCard

This commit moves the screen name getter inside the InboxNoteCard.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Removed "screen" from state

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Refactor in admin-notes unit tests

Some unnecessary controls were removed from the admin-notes unit tests

* Indentation fixed in Install.php. Replaced spaces with tabs.

* Inbox notification: added new placeholder and empty card (https://github.com/woocommerce/woocommerce-admin/pull/4379)

* Added a new placeholder and an empty card

This commit adds a new placeholder and a new empty card to the inbox panel

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js
#	client/header/activity-panel/panels/inbox/style.scss

* Added border to read notes

* Improved note filtering in unreadNotes method and validNotes

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Actions render refactored

The actions render was refactored in InboxNoteCard component

* Refactor of InboxPanel component

The methods getUnreadNotesCount and hasValidNotes were separated from the InboxPanel component

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Refactor inbox panel subtitle classes

* Added changes for when a note is undismissed

This commit adds the requested changes in behavior and design for when a note is dismissed.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Bugfix: Added key to itemlist

The InboxNotePlaceholder is shown as an itemlist but it didn't have a key. This commit adds it.

* Removed unnecessary validation

* Refactored actionList map

This commit adds a refactor to the actionList map

* Changes to the getUndoDismissRequesting functionality

This commit adds a few changes to the getUndoDismissRequesting functionality

* Changed className prop

* Changed other className prop

* Modified InboxPanel rendering

* Removed unnecessary method in placeholder.js

* Simplified the card.js renderActions method

* Change renderActions return in card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Inbox notification: add client unit tests (https://github.com/woocommerce/woocommerce-admin/pull/4386)

* Added client unit tests

* Added test cases for getUnreadNotesCount and hasValidNotes

* Corrected typo error

* Removed Enzyme and added React Testing Library

* Removed unnecessary param

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Resolved some conflicts with master

* Marketing note test repaired

This commit repairs the marketing note test

* Added note type 'marketing' to delete all functionality

* Removed set_icon method from some notes and docs

* Added set_icon method as deprecated to prevent errors.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-06-03 08:43:35 -03:00
Paul Sealock 7a62d36516 Filters: Fix static query parameters (https://github.com/woocommerce/woocommerce-admin/pull/4458)
* Fix Filters' staticParams

* Don't update report table page when chart type is changed or filter menu has been opened.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-06-02 11:03:26 +12:00
Paul Sealock 4cddf7f671 Remove old OBW wc-api method (https://github.com/woocommerce/woocommerce-admin/pull/4469) 2020-05-30 22:59:10 +12:00
Joshua T Flowers 19f209c8dc Await profile items update in skip (https://github.com/woocommerce/woocommerce-admin/pull/4471) 2020-05-29 18:18:15 +03:00
Jeff Stieler 396db4447a OBW: JP step - use the correct store name for updating profile items. (https://github.com/woocommerce/woocommerce-admin/pull/4468) 2020-05-29 13:01:14 +03:00
Paul Sealock 16cb332f28 IconButton: Replace with Button (https://github.com/woocommerce/woocommerce-admin/pull/4415) 2020-05-29 14:32:37 +12:00
Paul Sealock 54c00eecf9 Homepage: Add tracks events to Stats List period changes (https://github.com/woocommerce/woocommerce-admin/pull/4448) 2020-05-29 12:40:51 +12:00
Joshua T Flowers f132e35c7b Add EU VAT extension note (https://github.com/woocommerce/woocommerce-admin/pull/4452)
* Add EU VAT extension note

* Add note types to default notes query
2020-05-28 11:52:25 +03:00