Commit Graph

291 Commits

Author SHA1 Message Date
louwie17 8d4471fce4 Fix paid themes (https://github.com/woocommerce/woocommerce-admin/pull/8412)
* Add support for paid themes

* Fix lint errors

* Add changelog

* Refactor get_products logic and add unit tests

* Add comment
2022-03-14 17:31:03 -03:00
Joel Thiessen 8465c10917 Display WCPay task when installed via subscriptions option on profiler (https://github.com/woocommerce/woocommerce-admin/pull/8445) 2022-03-14 12:44:55 -07:00
Jacob Sewell 2a7df822b3 Avoid get_notes() in Notes::possibly_delete_survey_notes() (https://github.com/woocommerce/woocommerce-admin/pull/8206)
* Query for admin survey note_ids directly in Notes::possibly_delete_survey_notes().

* Add get_notes_with_type( $note_type ) method to Automattic\WooCommerce\Admin\Notes.
Name selected for consistency with preexisting get_notes_with_name( $name ) method.

* Use new get_notes_with_type() in Notes::possibly_delete_marketing_notes().

* Use new get_notes_with_type() in Notes::possibly_delete_survey_notes().

* Correct copy-pasta error querying for MARKETING notes instead of SURVEY notes in possibly_delete_survey_notes().

* Only delete actioned notes in possibly_delete_survey_notes(), which was the previous behavior.

* Changed get_notes_with_type() to get_note_ids_by_type() in Notes data store.

* Changelog for 7987/8206.

* Add missing method name in changelog for 7987/8206.
2022-03-10 18:57:29 -06:00
berislav grgičak a2a53ab6c2 Fix legend item width (https://github.com/woocommerce/woocommerce-admin/pull/8442)
* Fix legend item width

* Add testing instructions

* Add changelog entry

* Fix changelog

* Add changelog
2022-03-10 15:09:45 +01:00
louwie17 c65d43a35e Cleanup Loader.php and move it to Internal namespace (https://github.com/woocommerce/woocommerce-admin/pull/8416)
* Seperated Asset, page, and translation logic into seperate classes out of Loader.php

* Move user, and assets logic out of Loader.php

* Move Loader to Internal and move page helper functions to PageController

* Fix unit tests

* Add changelog
2022-03-09 10:04:34 -04:00
Fernando f5316d02af Make individual note classes internal (https://github.com/woocommerce/woocommerce-admin/pull/8398)
* Moved `WooSubscriptionsNotes`

* Moved `WooSubscriptionsNotes` deprecated

* Moved `WooCommerceSubscriptions`

* Moved `WooCommercePayments`

* Fix `WooCommerceSubscriptions`

* Fix `WooSubscriptionsNotes

* Fix `WooCommercePayments`

* Moved `WelcomeToWooCommerceForStoreUsers

* Add use `Note`

* Moved `UpdateStoreDetails`

* Moved `UnsecuredReportFiles`

* Moved `TrackingOptIn`

* Moved `TestCheckout`

* Moved `SetUpAdditionalPaymentTypes`

* Moved `SellingOnlineCourses`

* Moved `RealTimeOrderAlerts`

* Moved `PersonalizeStore`

* Moved `PerformanceOnMobile`

* Moved `PaymentsRemindMeLater`

* Moved `OrderMilestones`

* Moved `OnlineClothingStore`

* Moved `OnboardingPayments

* Moved `NewSalesRecord`

* Moved `NavigationNudge`

* Moved `NavigationNudge`

* Moved `MobileApp`

* Moved `MigrateFromShopify`

* Moved `MarketingJetpack`

* Moved `ManageStoreActivityFromHomeScreen`

* Moved `ManageOrdersOnTheGo`

* Moved `MagentoMigration`

* Moved `LaunchChecklist`

* Moved `InstallJPAndWCSPlugins`

* Moved `InsightFirstSale`

* Moved `InsightFirstProductAndPayment`

* Moved `GivingFeedbackNotes`

* Moved `FirstProduct`

* Moved `FirstDownlaodableProduct`

* Moved `EUVATNumber`

* Moved `EditProductsOnTheMove`

* Moved `DeactivatePlugin`

* Moved `CustomizingProductCatalog`

* Moved `CustomizeStoreWithBlocks`

* Moved `CouponPageMoved`

* Moved `CompleteStoreDetails`

* Moved `ChoosingTheme`

* Moved `AddingAndManangingProducts`

* Moved `AddFirstProduct`

* Removed `OnboardingTraits` trait

* Moved `EmailNotification`

* Fixed notes

* Add changelog

* Fix lint error

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-03-08 10:55:27 -03:00
Chi-Hsuan Huang 1335fe4a1a Fix long notes are not replaced with shorter notes (https://github.com/woocommerce/woocommerce-admin/pull/8401)
* Add possibly_update_note to replace long notes with shorter notes

* Add changelog

* Refactor possibly_update_note
2022-03-08 12:07:14 +08:00
Chi-Hsuan Huang 9aba93d127 Update all js packages with minor/patch version changes (https://github.com/woocommerce/woocommerce-admin/pull/8392)
* Update all js packages with minor/patch version changes

* Add changelog

* Fix packages/data types errors

* Update data/CHANGELOG.md

* Fix puppeteer version

* Fix packages/data > countries error types

* Make data key optional in RestApiError
2022-03-08 10:11:12 +08:00
Joshua T Flowers 834307e155 Merge payment gateway suggestion classes into single source of truth (https://github.com/woocommerce/woocommerce-admin/pull/8252)
* Rename route to payment gateway suggestions

* Create separate payment gateway suggestions controller

* Move payment gateway logic into feature class

* Merge payment gateway information into single source of truth

* Filter out WCPay client-side

* Fix up frontend

* Redirect to payment settings page on install

* Add test around showing installed gateways

* Remove check for marketplace suggestions at the endpoint level

* Fix up payment gateway conflicts after rebase

* Handle PR feedback

* Optimistically dismiss the payment gateway suggestions

* Add changelog entry

* Add square_image support for new API param

* Fixed lint error

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-03-07 09:15:06 -04:00
Chi-Hsuan Huang ac660167a0 Reintroduce emphasis on inbox note action button (https://github.com/woocommerce/woocommerce-admin/pull/8411)
* Reintroduce emphasis on inbox note action button

* Add changelog

* Remove actioned note gray color style
2022-03-07 17:14:49 +08:00
Chi-Hsuan Huang be7e73d484 Use integers for add_menu_page priority (https://github.com/woocommerce/woocommerce-admin/pull/8399)
* Use integers for menu page priority

 In wordpress >= 6.0, the seventh parameter passed to add_menu_page() should be an integer representing menu position.

* Add changelog

* Fix Analytics & WcPayWelcomePage menu positions
2022-03-07 17:12:24 +08:00
Chi-Hsuan Huang 3dff2fe11e Fix inbox letters truncator to support multi characters (https://github.com/woocommerce/woocommerce-admin/pull/8404)
* Install grapheme-splitter

* Support multi-characters Unicode letters for inbox html truncator

* Fix truncateRenderableHTML length compare

* Change note to immutable

* Add changelog

* Use hasChildNodes() to check if we should call truncateElement

* Add tests for truncate()
2022-03-07 12:09:26 +08:00
Chi-Hsuan Huang 86fc8b62e5 Switch to pnpm (https://github.com/woocommerce/woocommerce-admin/pull/8349)
* Add pnpm-workspace.yaml

* Add missing dependencies & replace file: with workspace:* in
package.json

* Replace "npm" with "pnpm"

* Replace "npx" with "pnpx"

* Remove package-lock.json

* Add pnpm setup action to github workflows

* Update webpack babel exclude path

* Upgrade woo e2e and fix e2e test command

Update e2e.yml

Use pnpm run e2e:docker-up in e2e.yml

* Remove unused docker-compose.yaml

* Replace lerna with pnpm commands

Update publish commands

* Exclude _locutus_shared_bc.js in babel.config.js

* Add .npmrc to set enable-pre-post-scripts=true by default

* Fix storybook babel config

Update babel.config.js

* Add changelog

* Update pnpm-lock.yaml

* Replace pnpx with pnpm exec

* Update pnpm-lock.yaml

* Remove js-tests/package-lock.json

* Fix @woocommerce/tracks -> workspace:*

* Update pnpm-lock.yaml

* Add @woocommerce/experimental to onboarding/package.json

* Add "@woocommerce/component" to onboarding/package.json

* Update pnpm-lock.yaml

* Use || instead of && for "test:watch"

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>

* Fix packages/number "clean" command

* Add root: true to .eslintrc.js to enforce it to use the root config file

* Exclude packages/**/node_modules from babel transpiling

* Fix js-tests build config

Co-authored-by: RJ <27843274+rjchow@users.noreply.github.com>
2022-03-04 12:01:16 +08:00
Francesco 1ace2bbf1e add: `@woocommerce/block-data` in Webpack deps extraction (https://github.com/woocommerce/woocommerce-admin/pull/7911) 2022-03-02 10:31:30 -06:00
Moon 5d55b9b625 Redirect customers back to the payment task after enabling an offline gateway (https://github.com/woocommerce/woocommerce-admin/pull/8389)
* Redirect customers back to the payment task page after enabling an offline payment

* Add changelog

* Make hasPlugins property boolean

* Remove unnecessary type checking

* Fix the comparison logic
2022-03-01 17:45:44 -08:00
RJ d2205a6faf Stop showing actioned inbox items (https://github.com/woocommerce/woocommerce-admin/pull/8394)
* Stop showing actioned inbox items

- revert of https://github.com/woocommerce/woocommerce-admin/pull/7983/

* Trigger rerun of CI
2022-03-01 21:08:29 +08:00
louwie17 b871cbf09b Fix/8251 woocommerce payments task list logic (https://github.com/woocommerce/woocommerce-admin/pull/8332)
* Allow the support of multiple task lists with overlapping tasks

* Add filter by task ids

* Revert getTaskListById call

* Fix notices

* Move prefix event to task and task list classes instead

* Fix track events and extended task list

* Fix php unit tests

* Remove the seperate task list classes as this was unnecessary.

* Fix tests

* Remove unneeded allowed-tasks

* Change onboarding task list redux store structure

* Add extra id for handling hidden param for experimental task lists

* Fix lint errors

* Fix forgotten change

* Add changelog
2022-03-01 08:34:18 -04:00
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
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
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
louwie17 ed2a1eaae2 Updated changelog with cherry picks (https://github.com/woocommerce/woocommerce-admin/pull/8347) 2022-02-23 08:59:49 -04: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
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 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 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
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
rjchow 99a382c649 Fixed typing errors in Stepper component after typescript conversion 2022-02-17 10:35:39 +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
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 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
Moon 080dc48a9b Fix/8191 deleting products adds blank space to analytics data (https://github.com/woocommerce/woocommerce-admin/pull/8255)
* Retrieve variation name from woocommerce_order_items for deleted products

* Remove test code

* Refactor to use wc_order_product_lookup table

* Identation fix

* Remove link if the variation/product has been deleted

* Add changelog

* Remove (deleted) suffix

* Add (Deleted) suffix in frontend
2022-02-07 10:13:27 -08:00
Ilyas Foo dfdafc1568 Update headercard to use filter to add ExPlat parameter (https://github.com/woocommerce/woocommerce-admin/pull/8233)
* Add changelog

* Update headercard experiment hook to utilize `woocommerce_explat_request_args` filter

* Add test

* Fix experiment name check

* Update parameter name

* Add changelog

* Removed old changelog

* Added prop comments to Layout component

* Add preload option for homescreen

* Fix class attribute typo

* Hide extended tasklist when task detail is shown

* Add local Suspense to stop lazy component bubbling up to Controller's Suspense

* Remove unused props

* Add missed Suspense, add loading logic to ActivityHeader

Co-authored-by: Moon <moon.kyong@automattic.com>
2022-02-07 08:50:20 +08:00
Joshua T Flowers 517d248ed7 Remove unused task styling classes (https://github.com/woocommerce/woocommerce-admin/pull/8234)
* Remove unused task styling classes

* Rename typo in dismiss modals

* Remove extra styling selector class

* Add changelog entry
2022-02-04 10:26:56 -05:00
Joshua T Flowers e8c1c94b01 Only add product data on REST requests and task list (https://github.com/woocommerce/woocommerce-admin/pull/8235)
* Only add product data on REST requests and task list

* Add changelog entry

* Return new product data variable
2022-02-04 10:03:47 -05:00