Commit Graph

15 Commits

Author SHA1 Message Date
Tomek Wytrębowicz f569f333a1
Fix Layout Controller forwarding arrays from the URL query string. (#38593)
* Revert part of "Remove `qs` dependency from `woocommerce-admin` (#35128)"

This reverts Layout- and Filter-related changes from commit 00c151f9aa, reversing
changes made to eef417fe39.

Removes the fix (keeping the test) from https://github.com/woocommerce/woocommerce/pull/38542 as it's not needed for `qs`

Fixes https://github.com/woocommerce/woocommerce/issues/38582.

* Simplify the use of query params in `ProductTour`

* Add changelog entry
2023-06-05 04:55:20 -03:00
Chi-Hsuan Huang 956d09c34b
Fix shipping tour layout context error (#38183)
* Add LayoutContextProvider to embedded body layout to fix shipping tour error

* Show an error notice and record track when failing to update shipping option

* Add changelog

* Update error message

* Remove unused import
2023-05-10 13:01:37 +08:00
Tomek Wytrębowicz 0d45b0f107 Merge branch 'trunk' into remove/qs 2023-05-07 16:18:32 +02:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04:00
louwie17 613e58c061
CES exit prompt for product editing screens (#35728)
* Add exit page tracker logic and implement it for product pages

* Add changelog

* Fix lint errors and add comments

* Add ces_location prop

* Add mock to fix broken test

* Add CES exit page survey tests

* Fix a bug with React pages redirects and update actions

* Fix test

* Fix lint

* Add default inside location prop

* Remove exit prefix within action

* Address PR feedback and make sure its not triggered on save

* Update copy of exit feedback notice

* Add changelog

* Update name of param

* Fix lint error

* Use hasFinishedResolution vs isResolved in customerEffortScoreTracks
2022-12-12 09:56:28 -04:00
Tomek Wytrębowicz b9842b6f99 Fix JS linting errors
adjust whitespaces and parentheses.
2022-10-18 00:17:22 +02:00
Tomek Wytrębowicz 1baac3445e Remove `qs` dependency from `EmbeddedBodyLayout`,
use native `URLSearchParams` instead.
2022-10-17 17:12:20 +02:00
RJ 6a95d3ee93
dev: move guided tours into consolidated folder (#34279)
* dev: moved shipping tour into guided tours folder

* dev: moved store address tour to guided-tour folder

* dev: updated imports for store address tour code move

* dev: move add-product-tour to guided-tours

* dev: update imports for add-product-tour code move
2022-08-12 09:49:18 +08:00
RJ cb09649a4c
add: store location settings tour (#34137) 2022-08-02 11:10:34 +08:00
Chi-Hsuan Huang c05605fddf Update linting, testing, `@types/*` dependencies (https://github.com/woocommerce/woocommerce-admin/pull/8475)
* Update husky from 4 to 7

* Update @types/jest from 26 to 27

* Update lint-staged from 10 to 12

* Update babel-jest from 26 to 27

* Update @typescript-eslint/eslint-plugin from 4 to 5

* Update @typescript-eslint/parser from 4 to 5

* Update chalk from 4 to 5

* Update concurrently from 5 to 7

* Update stylelint from 9 to 14 and stylelint-config-wordpress from 13 to 17

* Update @wordpress/prettier-config from 0.4 to 1.1

* Update eslint from 7 to 8, @wordpress/eslint-plugin from 8 to 10, eslint-plugin-testing-library to 5

* Fix lint errors after updating eslint-plugin-testing-library

* Fix style lint

* Rename .stylelintrc.json -> stylelint.config.js & add todo comment

Fix stylelint.config.js

* Remove @wordpress/e2e-test-utils

* Add changelogs for eslint-plugin

* Update storybook/preview.js since addDecorator has been deprecated

Remove parameters

* Import directly from @storybook/addon-docs

* Migrate some stories to use @storybook/addon-controls

Add a comment for @storybook/addon-knobs

* Update changelogs

* Update preview.js to fix lint warning

* Update pnpm-lock.yaml

* Fix eslint layout errors (https://github.com/woocommerce/woocommerce-admin/pull/8484)
2022-03-18 19:45:14 +08: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
Francesco c1730d16f1 feat: add shipping marketplace recommendations (https://github.com/woocommerce/woocommerce-admin/pull/7446) 2021-08-11 17:09:32 -05:00
Ilyas Foo 069537100e Fix recommended card Gutenberg CSS conflict (https://github.com/woocommerce/woocommerce-admin/pull/7409)
* Add style fix

* Add fix for card footer as well

* Changelog

* Replace fix with removing CardBody

* Cleanups

* Remove CardBody import reference

* Remove CardHeader size and change size in Card, CSS cleanup
2021-07-26 15:34:08 -03:00
Jeff Stieler 8e61f55017 Allow packages to be built in isolation. (https://github.com/woocommerce/woocommerce-admin/pull/7286)
* Use yarn instead of npm.

In prep for workspaces, since we're locked to npm < 7. See: https://github.com/woocommerce/woocommerce-admin/pull/7126#issue-661287749

* Initial workspace creation.

* Add initial tsc build to @woocommerce/number.

* Attempt to build experimental package.

* Try currency package.

* Define all packages as workspaces.

* Use tsconfig common to packages.

* Fix currency package build.

* Build csv-export with tsc.

* Try to build customer-effort-score with tsc.

* Fix JSX pragma.

* Build data package with tsc.

* Build date package with tsc.

* Build experimental package with tsc.

* Try to build explat package with tsc.

* Build navigation package with tsc.

* Build notices package with tsc.

* Build onboarding package with tsc.

* Build components package with tsc.

* Swap in package JS build into main script.

* Fix experimental package build.

* Try per-package css build with components.

* Try to run components package tests in isolation.

Broken on JSX in test files not being transformed.

* Move @woocommerce/wc-admin-settings into a package.

* Try to fix components package tests.

Fails because we aren't setting up the jest/jest-dom globals.

* Move JS test code to reusable (private) package.

* Enable incremental TS builds.

* Use workspaces to run JS tests.

* Use new jest configs for update snapshot scripts.

* Fix style builds.

* Fix package version in components.

* Fix client test debug and watch scripts.

* Update yarn lock.

* Update test-staged behavior.

* Try to fix storybook.

* Fix storybook.

* Update more npm commands to yarn.

* Add changelog.

* Fix lint errors.

* Update packages readme script references.

* Clean up unused gitignore match.

* Fix another npm command.

* Fix JS builds on watch.

* Fix start script.

* Fix start scripts for packages.

* Use tsc to build packages before tests

* yarn -> npm.

# Conflicts:
#	package-lock.json
#	package.json

* Fix linter error.

* Remove workspace definitions.

* Fix missing Fragment import.

* Fix package lock.

* Fix missing reference.

* Only build commonjs module for js-tests helper.

* Remove errant dependency from components.

* Remove noop scripts.

* Fix package JS build before testing.

* Revert noisy formatting changes.

* Fix precommit and test scripts.

* Fix minimum expected recommended extension count.

Japan test case breaks this.

* Revert babel config changes.

* chore(release): publish

 - @woocommerce/components@7.2.0
 - @woocommerce/csv-export@1.4.0
 - @woocommerce/currency@3.2.0
 - @woocommerce/customer-effort-score@1.1.0
 - @woocommerce/data@1.4.0
 - @woocommerce/date@3.1.0
 - @woocommerce/dependency-extraction-webpack-plugin@1.7.0
 - @woocommerce/eslint-plugin@1.3.0
 - @woocommerce/experimental@1.5.0
 - @woocommerce/explat@1.1.0
 - @woocommerce/js-tests@1.1.0
 - @woocommerce/navigation@6.1.0
 - @woocommerce/notices@3.1.0
 - @woocommerce/number@2.2.0
 - @woocommerce/onboarding@1.1.0
 - @woocommerce/tracks@1.1.0
 - @woocommerce/wc-admin-settings@1.1.0

* Add script for running 'start' in a package.

* Remove yarn from gitignore.

* Update package changelogs, prep versions for release.

* Try to fix E2E tests after main merge.

* Some cleanup.

* Add changelog.

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-07-14 16:38:57 -04:00
louwie17 be7dd2dd5e Add recommended payment methods (https://github.com/woocommerce/woocommerce-admin/pull/6760)
* Add initial payment recommendations code for the payments settings

* Added request data for the recommended payments

* Some styling updates and make sure it does not show when marketplace suggestions is disabled

* Update url

* Update comment in php class

* Add tests

* Fix lint errors

* Remove unnecessary type

* Fix lint error

* Fix broken test

* Convert plugin package to typescript

* Fix lint errors

* Add changelog

* Add support for locale-data

* Fix track name

* Fix up the tests

* Fix lint errors

* Address PR feedback

* Add tests for option hydration

* Make types more robust in plugins reducer

* Made use of SlotFill component instead of page registry and router

* Removed console log, and fixed types

* Add newer version of i18n to data package, for newer types

* Make the request to WooCommerce.com more restrictive

* Fix path of import

* Update PHP with suggested changes

* Remove SlotFill with applyFilters

* Update copy and PR feedback

* Update package lock

* Updated package lock

* Fix the package lock

* Added dot, and some minor styling changes

* Add test instructions
2021-04-20 14:17:19 -03:00