Commit Graph

158 Commits

Author SHA1 Message Date
Joshua T Flowers 233e23704f
Add product settings menu to new product management experience (#35592)
* Add icons

* Add classic editor url

* Remove welcome guide link and icon

* Add initial settings menu

* Fix up button styling

* Move product settings to its own folder

* Remove unnecessary registerPlugin call

* Use number type control for menu order field

* Add tests around product settings component

* Allow reviews by default on all new products

* Alphabetize product properties

* Add changelog entry

* Add data changelog entry

* Convert indentation to tabs

* Fix up scss linting errors

* Remove whitespace
2022-11-17 09:59:51 -08:00
timur987 8dc954d54b
Feature: Add the In-App Marketplace Tour (#35278)
Co-authored-by: Michal Iwanow <4765119+mcliwanow@users.noreply.github.com>
2022-11-15 11:12:17 +01:00
Chi-Hsuan Huang 76f99a482f
Cleanup and deprecate task properties and methods (#35450)
* Remove unused sectioned task code

* Remove section task type and update getVisibleTasks logic

* Clean up task list and deprecate methods/properties

* Add changelog

* Fix lint

* Remove snooze tests

* Remove snooze JS tests
2022-11-03 09:22:36 +08:00
Chi-Hsuan Huang a18f1bde92
Migrate @woocommerce/data report store to TS (#35048)
* Migrate reports store to TS

* Add changelog

* Update reports types
2022-10-28 11:29:03 +08:00
Joshua T Flowers 28f8e7f996
Enhance getInputProps to allow passing of non-overridden props (#35034)
* Allow additional props to be passed to the Form getInputProps method

* Remove getTextControlProps

* Pass additional shared props through getInputProps in shipping

* Simplify checkbox props

* Unwrap currency props

* Use onBlur event to sanitize prices

* Add changelog entry

* Add option to get checkbox props to form context helpers

* Update checkbox tracks handler naming and typing

* Fix up usage of getInputProps

* Add helper sanitize method

* Use sanitize helper method for product input fields

* Fix inventory input props after rebase

* Fix shipping typo

* Fix up form types after rebase

* Align all checkboxes on product page

* Rename new checkbox helper to getCheckboxControlProps

* Add helper method to get select control props

* Add data changelog entry

* Check for product name length on blur

* Add initial value for name to prevent uncontrolled value

* Add initial value for sku
2022-10-21 07:03:49 -07:00
louwie17 5f2c656e6b
Add/34331 add attributes modal (#34999)
* Add initial add attribute modal

* Add async select control component and add attribute terms

* Make use of AsyncSelectControl for attributes

* Rearranged the add attribute form to make removing easier

* Make sure add button is disabled if fields are empty

* Remove the use of AsyncSelectControl for now

* Add disabled option and fix merge conflict

* Add attribute modal tests

* Remove unused trigger drag

* Add popover slot

* Small update to select control and fix multi selection in term field

* Add tests for attribute and attribute term fields

* Add changelogs

* Small fix after merge conflict

* Fix some styling and issue with select control when clearing item

* Fix lint error

* Fix up some styling issues after rebase

* Fix formatting, some styling issues, and address some PR feedback

* And confirmation dialog for closing the modal.
2022-10-19 16:28:29 -03:00
Joshua T Flowers 3c6681054a
Add product management description (#34961)
* Add label prop to rich text editor

* Create feature class and enqueue styles

* Add description editor and parsing

* Fix up incorrect context for product data

* Add styling to rich text editors in product form

* Fix editor initialization on new product

* Add changelog entries

* Use trunk lock file

* Add component changelog entry

* Update lock file

* Register block store provider in tests

* Fix up phpcs errors in product feature file
2022-10-18 08:55:31 -07:00
Matt Sherman 9fc0935e98
Remove non-gmt scheduled sale properties from Product type (#35096) 2022-10-17 16:50:18 -04:00
louwie17 c55c91d7e0
Add category field dropdown field (#34400)
* Add initial category field component with new typeahead

Move search logic to useCategorySearch hook

Add initial add new category logic

Add parent category field to add new category modal

Adding some debug changes

Update category control to make use of internal selectItem function of select control

Add changelogs

Update pagesize back to 100

Add placeholder

Empty placeholder

Fix input and icon sizes

Fix input underline

Add max height and scroll to category dropdown

Add sorting of category items

Auto open parents when traversing up the tree using arrow keys

Add several comments

Add some initial unit tests for the category field component

Add tests for useCategorySearch hook and fixed minor bug

Update styling and autoselect parent if child is selected

Fix styling issues for the select control dropdown inside a modal

Fix issue with creating new category with parent

Add function comment and fixed border styling

Prune out create new category logic

Fix minor css issue with border

Revert some of the select control changes and make use of the custom type

Fix up some styling changes

* Fix type conflict

* Revert change in state reducer

* Add cursor pointer

* Fix styling errors

* Fix broken category tests

* Fix merge conflict
2022-10-14 09:05:39 -03:00
Joshua T Flowers 8fbdbaf354
Add product page inventory quantity management (#34984)
* Add manage stock section to product inventory section

* Fix up h4 styles in form sections

* Check if stock management is enabled in store settings

* Fix up more styles in form

* Extract inventory validation and add new validation rules

* Add changelog entry

* Add changelog entry

* Remove sku related validation
2022-10-12 14:30:02 -07:00
Maikel David Pérez Gómez e95bb3768e
Add new shipping class modal to a shipping class section in product page (#34937)
Add new shippping class modal to a shipping class section in product page
2022-10-11 12:00:35 -03:00
Sam Seay aec442139f
Update pnpm once again to fix issues with auto-install-peers (#35007) 2022-10-10 16:59:51 +13:00
RJ c67a0fbe27
Add Tiktok to OBW grow list (#34953) 2022-10-07 13:50:35 +08:00
RJ c19228da95
Dev: migrate @woocommerce/data reviews to Typescript (#34844) 2022-10-04 19:42:40 +08:00
Sam Seay 59e0c80f3c
Update the pnpm constraint to 7.12.2+ now auto-install is fixed. (#34872) 2022-10-03 10:52:42 +13:00
Joshua T Flowers 3fd736c72f
Update plugins installer component to TS, Fix TS bugs and Syncpack TypeScript (#34787) 2022-09-30 10:59:07 +13:00
Maikel David Pérez Gómez 7fe05d65f3
Load size units to show them as a suffix of shipping dimensions fields (#34856)
* Add dimensions to shipping section
Change the FormComponent to support input name with dot notation like dimensions.width
Add the dimension controls to the product form

* Remove custom styles from FormSection component and use Card and CardBody instead

* Add dimension fields formating using the woo number global settings

* Add dimension fields validations

* Solve conflics from rebase

* Add changelogs

* Fix resetForm function to consider the passed params and the initialValues

* Load size units to show it as a suffix of shipping dimensions fields

* Fix card styles according the disign and pass props manually to BaseControl
2022-09-29 14:54:04 -03:00
Sam Seay c0fe3ec18f
Fix pnpm version to 7.11.0 in engines and in CI (#34773) 2022-09-27 11:30:52 +13:00
louwie17 c01c48c8c3
Add initial attributes section for empty state (#34751)
* Add new attributes section and attributes field with just an empty state

* ADd changelogs

* Add check to not render the blank section when attributes exist

* Fix misspelling
2022-09-26 14:44:06 -03:00
Maikel David Pérez Gómez 2eda531d46
Add shipping class section and dropdown (#34684)
* Add shipping class section and dropdown

* Add comment suggestions

* Add a Spinner during shipping classes resolution
2022-09-23 09:54:52 -03:00
Sam Seay 04b74c1053
Upgrade to pnpm 7 (#34661)
* Remove -- -- from scripts that fixed issue in pnpm 6, fix a couple TS issues in sep packages
* Minor fixes to analyzer scripts and doco based on pnpm 7
* Add dompurify types to data package to avoid TS errors
* Remove pnpx in favor of pnpm exec
* Modify the code analyzer to respect pnpm version if present.
* Update instructions for running recursive lint, add comments to explain
2022-09-16 09:21:42 +12:00
RJ 29e70faf0f
fix: handle mobile app wrong user connection for mobile app modal (#34653) 2022-09-15 12:10:05 +08:00
RJ 6e2ada3706
Add: mobile app welcome modal and magic link (#34637) 2022-09-15 11:58:47 +08:00
louwie17 fa2df55f04
Add/crud get total count selector (#34613)
* Add getItemsTotalCount to crud data store

* Add changelog

* Make getTotalItemsCount more generic

* Rename total count resource name function, and add resolver for getTotalCount

* Remove deprecated data-controls function

* Add defaultArgs option for applyNamespace
2022-09-09 11:32:21 -03:00
Tomek Wytrębowicz a86e387667
Update/unify jest@27 across all packages (#34322)
* Update `jest-puppeteer@5.0.4` (from `4.4.0`)

to be albe to run with jest 28.

* Update `jest` and `ts-jest@^27` (from `25`),

to match `e2e-environment` needs.

* Update api-core-tests' `jest@^27` (from `25`),

to unify the used version across the stack.

* Update e2e-env's `jest@^27` & co.  (from `25`),

to unify the used version across the stack.

* Update e2e-env's `@jest/test-sequencer@^27`  (from `25`),

to unify the used version across the stack.

* Update admin-e2e-tests' `@jest/globals@^27`  (from `26`),

to unify the used version across the stack.

* Update woocommerce's `jest@^27.5.1`  (from `25`),

to unify the used version across the stack.

* Replace `mocked` from `ts-jest` to the one from `jest`,

Update `@types/jest@27.4.1` from `27.0.2`.
Try to fix broken tsc build.

* Update `e2e-core-tests`' `@jest/globals@^27.5.1`

from `^26.4.2`.

* Remove changelog entry for bumpin jest in `api-core-tests`

It was already covered in `trunk`.

Addresses https://github.com/woocommerce/woocommerce/pull/34322#discussion_r956019567

* Updated package-lock.yaml

* Updated timeout

* Added changelogs

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-09-06 09:29:45 -05:00
Chi-Hsuan Huang e687a48abf
Update dependencies and jest config to pass admin tests for pnpm 7 (#34428)
* Update @wordpress/data version to ^6.15.0

* Update jest.config.js to transform is-plain-obj js

* Update pnpm-lock.yaml

* Add changelog

* Add babel configs and update jest config

* Update tsconfig.json to exclude babel.config.js

* Add missing @types packages

* Add changelog

* Update pnpm-lock.yaml

* Update pnpm-lock.yaml

* Fix DateTimePickerControl type errors
2022-08-31 12:06:51 +08:00
Chi-Hsuan Huang f813153ac5
Fix country field is empty when navigating back to the store details tab (#34484)
* Add is_store_country_set to onboarding profile items

* Fix country field is empty when navigating back to store details tab

* Add changelog
2022-08-30 09:43:59 +08:00
Chi-Hsuan Huang 72d8c791e6
Migrate @woocommerce/data notes store to TS (#34220)
* Migrate wc.data.notes to TS

* Add missing field "is_read" to notes item schema

* Add changelog

* Fix test_get_notes_schema test
2022-08-30 09:42:32 +08:00
jonathansadowski 74f8d5f17a
Use syncpack to verify consistent versions for react and react-dom (#34397)
* Add GitHub action and pre-push hook for syncpack for react and react-dom

* Fix typo in pre-push script

* Don't execute suggested command to fix mismatches automatically.

* Update react and react-dom to 17.0.2

* Move changelog check to last, so that pre-push still fails if check isn't successful

* Add changelog files

* Correct issue with syncpack.yml referencing an internal action

* Add command to top-level package.json for fixing mismatches

* Update syncpack action to only run when package.json files are affected

* Update workflow to just run syncpack list-mismatches

* Add version pinning to syncpackrc
2022-08-24 10:15:22 -05:00
louwie17 78c28ae9f3
Add product link field (#34313)
* Add initial product field and modal for editing product link

* Create a product link modal for editing product link

* Only show permalink when product is published

* Add changelogs

* Add changelog for data package

* Change save button to primary

* Fix merge conflcts

* Add getPermalinkParts selector to products store

* Made use of getPermalinkParts to support draft products
2022-08-19 12:05:13 -03:00
Chi-Hsuan Huang 02b47a67db
Migrate @woocommerce/data navigation store to TS (#34239)
* Migrate woo data navigation store to TS

* Add changelog

* Fix action type

* Update packages/js/data/src/navigation/reducer.ts

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

* Add a doc comment to MenuItem type

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-08-17 14:32:38 +08:00
louwie17 a498cc8280
Add product form buttons and specific product edit page (#34211)
* Add initial product form action buttons to form

* Add new edit page and allow for updating and creating products

* Move crud functions to helper hook to keep things seperated better

* Add changelog

* ADd package changelogs

* Add isPending selector to products store

* Fix trash screen showing up when deleting product and add loading indicators

* Add extra types to Product type

* Update track names and add product data to tracks

* Update track logic when product is published

* Remove the Image section for now, to prevent confusion as it is not ready yet

* Add tests for the product form actions

* Update copy for publish & duplicate

* Remove unused code

* Set window.location correctly with href

* Reset changes in pnpm lock

* Moved pending action variables to product helper and updated buttons to reflect new suggestions

* Fix backwards compabitibility issue with Form changes

* Add switch to draft button
2022-08-11 11:04:14 -03:00
Moon dd794e8e26
Update/34063 store location skip btn (#34176)
* Make ProfileItems properties optional

* Remove skip button codes and replace them with SkipButton component

* Add SkipButton component

* Add changelog

* Add back continue button callback

* Apply popover styles globally

* Add skip button on the industry step

* Add skip button on the product types step

* Add skip button on the Business Details step

* Support onSkipped callback

* Record skip event

* Add skip event track for industry, product types, and business details

* Add SkipButton to the theme step

* Update snapshot

* Change track name to separate business details and free features

* Add changelog

* Remove unused code

* Update product types test snapshot

* Add back UsageModal on Continue click

* Update e2e tests to use Skip

* Use button selector for skip btn

* Fix duplicate event dispatch

* Do not call onClose and onContinue during the rendering -- it causes cannot update a component while rendering a different warning. Instead, call them when the button is clicked

* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set

* Skip the profiler without rendering usage modal when woocommerce_allow_tracking is set

* Go to the next step when allowTracking is yes
2022-08-08 21:08:03 -07:00
Chi-Hsuan Huang af97aaf410
Migrate @woocommerce/data settings store to TS (#34184)
* Migrate wc.data.settings to TS

* Correct data.settings type

* Fix wc admin client type errors

* Add changelog

* Add changelog

* Update types

* Update RawSetting type
2022-08-08 13:25:46 +08:00
RJ f3e436f991
fix: type definition issues related to pnpm hoisting rules in preparation for pnpm 7 upgrade (#34154)
- added missing TS definition dependencies
2022-08-05 15:19:08 +08:00
Sam Seay 5becf47d60
Simplify turbo commands (#34055)
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
2022-08-05 12:03:17 +12:00
Jacob Sewell f71f480027
Add product categories datastore (#33984)
* First draft of product categories datastore changes.
Heavily based on product shipping classes code.

* Fix constant name in product categories data store index.

* Create changelog for 33464/33984.

* Move changelog to correct folder.

* Remove redundant context param in product categories Query (already in BaseQueryParams).

* Apply Partial to BaseQueryParams.
2022-08-03 10:55:13 -05:00
Moon dfa8d017f3
Use the default payment suggestions when woocommerce_show_marketplace_suggestions is set to no (#34083)
* Support force_default_suggestions argument

* Use force_default_suggestions

* Support force_default_suggestions argument -- returns the default payment suggestions when both woocommerce_show_marketplace_suggestions and woocommerce_setting_payments_recommendations_hidden options are set to no

* Add changelog
2022-07-27 21:02:24 -07:00
Ilyas Foo e41c8b027d
Fix unusable historical import (#34054)
* Add resolvers to data store

* Changelog
2022-07-25 11:20:40 +08:00
Joshua T Flowers 4c1a82dc26
Add data store attribute terms (#33721)
* Add product attribute terms store

* Add ability to add params to URL

* Allow IdQuery for all crud functions

* Add tests around item parent keys

* Add tests around new utils

* Throw error when not all params are replaced in REST URL

* Add require attributes for terms

* Allow urlParameters to be specified

* Use namespace to detect url parameters

* Fix up selector return after applying namespace

* Clean queries to prevent sending URL param data to endpoint

* Add tests around new utils

* Remove unused method import

* Remove urlParameters argument no longer being used

* Add changelog entry
2022-07-21 12:28:30 -04:00
Joshua T Flowers 4f1bd278a3
Add product tags data store (#33682)
* Allow IDs to be numbers or strings

* Add product tags data store

* Remove duplicate IdType

* Add required fields

* Add changelog entry

* Prefix new data stores with EXPERIMENTAL_
2022-07-15 15:51:29 -04:00
louwie17 87e1f3106d
Add/33443 shipping zones data store (#33830)
* Add shipping zones data store

* Make query object optional in getItems call

* Make query optional

* Add changelog
2022-07-14 09:53:26 -03:00
louwie17 385fa1e3f9
Add required fields to CrudActions type (#33809) 2022-07-12 11:27:17 -03:00
github-actions[bot] c33212e612
Prepare Packages for Release (#33776)
Automated change: Prep all packages for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2022-07-08 14:04:49 +12:00
louwie17 9e3df911c8
Add shipping class data store (#33765)
* Add initial shipping classes data store

* Add types for the product shipping class store

* Filter out undefined items in list for when an item is deleted

* Add changelog

* Add data store README
2022-07-07 13:36:50 -03:00
Paul Sealock 72925142f3
Packages: Fix postinstall errors on install (#33724) 2022-07-07 14:53:59 +12:00
Paul Sealock 7229b65bc9
Changelogger: Fix PHPCS violations (#33664) 2022-07-07 08:54:48 +12:00
Joshua T Flowers 67d9ba3b19
Add CRUD data store typing (#33680)
* Rename and export selectors for easier typing

* Add CRUD action and selector type mapping

* Add product attribute types

* Separate getItem to provide correct return type

* Rename config to type

* Add generator return types
2022-07-06 12:04:16 -04:00
Moon 76f9a1fc57
Fix export functionality on Analytic pages (#33709)
* Import correct controls

* Add changelog

* Add changelog
2022-07-04 12:55:39 +08:00
Joshua T Flowers 97f337ad8d
Add CRUD data store delete (#33596)
* Add delete actions

* Update CRUD actions in readme

* Allow IDs to be numbers or strings

* Update tests

* Update selectors to use IdType
2022-07-01 14:04:17 -04:00