Commit Graph

49154 Commits

Author SHA1 Message Date
Chi-Hsuan Huang ea194237a3
Fix product tour TypeError when reading innerHTML (#33448)
* Fix product tour TypeError when reading innerHTML

* Add changelog
2022-06-16 14:02:28 +08:00
Ilyas Foo ced9207a5d
Remove obselete experiment calls (#33449)
* Remove woocommerce_test_experiment

* Remove woocommerce_tasklist_progression
2022-06-16 13:06:08 +08:00
Christopher Allford 6d0fc0d6ac
Expand Repository Development Documentation (#33423)
This commit reworks some of the documentation in the monorepo to better represent how to get started and develop projects in it.
2022-06-15 21:55:25 -07:00
Paul Sealock b79e54eb09
Update JS packages changelogs (#33412) 2022-06-16 10:06:31 +12:00
AnnaMag 65cd33bee8
Settings: fix Tracks event when enabling/disabling advanced features settings. (#33305)
* Trigger the hook that record the track events
once the option settings are updated:navigation and analytics. Tracks do not include yes/no properties, so we record the latter as _disabled.

* Changelog

* Prevent reloading of page immediately after feature updates

* Remove feature specific code in tracks class

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-06-15 14:58:49 -05:00
Corey McKrill bccc80366d
Update method for getting Reports API cache version number (#33353)
* Changes the frequency at which the Reports API cache can be invalidated via the cache version number to be at most once every 10 minutes, instead of with every change to the store.
* Changes the TTL of Reports API cache entries so that they expire after an hour instead of after a week.

The goal of these changes is to increase the chance that a request to the Reports API for store stats will result in a cache hit, thus avoiding expensive, slow queries. The reason for lowering the TTL is so that if multiple store changes are made within the new 10-minute frequency window, the cache data will only be stale for up to an hour. With #33325 users will be able to refresh entries in the cache manually if they think something is stale.

Closes #33315
2022-06-15 11:40:05 -07:00
Jorge A. Torres f0b9adc7ae
Make sure payment gateway title is a string before sanitizing (#33434)
Make sure payment gateway title is a string before sanitizing.

* Add changelog
* Drop type-hint in `validate_safe_text_field()`
* Update plugins/woocommerce/includes/abstracts/abstract-wc-settings-api.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
2022-06-15 10:49:11 -07:00
Fernando 55eebebeba
Add product deletion via datastore API (#33285)
* Add delete products via data store api

# Conflicts:
#	packages/js/data/src/products/action-types.ts
#	packages/js/data/src/products/actions.ts
#	packages/js/data/src/products/reducer.ts
#	packages/js/data/src/products/selectors.ts

* Add tests

# Conflicts:
#	packages/js/data/src/products/test/reducer.ts

* Set `force = false` by default

* Add changelog

* Fix thrown error

* Remove error

* Remove `DeleteProductType`

# Conflicts:
#	packages/js/data/src/products/actions.ts

* Remove conditional retrun

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-06-15 09:25:10 -03:00
Joshua T Flowers 35a4d1ca32
Clean up unused remote inbox notifications option (#33373)
* Clean up unused remote inbox notifications option

* Add changelog entry

* Add comments to existing action hooks
2022-06-15 08:03:36 -04:00
Jorge A. Torres 4b63f34841
[COT] Implement metadata CRUD and `update()` method in COT datastore (#33026)
* Add `OrdersTableDataStoreMeta` to handle metadata for orders

* Add `OrdersTableDataStoreHelper` with various helper functions used in the COT datastore

* Pass some helper classes as args to the COT datastore

* Use `OrdersTableDataStoreMeta` for meta in COT datastore

* Minor fixes to columns definition in COT datastore

* First pass at update() in the COT datastore

* PHPCS fixes

* Remove duplicate `read_meta` calls.

* Register `OrdersTableDataStore` earlier to make container happy

* Do not hardcode table metadata in `OrdersTableDataStoreMeta`

* Correctly format decimals for storing in the db

* read() shouldn’t success on non-existing orders

* Rework persisting to db in OrdersTableDataStore

* Correctly handle some props in OrdersTableDataStore

* Add changelog

* Add missing TODOs

* Remove unused variables

* No need to query db before deleting meta in `OrdersTableDataStoreMeta`

* Simplify OrdersTableDataStoreMeta::update_meta()

* Explicitly enumerate columns in OrdersTableDataStoreMeta::get_metadata_by_id()

* Make COT metadata implementation more generic

* Do not use property_exists() to determine existence of meta value

* Move some methods over to DatabaseUtil and get rid of COT datastore helper

* Rename `CustomDataStoreMeta` to `CustomMetaDataStore`

* Make PHPCS happy

* Add unit test.

* Correct arg passed to persist_order_to_db()

* Remove comment

* Split conditional on multiple lines

Co-authored-by: vedanshujain <vedanshu.jain.2012@gmail.com>
2022-06-15 14:09:41 +05:30
Ilyas Foo 090822eabf
Update product task experiment names (#33428)
* Update product task experiment names

* Changelog

* Fix lint
2022-06-15 16:34:24 +08:00
Niels Lange c33d7cc632
Correct CLIRunner translations (#33247)
* Correct CLIRunner translations

* Adjust placeholder formats and translator comments

* Add changelog.

Co-authored-by: vedanshujain <vedanshu.jain.2012@gmail.com>
2022-06-15 12:54:39 +05:30
Chi-Hsuan Huang 33ce73f47f
Fix explat fetchExperimentAssignment response (#33425)
Fix fetchExperimentAssignment response
2022-06-15 10:18:45 +08:00
Chi-Hsuan Huang aac85ac301
Turn on experimental-product-tour feature flag (#33413)
* Turn on experimental-product-tour feature flag

* Add changelog
2022-06-15 09:50:37 +08:00
Corey McKrill 12cbb87e80
Add cache refreshing/debugging mechanisms to Report API endpoints (#33325)
Adds a new collection parameter to all Reports API endpoints that utilize caching, `force_cache_refresh`, which will cause the current request to bypass the cache, re-run the queries for the requested data, and overwrite the previous cache entry with the new results.

Note that this doesn't invalidate the entire cache, only the entry for the particular set of collection parameters and values specified in the request.

This also adds a way to include debugging information related to the cache in the API response. Modeled after the way the Query Monitor plugin adds such information, you can get this by including an `_envelope` parameter in your API request. The debugging info includes whether the cache has been disabled via filter (`should_use_cache`), whether the `force_cache_refresh` parameter was used, whether the returned data was a `cache_hit` or not, and an array of the query parameters that were actually used to create the cache key.

Closes #33221
2022-06-14 14:24:31 -07:00
Paul Sealock dc2977cea3
Merge pull request #33329 from woocommerce/add/admin-tester
Add WooCommerce Admin Test Helper
2022-06-15 07:31:21 +12:00
jonathansadowski 4ec3bef590
Update the changelog.txt and the stable tag in readme.txt for 6.6.0 (#33419) 2022-06-14 14:14:27 -05:00
Joel Thiessen 183ac65c82
Adding context property to tasklist tracks event, introducing LayoutContext (#33287) 2022-06-14 11:31:50 -07:00
Daniel Morell 143d86490d
Generalize photoswipe button event target (#27804)
* Generalize photoswipe button event target

Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
2022-06-14 15:05:43 -03:00
jonathansadowski 277fd78bca
Sync payment gateway titles fix (#33418)
* Introduce a 'safe_text' field that allows a reduced subset of HTML tags.

* Escape on input as well as output; generalize sanitization function.

* Set reasonable default rules.

* Guard against invalid callbacks (escaping/sanitizing) functions.

* Update plugins/woocommerce/src/Internal/Utilities/HtmlSanitizer.php

Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>

* Allow alt (accessibility) for img tags; allow class attributes for img and span tags.

* Allow class attr for p tags.

* Use safe_text for payment gateway titles.

* Make HtmlSanitizer available through Utils service provider.

* Update settings code to pull HtmlSanitizer as a service and to use the new sanitize() method.

* Remove `style` from list of allowed attributes.

Allowing arbitrary CSS rules through style could undo the intent of this change, since that would allow a range of positioning and sizing changes to be effected.

* Remove unusued import.

* If no (KSES) rules are specifed, then strip all tags (this is a safer default strategy).

* For better safety, only apply pre-processor callbacks; remove responsibility for trimming of strings.

Applying callbacks to a string after it ahs passed through wp_kses() could (potentially) undo the work done by that function, and result in unexpected tags in the sanitizer's output.

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
2022-06-14 12:31:27 -05:00
Luigi Teschio 84ecebdad2
Update WooCommerce Blocks package to 7.8.0 (#33338)
* Update WooCommerce Blocks package to 7.8.1

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-06-14 11:24:41 -03:00
Ilyas Foo 27041efdc5
Add event tracking product page spotlight tour (#33400)
* Update WooStep to have name in meta

* Add useProductStepChange hook and use it to detect form value changes in product tourkit, added tracking for tour view, tour dismiss, tour complete, and step complete

* Add tour view, tour dismiss, tour completion track to old product walkthrough

* Changelog

* Fix test

* Add listener to publish button for product spotlight tour

* Add track for old walkthrough publish button
2022-06-14 16:19:32 +08:00
Chi-Hsuan Huang 94367ca559
Migrate `@woocommerce/data` onboarding store to TS (#33401)
* Migrate onboarding data store to TS

* Update deprecated-tasks.tsx type annotations

* Fix onboarding resolvers
2022-06-14 10:23:40 +08:00
Chi-Hsuan Huang 4ebdd2b226
Add e2e test to make sure chunk URLs contain version param (#33402)
Add e2e test to make sure chunk URL contains version param
2022-06-14 10:23:23 +08:00
Chi-Hsuan Huang 257e558530
Update product template descriptions (#33397)
* Update product template descriptions

* Add changelog
2022-06-14 10:22:57 +08:00
Chi-Hsuan Huang 8fb9664b7a
Fix product tour spotlight location (#33395) 2022-06-14 10:22:43 +08:00
Chi-Hsuan Huang 7a1df3d1cd
Tweak tour kit gap between content and controls (#33394)
* Tweak tour-kit gap between content and controls

* Add changelog
2022-06-14 10:22:31 +08:00
Paul Sealock 413e327e4a
@woocommerce/components: Prep changelog for release (#33359)
* Prep changelog

* bump version in package.json
2022-06-14 14:21:02 +12:00
Vedanshu Jain 3fd9ee99aa
Fix typos COT verification messages. (#33207)
* Fix typos in migration error messages.
2022-06-13 16:08:57 -03:00
mrleemon 22721e6a28
Fix typos in CLIRunner.php (#33231)
Fix typos in CLIRunner.php

Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
2022-06-13 11:30:24 -07:00
Adrian Duffell 1e03b68598
Update onboarding email marketing checkbox default to false (#33292) 2022-06-13 09:55:57 +08:00
Paul Sealock a3bd1b8971 update lock file 2022-06-13 12:49:42 +12:00
Paul Sealock 0efd480581 merge conflicts 2022-06-13 12:47:00 +12:00
Paul Sealock b166d45986
WooCommerce Plugin: Update Webpack to 5.x (#33354) 2022-06-13 09:09:23 +12:00
jonathansadowski 1fe5137152
Update changelogger validation to work with turborepo (#33388)
* Update changelogger validation to work with turborepo

* Update file_get_contents call to include base_path
2022-06-10 15:23:14 -05:00
Joshua T Flowers 9d98f1b1da
Add update product actions to product data store (#33282)
* Add update product actions to product data store

* Add changelog entry

* Use MutableProperties for update data

* Omit read only properties instead of picking mutable properties
2022-06-10 12:24:27 -04:00
Joshua T Flowers 935f915cb5
Update scrollbar hover styles in new navigation (#33313)
* Update scrollbar hover styles in new navigation

* Update contrast ratio

* Add Firefox scrollbar properties

* Fix scrollbar-color and scrollbar-width values

Co-authored-by: Matt Sherman <matt@jam123.com>
2022-06-10 12:24:02 -04:00
Kathy 483d62f1cc
follow up to #33182 swap .woocommerce-info and .woocommerce-message colors in twenty twenty (#33377)
* swap .woocommerce-info and .woocommerce-message colors in twenty twenty
2022-06-10 15:38:31 +02:00
Kathy 19bea3832e
First pass: Twenty Twenty One notice styles. Closes #29560. (#33379) 2022-06-10 11:37:06 +02:00
Adp5067 4c164c3247
Make the option 'woocommerce_tracker_ua' load on demand. (#33274) 2022-06-10 08:55:10 +02:00
Paul Sealock 16a478eeb2
Extend cart checkout block package: Prep for publish (#33355) 2022-06-10 15:25:17 +12:00
Chi-Hsuan Huang 558e5e322e
Fix continue button is enabled when email is null in setup wizard (#33362)
* Fix continue button is enabled even when email is null in setup wizard

* Add changelog
2022-06-10 10:35:11 +08:00
Paul Sealock e1362b5dbf update lock file 2022-06-10 12:32:33 +12:00
Paul Sealock 4fa634ee0e merge changes 2022-06-10 12:26:26 +12:00
Paul Sealock 5054105972 try manual rebase conflict fix 2022-06-10 12:21:48 +12:00
Paul Sealock 7fcba06a62
Analyzer CLI: Allow commit hashes for comparisons (#33356) 2022-06-10 10:31:39 +12:00
Christopher Allford b7931409f2
Migrate From Nx to Turborepo (#33079)
This replaces all `nx` commands with `turbo` commands and removes Nx from the repository. All of the `project.json` files have been removed and any commands that broke with Turborepo have been adjusted.
2022-06-09 14:40:07 -07:00
Chi-Hsuan Huang a3d42be6b0
Fix setup wizard click button loading state (#33358)
* Fix setup wizard usage button loading state

* Add e2e tests for usage button loading state
2022-06-09 17:30:06 +08:00
Sakri Koskimies e80312eef0
Change attribute slug length requirement and add wc_create_attribute tests (#31795)
* Allow for 28-character attribute slugs
* Add wc_create_attribute tests
2022-06-09 10:51:38 +02:00
Ilyas Foo e3744709c7
Wrap product spotlight tour under ExPlat logic (#33361)
* Add experiment wrap

* Changelog

* Move experiment check to bottom to minimize explat calls
2022-06-09 16:21:28 +08:00