Commit Graph

5737 Commits

Author SHA1 Message Date
louwie17 212d1c6e96 Remove the use of preloaded countries (https://github.com/woocommerce/woocommerce-admin/pull/8380)
* Remove the use of preloaded countries and make use of country data store instead

* Fix shipping task

* Add changelog

* Fix lint errors
2022-03-01 08:33:41 -04:00
Adrian Duffell f43e4caf4b Fix view logic for Setup additional payment providers task (https://github.com/woocommerce/woocommerce-admin/pull/8391) 2022-03-01 17:06:20 +08:00
RJ f306cc2ba5 Enable Typescript checking on ./client folder (https://github.com/woocommerce/woocommerce-admin/pull/8372)
* Copied .tsconfig into ./client to enable ts checking

- Made sub-repos composite typescript packages where necessary

* Prevent tsc from transpiling ./client

 - we use webpack for transpiling so no need for this

* Added tsc resolution path for @automattic/explat-client

- Seems like there's a type export issue (?) with @automattic/explat-client and @automattic/explat-client-react-helpers
- adding the node_modules/@automattic/explat-client path in tsconfig seems to help TS resolve this using the source .ts files
- found answer here: https://github.com/microsoft/TypeScript/issues/42873
- should figure out what's actually wrong with the type exports and fix that there instead

* Removed mandatory checking from webpack

- removed this for now as it will block all development until all type inconsistencies are fixed
- for now, run the optional ts:check task either in console or vscode for highlighting type errors

* Added vscode tasks for typescript checking

* Patch @automattic/explat-client-react-helpers

- this changes the installed code in node_modules (post-installation) for @automattic/explat-client-react-helpers so that it exports the necessary type interfaces required by us
- attempted unsuccessfully to override type exports using declare module
- not too sure how to fix this internally by other means
- have to investigate what fixes to propose to @automattic/explat-client-react-helpers team

* changed tests in ./client to use ts-jest instead of babel-jest

- rewrote jest config to use ts-jest instead of babel-jest
- set ts errors to warnings instead so that tests don't fail on type errors
- created new tsconfig for ./packages/js-tests so that build and ts-check are separate, as js-tests need to be built for commonjs
2022-03-01 12:19:07 +08:00
louwie17 1c6b18c05a Remove unused data endpoints param (https://github.com/woocommerce/woocommerce-admin/pull/8379)
* Remove unused data endpoints param

* Add changelog
2022-02-28 18:51:14 -04:00
Moon 3e672d7664 Redirect to the WC Pay onboarding when WC Pay is installed (https://github.com/woocommerce/woocommerce-admin/pull/8367)
* Redirect to the connect page when WC Pay is installed

* Add comment
2022-02-28 11:40:45 -08:00
Moon a2dfbffe89 Remove inbox_action_click event -- this is called from backend by triggerNoteAction (https://github.com/woocommerce/woocommerce-admin/pull/8376) 2022-02-28 11:40:35 -08:00
Moon 01e5cbdd7f Only run the version check for an admin request (https://github.com/woocommerce/woocommerce-admin/pull/8384) 2022-02-27 19:42:48 -08:00
Fernando 77fb10c53e OBW: fix copy on Business Details when "WooCommerce Shipping" is not listed (https://github.com/woocommerce/woocommerce-admin/pull/8324)
* Fix wc-shipping copy

* Fix method `createInstallExtensionOptions`

* Fix tests

* Add changelog

* Add WCTax logic

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-02-25 18:26:44 -03:00
louwie17 84e6a1e317 Add missing dependency to onboarding package (https://github.com/woocommerce/woocommerce-admin/pull/8378)
* Add missing dependency

* Add changelog
2022-02-25 08:44:07 -04:00
louwie17 02d7973b55 Update WooCommerce Payment note action callback logic (https://github.com/woocommerce/woocommerce-admin/pull/8366)
* Update WooCommerce Payment note action callback logic

* Fix lint errors
2022-02-25 08:43:59 -04:00
Jaclyn Chen cb9e6b34df Fix hidden notes in `admin/notes` when the user is not in tasklist experiment (https://github.com/woocommerce/woocommerce-admin/pull/8328)
* Fix hidden notes from tasklist experiment.

* Add changelog.

* Use PR number instead of issue number in the changelog.
2022-02-25 08:09:49 +08:00
Moon 5338ebf04a Make $customer_id public again (https://github.com/woocommerce/woocommerce-admin/pull/8371)
* Make $customer_id public -- see issue 8369. We have a backward compatibility issue
2022-02-23 16:31:41 -08:00
louwie17 e652b0b93f Fixes some minor process issues (https://github.com/woocommerce/woocommerce-admin/pull/8355)
* Additional general updates and improvements

* Fix php lint errors
2022-02-23 13:04:59 -04:00
louwie17 ed2a1eaae2 Updated changelog with cherry picks (https://github.com/woocommerce/woocommerce-admin/pull/8347) 2022-02-23 08:59:49 -04:00
Daniele Scasciafratte 76c3ef7466 Fix Notice in RuleEvaluator (https://github.com/woocommerce/woocommerce-admin/pull/8184)
* Fix Notice in RuleEvaluator 

Ref: https://github.com/woocommerce/woocommerce-admin/issues/7825

* fix indentation

* fix lint
2022-02-22 20:48:15 -08:00
Chi-Hsuan Huang e8ce945d0e Implement MailChimp API request threshold for MailchimpScheduler (https://github.com/woocommerce/woocommerce-admin/pull/8342)
* Implement MailChimp API request threshold for MailchimpScheduler

Fix class-wc-tests-mailchimp-scheduler.php

Fix class-wc-tests-mailchimp-scheduler.php

* Add changelog

* Fix class-wc-tests-mailchimp-scheduler.php

* Fix class-wc-tests-mailchimp-scheduler.php
2022-02-23 09:37:00 +08:00
Chi-Hsuan Huang f052c3fed1 Replace deprecated wp.compose.withState with wp.element.useState (https://github.com/woocommerce/woocommerce-admin/pull/8338)
* Update search-list-control

* Update tag

* Update stories

* Add packages/components changelog
2022-02-23 09:35:50 +08:00
Moon 1c2bc9843c Use WC_VERSION as cache buster for assets (https://github.com/woocommerce/woocommerce-admin/pull/8308)
* Use WC_VERSION as cache buster

* Add changelog
2022-02-22 10:51:53 -08:00
berislav grgičak e2dfe225b8 Increase chart selection to 10 and allow color overriding (https://github.com/woocommerce/woocommerce-admin/pull/8258)
* Increase selection limit to 10

* Add filter for overriding chart colors

* Add filter documentation

* Update chart story

* Add testing instructions

* Changelogs

* Remove broken changelog entires

* Update changelogs

* Fix changelogs

* Add filter example

* Improve filter example
2022-02-22 09:01:14 -04:00
Chi-Hsuan Huang 56f7850d07 Make src/Features/* internal except for Features.php, Onboarding.php and TransientNotices.php (https://github.com/woocommerce/woocommerce-admin/pull/8318)
* Move src/Features/* to src-internal/Admin/ except for Features.php, Features/Onboarding.php and TransientNotices.php
2022-02-21 17:47:28 +08:00
Chi-Hsuan Huang 9c49667dde Fix Google Listings plugin is always shown in free features despite already activated (https://github.com/woocommerce/woocommerce-admin/pull/8330)
* Add is_visible rule for google-listings-and-ads to not display it if it's already activated

* Add changelog
2022-02-21 17:46:25 +08:00
Chi-Hsuan Huang dd4736cc5c Add build-types to .eslintignore (https://github.com/woocommerce/woocommerce-admin/pull/8334) 2022-02-21 12:12:05 +08:00
Chi-Hsuan Huang bda55d99f3 Bump package versions (https://github.com/woocommerce/woocommerce-admin/pull/8333) 2022-02-21 11:27:45 +08:00
Chi-Hsuan Huang c05ed7777a Update dependencies to support react 17 (https://github.com/woocommerce/woocommerce-admin/pull/8305)
* Upgrade dependencies to support react17

Update pkg

Update @wordpress/api-fetch and gridicons

* Update test snapshots

* Update SnackbarList with latest react-spring

* Mock data.dispatch for task-list-item.test.tsx

* Remove '@wordpress/components/src/visually-hidden/style' import

wp-components has included it

* Update interpolateComponents import path

* Fix display-options test

* Add changelogs

Update changelogs

* Add @automattic/explat-client-react-helpers back

* Update webpack.config for explat-client-react-helpers

Update webpack config comment

Fix grammar
2022-02-21 10:34:25 +08:00
louwie17 42625174d9 Have free subscriptions adhere to cbd industry (https://github.com/woocommerce/woocommerce-admin/pull/8323)
* Make sure the free subscriptions does not show when cbd industry is selected

* Add changelog and fix productTypes not being defined

* Fix lint issue

* Fix lint error
2022-02-18 10:23:37 -04:00
louwie17 7c6a1f3b5b Fix payment task conflicts (https://github.com/woocommerce/woocommerce-admin/pull/8321)
* Fix payment logic of payment tasks between current task list and experimental one.

* Revert testing changes

* Fix linting

* Add changelog
2022-02-18 09:59:39 -04:00
Moon 718bac6981 Prompt a modal to save any unsaved changes in OBW (https://github.com/woocommerce/woocommerce-admin/pull/8278)
* Add a modal to show when unsaved changes are detected

* Add functions to track value changes from the steps

* Warn unsaved changes for the store details

* Add styles for the unsaved modal

* Warn unsaved changes for the Industry

* Warn unsaved changes for the Product Types

* Warn unsaved changes for the Business Details

* Add changelog

* Add testing instructions.

* Sort array values before comparison

* Use only the array values to compare the diff

* Catch rejected promise on continue

* Set initial value to an empty object

* Fix failing tests
2022-02-17 11:15:11 -08:00
Moon c16a17a17b Enable navigation in core env (https://github.com/woocommerce/woocommerce-admin/pull/8310) 2022-02-17 11:14:45 -08:00
Moon 3a81e6b78d Make classes in src internal (https://github.com/woocommerce/woocommerce-admin/pull/8317)
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core

* Register class aliases

* Move WcPayPromotion classes to the internal

* Ignore namespace PHP CS issue

* Make features/WcPayPromotion internal

* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace

* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion

* Add phpcs rules for src-internal

* Remove phpcs:ignoreFile

* Update letter case to make it PSR4 compatible

* Fix letter cases

* Move the alias array into the function

* Rename WcPayPromotion to WCPayPromotion (letter case update)

* Include src-internal

* Update letter case

* Make classes internal

* Update references

* Fix WC_ADMIN_ABSPATH path
2022-02-17 11:14:23 -08:00
Moon aa554fb1e3 Move src/Schedulers/* to src-internal/Admin/Schedulers (https://github.com/woocommerce/woocommerce-admin/pull/8316)
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core

* Register class aliases

* Move WcPayPromotion classes to the internal

* Ignore namespace PHP CS issue

* Make features/WcPayPromotion internal

* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace

* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion

* Add phpcs rules for src-internal

* Remove phpcs:ignoreFile

* Update letter case to make it PSR4 compatible

* Fix letter cases

* Move the alias array into the function

* Rename WcPayPromotion to WCPayPromotion (letter case update)

* Include src-internal

* Update letter case

* Make src/Schedulers/* internal, except the SchedulerTraits

* Add @internal comment tag

* Clean up incorrect import

* Remove unused import
2022-02-17 10:48:31 -08:00
Fernando ce0f73aa9b Refactor `MerchantEmailNotifications` (https://github.com/woocommerce/woocommerce-admin/pull/8304)
* Refactor `MerchantEmailNotifications`

* Rename `NotificationEmail`

* Add changelog

* Add folder `Notes` to `Internal`

* Moved folder and the namespace was renamed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-02-17 14:33:19 -03:00
Ilyas Foo 5840898524 Add card fees to specify what the discount applies to (https://github.com/woocommerce/woocommerce-admin/pull/8319) 2022-02-17 11:30:59 +08:00
rjchow 99a382c649 Fixed typing errors in Stepper component after typescript conversion 2022-02-17 10:35:39 +08:00
rjchow 0a314f1a97 Renamed stepper components to .tsx 2022-02-17 10:35:39 +08:00
Moon 8023579670 Move src/Features/WcPayPromotion to /src-internal/Admin/WcPayPromotion (https://github.com/woocommerce/woocommerce-admin/pull/8307)
* Add psr-4 for the internal classes -- this is a temp. changes. We should remove it once we completely merge to the core

* Register class aliases

* Move WcPayPromotion classes to the internal

* Ignore namespace PHP CS issue

* Make features/WcPayPromotion internal

* Added src-internal directory for Automattic\WooCommerce\Internal\Admin namespace

* Moved src/Features/WcPayPromotion to src-internal/Admin/WcPayPromotion

* Add phpcs rules for src-internal

* Remove phpcs:ignoreFile

* Update letter case to make it PSR4 compatible

* Fix letter cases

* Move the alias array into the function

* Rename WcPayPromotion to WCPayPromotion (letter case update)

* Include src-internal

* Update letter case

* Move src/Features/RemoteFreeExtensions to src-internal/Admin/RemoteFreeExtensions (https://github.com/woocommerce/woocommerce-admin/pull/8311)

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-02-16 04:50:33 -08:00
Ilyas Foo d590b1116f Fix WCPay in core texts and promo slug (https://github.com/woocommerce/woocommerce-admin/pull/8296)
* Fix texts and change promo slug

* Changelog
2022-02-16 11:10:59 +08:00
RJ ab1cbfb6f2 Added tracks test for PaymentGatewaySuggestions (https://github.com/woocommerce/woocommerce-admin/pull/8306) 2022-02-15 10:30:46 +08:00
Travis ae582fdc66 Jetpack Backup note - change time range and add an image (https://github.com/woocommerce/woocommerce-admin/pull/8293)
* start note after 3 days and add an image

* add changelog entry

* add PR number to changelog
2022-02-14 12:42:50 -06:00
Paul Sealock e41441f83e Add hook reference generator README and documentation (https://github.com/woocommerce/woocommerce-admin/pull/8004)
* Add hook reference README

* update hook reference

* better

* changelog

* add pr number

* remove example

* add desc

* add stats

* jsdoc REPORTS_FILTER

* Category configs

* configs

* data

* dashboard

* dashboard charts

* save

* save

* save

* done with filters

* Add scope to slotFill docs

* data

* add all slotfills

* data

* Fix error when scope is not present, and make use of typedef imports

* Move chart and filter jsdoc definitions to the reports index file

* Update hook reference data.json

* Make use of import for filter typedef and address some typos

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-02-11 10:38:38 -04:00
louwie17 0deb1c33bc Add wc_version to store profiler view and complete tracks (https://github.com/woocommerce/woocommerce-admin/pull/8290)
* Add wc_version to store profiler view and complete tracks

* Add changelog

* Update changelog
2022-02-11 10:03:37 -04:00
louwie17 7e999148f1 Sync changelog and testing instructions from 3.2 (https://github.com/woocommerce/woocommerce-admin/pull/8289)
* Add additional testing instructions

* Update changelog entries for 3.2
2022-02-11 08:40:33 -04:00
RJ 087ce5aa61 Enable type definitions output for @woocommerce/components (https://github.com/woocommerce/woocommerce-admin/pull/8282)
* Output typedefs for @woocommerce/packages
2022-02-11 19:39:34 +08:00
Chi-Hsuan Huang 4f5e537a54 Fix a lot of pending "run_remote_notifications" scheduled actions (https://github.com/woocommerce/woocommerce-admin/pull/8285)
* Change to only create remote action when there_are_now_products is false

* Add changelog

* Update src/RemoteInboxNotifications/StoredStateSetupForProducts.php

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>

* Update function name

* Add comment

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-02-11 15:08:11 +08:00
Chi-Hsuan Huang e1ac06afa7 Fix payments extensions displayed below the offline payments options (https://github.com/woocommerce/woocommerce-admin/pull/8232)
* Fix payments extensions displayed below the offline payments options

Add spaces back

* Add changelog

* Remove the snapshot test and update payment gateway render test

* Make sorting compare function as a helper function
2022-02-09 14:12:20 +08:00
Chi-Hsuan Huang 6dc5189fc2 Replace "any" type with an explicit type (https://github.com/woocommerce/woocommerce-admin/pull/8262)
* Replace "any" type with an explicit type

* Add types in utils and import FormInputProps to store address
2022-02-09 12:40:44 +08:00
louwie17 83e1addd82 Fix minor process issues (https://github.com/woocommerce/woocommerce-admin/pull/8279) 2022-02-08 18:22:26 -04:00
louwie17 7d2aa04b2a Add business-details step complete track (https://github.com/woocommerce/woocommerce-admin/pull/8265)
* Add business-details step complete track

* Add changelog

* Update tab name and treat each tab as an individual step when trickering tracks

* Add comment

* Fix linting

* Remove unnecessary css selector

* Update goToNextStep param to make it less confusing

* Update jsdoc param
2022-02-08 14:29:17 -04:00
RJ b9806c5087 Made email in OBW optional again (https://github.com/woocommerce/woocommerce-admin/pull/8263) 2022-02-08 08:56:45 +08:00
louwie17 23505c1e58 Make sure hidden fields are cleared when definition changes (https://github.com/woocommerce/woocommerce-admin/pull/8250)
* Make sure hidden fields are cleared when definition changes

* Make use of shortened condition available in TS
2022-02-07 19:31:08 -04:00
louwie17 c2537136bb Fix shipping task step when store location isn't filled out (https://github.com/woocommerce/woocommerce-admin/pull/8260)
* Remove completeStep call in StoreLocation callback to avoid duplicate call.

* Add changelog
2022-02-07 14:55:35 -04:00