Commit Graph

958 Commits

Author SHA1 Message Date
Joshua T Flowers e1ebabba29
Fix up rich text editor initial selection and add blocks (#35286)
* Fix double click toolbar behavior

* Fix initial block selection on editor load

* Add placeholder option to RichTextEditor

* Add image and video blocks

* Set toolbar height

* Allow inserter to be shown

* Allow media uploads in rich text editor

* Add changelog entries

* Fix media upload

* Check for existence of selected blocks before checking length

* Pass blocks to avoid race in detecting initially empty blocks
2022-10-31 14:36:54 -07:00
louwie17 aea554bcdb
Fix/form ts error (#35394)
* Fix forwardRef type in the Form component

* Add changelog

* Revert type changes
2022-10-31 17:11:31 -03:00
Matt Sherman 12b79d32c2
DateTimePickerControl: Allow time to be set to beginning or end of day when in date-only mode (#35296) 2022-10-28 09:32:28 -04: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
louwie17 04d6e8849c
Add name to select control popover slots (#35353)
* Add name to SelectControlMenuSlot

* Add changelogs

* Update changelog

* Fix typo in changelog
2022-10-27 12:52:29 -03:00
Thomas Roberts c539e5614f
Update `@woocommerce/extend-checkout-block` to include an example of a forced inner block (#33833)
* Update main integration file to register newsletter block scripts/styles

* Add files for example newsletter block

* Use only one internal dependencies comment

* Include newsletter block in index

* Move entry to correct position in webpack

* Rename functions to register scripts and styles

* Add changelog

* Remove block registration code

* Register slug as a block category to prevent warnings in console

* Add comment explaining the purpose of the function

* Bring templates up to date with latest changes to WC Blocks

The way the validation store selectors work was updated, so this template will use the new selectors.

* Ensure error message shows when box is not checked

* Ensure checkbox is targeted with CSS in editor
2022-10-27 01:28:44 -07:00
Maikel David Pérez Gómez 09df031593
Update font size and spacing in the tooltip component (#35265) 2022-10-25 17:00:11 -03:00
Matt Sherman 8ea8b532c0
Support PHP style date format specifiers in DateTimePickerControl (#35285)
* Use @wordpress/date to format for display in DateTimePickerControl
* Update default formats to PHP style
* Update tests to use @wordpress/date formatting
* Update CustomDateTimeFormat story to use PHP style formatting
2022-10-25 15:50:59 -04:00
Matt Sherman 9ca5cbe3a5
Fix DateTimePickerControl suffix style (#35256) 2022-10-25 14:56:29 -04:00
Joshua T Flowers 2aa4ce0d9f
Disable product inventory toggle when inventory management is disabled (#35059)
* Disable product inventory toggle when inventory management is disabled

* Export conditional wrapper as experimental component

* Conditionally show the tooltip

* Add comment explaining the tooltip overlay

* Add components changelog entry

* Display tooltip on hover any portion of toggle or label

* Add changelog entry

* Fix scss lint error

* Center tooltip over label and toggle

* Fix up input props after rebase

* Add wrapper around field to maintain block item formatting
2022-10-24 09:08:27 -07:00
github-actions[bot] a72e68ea65
Prepare Packages for Release (#35277)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2022-10-24 16:37:07 +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
github-actions[bot] 3d78fd24ee
Prepare Packages for Release (#35205)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2022-10-20 13:21:11 +08: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 c72e00d85c
Add Tooltip component and remove EnrichedLabel (#35024)
* Add experimental tooltip component

* Add tooltip stories

* Update EnrichedLabel component

* Remove EnrichedLabel

* Add changelog entries

* Fix up linting issues

* Handle PR feedback
2022-10-18 16:08:49 -07:00
louwie17 1f7deb139f
Add popover support to select control dropdown (#34967)
* Add dropdownPlacement option to SelectControl

* Make use of parent element of menu for width

* Add changelog

* Add useEffect for boundingRect so it gets updated accordingly

* Fix styling for popover dropdown

* Move popup markup down to render return

* Move getMenuProps up

* Move getMenuProps down to list again and always render the popover menu

* Add MenuSlot that adds popover slot to mody with aria-live=off so it is skipped by Modal

* Add comment in relation to the eslint-disable comment

* Fix flashing of popover and addressed some minor PR suggestions
2022-10-18 16:55:37 -03:00
Matt Sherman 0769625b72
Add DateTimePickerControl Form stories and tests (#34964)
* Add test for DataTImePickerControl in Form
* Add DateTimePickerControl to Form story
* Export type for InputProps
2022-10-18 15:06:04 -04: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
Greg 868f581af8
Prepare api-core-tests for release (#35001) 2022-10-17 12:24:07 -06:00
Matt Sherman e470c62650
Add date-only mode to DateTimePickerControl (#35066)
* Remove border from top of date picker
* Add isDateOnlyPicker, rename is12HourPicker
* Add tests for isDateOnlyPicker
* Add date only story
2022-10-14 16:48:03 -04:00
Matt Sherman 0cbc45ba85
Handle ambiguous dates (with no offset) in DateTimePickerControl (#35077)
* Add tests for ambiguous and unambiguous UTC dates

* Assume UTC for ambiguous dates

* Changelog

* Remove console statements
2022-10-14 15:38: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
Fernando Marichal ca4bd882ed
Improve the "Dismiss" button visibility (#35060)
* Improve `Dismiss` button visibility

* Add changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-10-13 09:42:35 -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
Joshua T Flowers 618cc54a3f
Add RichTextEditor component using native block editor toolbar (#34865)
* Add initial rich text editor component

* Use fixed toolbar and add base formatters

* Add link as formatter option

* Fix up references to core/link block

* Add quote transform

* Add changelog entry

* Add text alignment toolbar

* Remove references to checkbox list

* Update toolbar button organization

* Remove unused rtj format types

* Create unique instance for editor writing flow

* Add registry provider for storybook examples

* Update styling for editor

* Rebase and fix lock file

* Add packages and type dependencies

* Move component to experimental

* Fix up formatting

* Update editor to use default GB toolbar

* Prefix names with woocoommerce

* Create block on initialization so toolbar is visible

* Rely on insertBlock to handle selection

* Update text editor to use setting instead of BlockList prop

* Fix up lock file after rebase

* Handle PR feedback

* Move logic for force rerender

* Fix up pnpm lock file

* Use trunk lock file

* Update lock file

* Add missing semicolon

* Use Pauls lock file and package file
2022-10-12 14:15:55 -07:00
Fernando Marichal 98162b9d42
Images Product management MVP 1.0 (#34769)
* Add image section

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx

* Add `keepSpaceWhenDragging` to sortable

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/sortable/sortable.tsx

* Export ImageGalleryItem

* Add props to `image-gallery`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery-item.tsx
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Changed `media-uploader` label

* Add changelogs

* Fix image-gallery and sortable components

# Conflicts:
#	packages/js/components/src/sortable/sortable-item.tsx
#	packages/js/components/src/sortable/sortable.tsx

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx
#	packages/js/components/src/sortable/sortable.tsx

* Set gallery min-height

* Add onOrderChange

* Show images section edit-product

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/edit-product-page.tsx

* Fix styles

* Fix styles

* Fix image alt

* Fix TS any

* Add prop `onDragOver`

# Conflicts:
#	packages/js/components/src/image-gallery/image-gallery.tsx

* Fix styles

* Fix padding

* Fix image area min-height

* Fix subtitle copy

* Fix image margin

* Change `draggedImageId`

* Fix `setDraggedImageId` reset

* Rename `isRemoveZoneVisible`

* Add `CardBody` and remove redundant `setValue`

* Fix card styles

* Remove `getUniqueImages`

* Use url as a key when there is no image id

* Fix `orderedImages`

* Add hover to gallery images

* Fix gallery arrows and set cover problems

* Altering blur handler to prevent toolbar closure on media modal

* Fix toolbar drag and drop

* Add replace fn

* Restoring modal class for blur function

* Fix storybook

* Ensuring onBlur doesn't happen while dragging, resolving issue in Firefox

* Adding expected event object to drag callbacks

* Fix image size

* Fix lint

* Another fix lint

* Update plugins/woocommerce-admin/client/products/sections/images-section.tsx

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Fix `draggedImageId` default value

* Fix toolbar icon style

* Rename consts

* Update pnpm-lock.yaml

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joel <dygerati@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-10-12 15:16:22 -03:00
Sam Seay 55b49cb50a
Fix and consolidate linting across the monorepo (#35012) 2022-10-12 15:05:01 +13:00
Matt Sherman 2605d14b9d
Make DateTimePickerControl debounce handling more robust (#34963) 2022-10-11 17:22:52 -04:00
Matt Sherman 0b70974d43
Fix DateTimePickerControl initial setting of input field (#34980)
* Fix expect checks to actually do something
* Fix default 24 hour format
* Add test for when currentDate is changed
* Fix up tests that were broken (and masked by no assertions)
* Fix initial setting of input
* Export default 12 hour and 24 hour formats
2022-10-11 14:55:08 -04: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
louwie17 d756494bcc
Update/experimental select control (#34620)
* Combine last 23 commits into one.

Update css, so dropdown shows correctly

Add extra callbacks and expose some downshift combobox functions

Add changelog

Update stories to reflect new props

Update stories label

Removed `clearOnSelect` prop and reverted some other changes

Fix missed props during rebase

Remove old storybook story and slight fix from rebase

Remove unneeded code

Update default get filtered functionality and add regex escaping

Some updates by testing a new onStateChange callback

Expose the onStateChange callback for more fine control ove the useSelect

Some minor adjustments

Expose stateReducer and minor adjustments from PR review

Simplify logic around isOpen handling with outside component

Remove unused import

Remove onStateChange prop

Address PR feedback

Some minor adjustments to the input handling

Update the way the stateReducer is called

Remove some of the unneeded logic

Remove onStateChange and replace it with onSelectedItemChange and onInputValueChange for simplicity

Fix lint error

* Remove duplicate and unused import

* Fix call to ControlledPropUpdatedSelectedItem in story
2022-10-06 11:40:41 -03:00
Joshua T Flowers 048e04d192
Allow external tags in SelectControl component (#34823)
* Allow external tags in SelectControl component

* Add changelog entry

* Fix up changes after rebase

* Fix up custom item type example
2022-10-05 13:29:30 -07:00
Joshua T Flowers e4f9ccf184
Update text input placement in SelectControl (#34788)
* Move input next to selected items

* Keep input focused on clicking inside combobox

* Add changelog entry

* Handle PR feedback

* Vertically center search icon
2022-10-05 12:08:10 -07:00
Joel Thiessen 77700eb3cc
Adding toolbar to the Image Gallery component (#34871) 2022-10-05 12:07:03 -07:00
louwie17 6af1695f34
Add/34333 attribute list (#34841)
* Add initial attribute list with dragging and removing functionality

* Fix sortable styling and remove the default selected logic

* Fix css formatting

* Add changelogs

* Add missing question mark

* Add tests

* Some minor CSS updates and move some logic to a util function

* Fix lint issues and add extra test
2022-10-05 13:04:20 -03:00
Joshua T Flowers 4ca95b4fd1
Fix initially selected items in SelectControl component (#34794)
* Allow initial selection of items in SelectControl

* Update stories to include initially selected items

* Add changelog entry

* Update combobox single selected item name
2022-10-04 17:03:37 -07:00
RJ c19228da95
Dev: migrate @woocommerce/data reviews to Typescript (#34844) 2022-10-04 19:42:40 +08:00
Matt Sherman 3ea8c22af5
Remove unfinished and unused SplitDropdown component (#34806) 2022-10-03 14:23:57 -04: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
Matt Sherman 35ede22a3d
DateTimePickerControl updates (#34656)
* Switch DateTimePickerControl to use InputControl instead of DateInput
* Add label, placeholder, help props to DateTimePickerControl
* Clean up DateTimePickerControl storybook stories
* Add additional tests for DateTimePickerControl
* Debounce changes in input for DateTimePickerControl
2022-09-29 11:13:31 -04:00
Matt Sherman b8066f9b31
Add FormContext().setValues() support (#34617)
* Add setValues to FormContext
* Add onChanges callback to handle when multiple values are changed at once
2022-09-27 19:06:53 -04: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
Joshua T Flowers b65d473796
Add Sortable component accessibility (#34539)
* Add key event handlers

* Track selected item and focus

* Fix selected indexes on up down selection and drop

* Consolidate update item order logic

* Hide horizontal items on drag

* Update naming of ordering persistence

* Announce keyboard events to screen readers

* Consolidate reset method

* Simplify drop index numbers and conditions

* Fix up announcements

* Add tests around new utils

* Fall back for item name in announcement from aria label or alt text

* Update lock file

* Add changelog entry

* Handle PR feedback

* Fix up lock file after rebase

* Update lock file

* Update lock file again

* Update lock file after pnpm7

* Use trunk lock file

* Update lock file with a11y package

* Try new lock file

* Try lock file with pnpm add

* pnpm add from root

* Fix itemToString in SelectControl

* Downgrade a11y to v3.5.0
2022-09-22 12:08:26 -07:00
Matt Sherman ea6a0d31f9
Fix EnrichedLabel Storybook styles (#34736)
Fix EnrichedLabel story to not bleed styles to other stories
2022-09-21 22:03:01 -04:00
Joshua T Flowers f39d8b6b39
Improve experimental select control accessibility (#34510)
* Use downshift built in methods to handle selection of items

* Fix menu styling

* Fix removal a11y announcement

* Don't show menu without results

* Fix async example a11y

* Add changelog entry

* Deselect item in state on remove

* Fix formatting issues

* Update lock file

* Update lock file after pnpm7

* Skip lib check breaking oclif build in package-release

* Rebase again and fix up lock file

* Skip lib check in monorepo-merge

* Fix the lock

* Ignore lint

Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Jonathan Sadowski <sadowski@automattic.com>
2022-09-20 14:29:27 -07:00
Joel Thiessen 09bfa0b737
Allowing generic item type in new experimental SelectControl (#34547)
Co-authored-by: Joel <joel.thiessen@a8c.com>
2022-09-16 13:35:14 -07: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
louwie17 a7127a8456
Revert a condition change on third param in onChange prop (#34626)
* Revert back isValid condition on third param

* Add changelog
2022-09-09 09:57:56 -03:00
louwie17 1b2e9c120d
Fix form onchange callback (#34614)
* Fix onChange method, so it contains the newValues object

* Add changelog

* Update storybook to add onChange values

* Update tests and fix onChange isValidForm callback

* Fix radio control example
2022-09-08 16:24:39 -03:00
Joshua T Flowers 43a24bc6c3
Add image gallery component (#34435)
* Add initial ImageGallery component

* Add changelog entry

* Extract list item component and styles

* Rename SortableList to Sortable

* Add placeholders for dropping items

* Fix drag throttling delays

* Use placeholder component

* Move handles back to sortable

* Add horizontal option to sortable

* Use CSS for placeholder styles

* Remove placeholder component

* Add image gallery styles

* Add last droppable class

* Extract class utils and add tests

* Add list item stories

* Add readmes

* Handle PR feedback
2022-09-06 12:46:32 -07: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
Matt Sherman b7606083e1
Update DateTimePickerControl's onChange signature (TypeScript) (#34561)
* Omit HTML onChange evnt from DateTimePickerControl

* Changelog entry for DateTimePickerControl's onChange change.
2022-09-02 15:46:27 -04:00
Fernando Marichal 30151a6cf7
Add `recordEvent` validation to Tracks package (#34005)
* Add `recordEvent` validation

# Conflicts:
#	packages/js/tracks/package.json

* Convert tests to ts

* fix error message

* Add console.error message

* Fix `validateEventNameAndProperties`

* Add changelog

* Add validation method

* Fix tests

* Fix package

* Move changelog

* Add changelog

* Fix type

* Move env definition

* Fix tests

* Fix condition

* Fix regex and tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-09-01 13:34:42 -03: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
Joshua T Flowers dc4a2ba741
Update tag component styling (#34457)
* Update tag to new style

* Add changelog entry
2022-08-30 07:45:50 -07:00
Fernando 33405283cd
Add Pricing section (#34382)
* Add pricing inputs

# Conflicts:
#	plugins/woocommerce-admin/client/products/add-product-page.tsx
#	plugins/woocommerce-admin/client/products/layout/product-section-layout.scss
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

* Add pricing inputs

* Add validation

* Fix scss

* Moved validations

* Add tests

* Add regex validations

* Add tax settings

* Fix comment

* Add product name validation

* Fix validation copy

* Rename `woocommerce-add` classes

* Fix texts i18n

* Remove image section

* Fix decimal separator error

* Add `FormSection` component

* Fix `Enriched-label` component

* Add packages changelog

* Removed not used styles

* Add error handling

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-30 10:26:24 -03: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
Tomek Wytrębowicz eeb090ddf8
Update `jest-puppeteer@5.0.4` (from `4.4.0`) (#33827)
to be albe to run with jest 28.
2022-08-29 12:22:30 -06:00
Tomek Wytrębowicz ea8b44115b
chore: Unify imports syntax in admin-e2e, add missing dependencies (#33901)
* Unify test spec helpers `export` syntax to ESM,

to make it possible to impor them locally.

* Unify import syntax to ESM

* Install missing dependencies of admin-e2e-tests

* Do not import `expect` from `@jest/globals` in admin-e2e-tests

Let typescript pick the puppeteer extension from global.
Address https://github.com/woocommerce/woocommerce/pull/33901#issuecomment-1221650234

* Map unknown types in `admin-e2e-tests` to make tsc happy.

* Add changelog entry

* Use the angle-bracket syntax instead of type assertions

Address https://github.com/woocommerce/woocommerce/pull/33901#discussion_r955591953

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-08-29 10:36:36 +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
Joel Thiessen 668244b2d7
Adding DateTimePicker component (#34293)
* Rudimentary functional version of datetimepicker

* Adding changelog

* Adding package changelog

* Making component more than barely functional

* Removing unnecessary export

* Rename directory to date-time-picker

* Add initial story

* Pass datetime to onChange callback

* Localize error string

* Remove initial error prop

* Rename currentDate to initialDate

* Simplify state for selected date

* Add extra stories around component

* Trigger onChange whenever date is changed

* Add readme

* Allow currentDate to be changed via props

* Update readme

* Update name to DateTimePickerControl

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-23 15:19:46 -07: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
Joshua T Flowers e73ffbe088
Add FormSection component (#34348)
* Add FormSection component

* Add changelog entry

* Move card styling outside component

* Add readme

* Allow JSX elements for title and description

* Fix lint errors
2022-08-18 10:36:43 -07:00
Joshua T Flowers 32de8bee6f
Add SearchControl component (#34159)
* Add initial SearchControl component

* Add async example

* Reorganize getItemPropsType type

* Create separate MenuItem component

* Update items to use value/label pairs

* Add fuzzy matching example

* Use MenuItem component in example

* Add callback method example and onSelect prop

* Add custom render example

* Add styling

* Simplify Menu component

* Add changelog entry

* Update SelectControl to DeprecatedSelectControl

* Rename SearchControl to SelectControl

* Add readme

* Add placeholder prop

* Add icon to combox box

* Rename deprecated SelectControl classes

* Add changelog entries

* Pass menu props to menu to fix ref issues

* Update lock file

* Rebase and update lock file

* Fix up IDs in e2e tests

* Make list structure more semantic

* Fix update conflict with pnpm-lock

* Move new SelectControl to experimental

* Change experimental class name to avoid style conflicts

* Fix up latest lock file from rebase

* Remove onboarding e2e changes

* Update changelogs

* Update lock file again

* Update pnpm-lock and fix lint error

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-08-18 10:36:20 -07:00
Alejandro López Ariza 64b0b2865e
Added new command to set up the local environment with COT enabled. (#34321)
* Added new command to set up the local environment with COT enabled.

* Removed new file added to e2e-environment, which we will no longer be using.

Co-authored-by: jamelreid <jnoelreid@gmail.com>
2022-08-18 08:49:20 +02:00
nigeljamesstevenson 301c02a757
add tests for shipping zone regions (#34339)
* add tests for shipping zone regions

* add changelog file

* add changelog file

* update files to disable use of linting rules via .elintrc.js rather than .eslintrc

Co-authored-by: Greg <zhongruige@gmail.com>
2022-08-17 14:50:31 -06:00
Jamel Noel Reid b85819f2a9
Fix broken API tests (#34345)
* Bumped jest to v27

* Used jest in packaged node_modules

* Jest bump

* Removed puppeteer related code

* Updated CHANGELOG

* Added changelog
2022-08-17 11:04:41 -07: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
Joshua T Flowers a98f0fef52
Add Media Uploader component (#34181)
* Add media uploader component

* Expand on mocked examples in storybook

* Add styling

* Move MediaUploder out of index

* Add changelog entry

* Handle PR feedback

* Add readme

* Fix missing media utils types

* Rebase and use variant instead of isSecondary for Button

* Fix up lock file

* Fix up lint errors
2022-08-12 12:58:25 -07:00
Joshua T Flowers 19853e1577
Add SortableList component (#34237)
* Add initial draggable list component

* Add changelog entry

* Add drag and drop index

* Add util for checking target drop index

* Add handle component

* Rename component to SortableList

* Use dragged list item for placeholder height

* Add onOrderChange prop to subscribde to updates

* Throttle the drag over event

* Add base styles

* Add utils tests

* Add component tests

* Export component

* Update changelog entry

* Add readme

* Escape pipe in readme
2022-08-12 11:45:26 -07:00
Jacob Sewell 46762dab29
Add SplitDropdown component (#34180)
* Early draft of SplitButton component.

* Changelog for SplitButton component.

* Rename SplitButton to SplitButtonDropdown, apply styles to address toggle button location/size, take primary button from children.

* Address button variant styles

* Rename 'Default' SplitButtonDropdown story to 'Secondary' for clarity.

* Add a SplitButtonDropdown story where the component is disabled.

* README for SplitButtonDropdown component.

* Add disabled prop to SplitButtonDropdown README.

* Add a SplitButtonDropdown story where some but not all actions are disabled.

* Restore PrimaryDisabled story for SplitButtonDropdown.

* Reorganize SplitButtonDropdown properties inheritance to allow both disabled and variant to apply to both the main and toggle buttons.

* Rename SplitButtonDropdown to SplitDropdown.

* Hardcode menuIcon and menuIconExpanded in SplitDropdown.

* Fix outdated stylesheet import for SplitDropdown.

* Update SplitDropdown changelog to new component name.

* Update variable names that reference Actions to Items.

* Hardcode expanded/collapsed toggle button icons without extraneous const declarations.

* Use classNames() helper fn for className concatenation.

* Increase width of SplitDropdown toggle button.

* Add a specific className to the root ButtonGroup element of SplitDropdown.

* Simple rendering test for SplitDropdown.

* For consistency, move Button text out of props in SplitDropdown README and story.

* SplitDropdown does not render a toggle button if there is nothing to put in the menu.

* Fix variant prop type declaration in SplitDropdown.

* Improve SplitDropdown test: remove snapshot, add toggle click.

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-12 12:47:39 -05:00
Fernando 4693e251f7
Add product name and checkboxes for Product details (#34214)
* Add product details

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

# Conflicts:
#	plugins/woocommerce-admin/client/products/sections/product-details-section.tsx

* Rename folder

* Fix help icon

* Fix form

* Removed useless `useState`

* Add `getCheckboxProps`

* Add params to getCheckboxProps

* Add recordEvent

* Rename event

* Add changelog

* Fix texts

* Remove Fragment

* Fix useState initial state

* Convert EnrichedLabel to TS

* Fix unknown value prop

* Rename event

* Move EnrichedLabel

* Fix js warning

* Add storybook

* Add readme

* Add components changelog

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-08-12 10:47:54 -03:00
github-actions[bot] 3e7c2e52cd
Prepare Packages for Release (#34299)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: ilyasfoo <ilyasfoo@users.noreply.github.com>
2022-08-12 16:05:13 +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
RJ 8af95fb700
fix: removed Step 1 of 1 for 1 step tours (#34249) 2022-08-11 11:42:07 +08: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
louwie17 339756ff7a
Add/32 react provider to form component (#34082)
* Add a FormContext to the Form component, to prevent the need for property drilling

* Add changelog

* Add PR number to changelog

* Replace some of the unknown types with any types to keep things more generic
2022-08-04 11:14:16 -03:00
RJ 75f6ec3a43
dev: refactor Homescreen component to use useQuery hook (#34183)
- added useQuery hook for usage in functional components
- refactored Homescreen component to useQuery instead of prop drilling
2022-08-04 16:57:53 +08:00
Chi-Hsuan Huang cb87be1552
Update store location profiler (#34153)
* Update store details unit tests

* Update store details subheading and field order

* Update obw store details e2e tests

* Add changelog

* Add changelog

* Update Store owner can go through setup Task List test
2022-08-04 09:02:50 +08: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
Joel Thiessen fd04261cab
Adding CollapsibleContent component (#34129)
* Basic version of CollapsibleContent component

* Adding changelog

* Add story for component

* Update styling to match designs

* Add initially expanded example

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-08-03 08:09:00 -07:00
RJ cb09649a4c
add: store location settings tour (#34137) 2022-08-02 11:10:34 +08: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
Jamel Noel Reid c207005c85
Fix app root fetching when using PNPM version 7 (#33929)
* Updated to pass lint checks

* Used __dirname to determine package path
2022-07-27 14:13:17 -06: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
github-actions[bot] 42401f212d
Prepare Packages for Release (#33970)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2022-07-19 16:21:14 +12:00
Jamel Noel Reid 7265fde855
Update e2e core tests to pass lint checks (#33928)
Updated to pass lint checks
2022-07-18 15:27:05 -03: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
Lucas Bustamante d239c17430
Fix e2e-environment lint (#33867)
* Fix e2e-environment lint

* Add changelog
2022-07-15 13:53:06 +02: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
Jacob Sewell 0142c16cd8
Add/33331 wcadmin install timestamp explat default (#33574)
* Add preloadOptions.woocommerce_admin_install_timestamp to wcSettings.admin definition in explat client.

* Add woo_wcadmin_install_timestamp to explat client queryArgs.

* Add checking for woo_wcadmin_install_timestamp in request args to explat fetch tests.

* Changelog for 33331/33574.
2022-07-11 11:59:41 -03:00
Chi-Hsuan Huang 8952dac7c0
Set up i18n-text-domain rule and fix missing text domain (#33780)
* Set allowedTextDomain to only allow woocommmerce text domain

* Set allowedTextDomain to only allow woocommerce text domain

* Fix wrong or missing i18n text domain

* Add changelog

* Add changelog
2022-07-08 18:37:30 +08: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
Chi-Hsuan Huang b274831334
Update wcpay suggestion UI in payment task (#33717)
* Add WCPayBanner & WCPayBenefits

* Update payment setting & welcome screen to use components from woo onboarding

* Update wcpay suggestion UI in payment task

* Add changelog

* Add WCPayBannerImageCut image and update wcpay banner style

* Update packages/js/onboarding/src/components/WCPayBanner/WCPayBanner.scss

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

* Set .woocommerce-recommended-payments-banner__image_container display: flex

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-07-06 14:20:11 +08:00
Moon 7c723583cb
Add tests for react admin translations (#33510)
* Add switch-language endpoint

* Add translation tests for PHP, react client, and component

* Fix component test

* Add Changelog

* Add Changelog
2022-07-05 17:16:15 -07:00
Miguel Pérez Pellicer bdb057c1ad
Add Tree Select Control Component (#33384)
* Add Tree Select Control Component

* Tweak test and code

* Fix Story path

* Restore .at

* Changelog

* Fix prettier error

* Update packages/js/components/src/tree-select-control/README.md

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/tree-select-control/tags.js

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Add comment regarding filter length

* Replace translate domain

* Document handleKeydown

* Refactor option object check

* Remove redundant check for disabled state

* Refactor tags & documentation

* Replace wrong domain for translations

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-07-06 10:07:50 +12:00
Joel Thiessen 57869a2ab7
Fixing activity panel does not appear after navigating to OBW and back (#33722) 2022-07-05 10:02:46 -07: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
RJ 04bef970ef
Dev: allow unused destructured variables in lint rules (#33548)
Allow unused destructured variables in lint rules

- there were exceptions to the rule being added everywhere and it seems to be a reasonable allowance
2022-06-29 16:56:31 +08:00
nigeljamesstevenson 00f4e9fa73
Update README.md to reference the correct port no. Change from 8084 to 8086 (#33635)
Update README.md to reference the correct port no.
2022-06-28 15:55:43 -06:00
Tomek Wytrębowicz a0aa8faf27
Bump `@wordpress/e2e-test-utils` from `4.16.1` to `wp-5.8` (#33257)
* Bump `@wordpress/e2e-test-utils` from `4.16.1` to `wp-5.8`

which resolves currently to  `5.3.2`,
to match minimum required WordPress version.

* Add changelog entry
2022-06-28 13:22:46 -06:00
jonathansadowski d48a0b2d90
Add helper tool for making sure build, lint, and test are run through Turborepo (#33573)
* Add helper tool for making sure build, lint, and test are run through Turborepo

* Update node version for require-turbo
2022-06-28 13:17:05 -05:00
Roy Ho 98cf4e7160
Add PR numbers to changelog entries on code freeze process (#33627)
* Add PR numbers to changelog entries on code freeze process

* Add markdown links to PR
2022-06-28 11:15:39 -07:00
Ilyas Foo b178e8a1f6
Add new flow shipping recommendation task (#33620)
* Plugins component skip button is now optional

* Add link from payment settings page

* Add new experimental shipping task flow

* Changelog

* Update plugins/woocommerce/src/Admin/Features/OnboardingTasks/Tasks/ExperimentalShippingRecommendation.php

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Rename all tracks to shipping_recommendation

* Add back skip installer bind

* Pass plugins list to pluginSlugs to be more predictable

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2022-06-28 13:53:03 +08:00
Joshua T Flowers adbe9f37d8
Add CRUD data store create and update actions (#33571)
* Alphabetize reducer

* Add create and update methods

* Add named dispatch actions

* Update data store tests

* Update readme to include dispatch action examples

* Add missing reducer type for update item error

* Fix whitespace issues
2022-06-27 09:36:00 -04:00
Chi-Hsuan Huang dcbae453f8
Update shipping recommendations display logic (#33529)
* Update shipping recommendations display logic

* Add todo comment

* Add changelog

* Render null for shipping recommendations if store only sells digital products

* Fix onboarding product type

* Update plugins/woocommerce-admin/client/shipping/test/experimental-shipping-recommendations.tsx

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

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2022-06-23 09:54:38 +08:00
Joshua T Flowers 59427def84
Add crud data store creator (#33546)
* Add initial get list data store methods

* Add product attributes data store

* Add method to retrieve single item resource

* Update use of endpoint to namespace

* Update resources naming to items to reduce ambiguity

* Use destructured object as argument for creators

* Move data store under the products namespace

* Add some tests around data store method creation

* Add readme for crud data store setup

* Add changelog entry

* Alphabetize method names

* Fix getItems selector resource name

* Remove unused vars
2022-06-22 19:35:02 -04:00
Chi-Hsuan Huang 3669426bd6
Migrate `@woocommerce/data` user and use-select-with-refresh to TS (#33512)
* Migrate wc.data user and use-select-with-refresh to TS

* Add changelog

* Update interval type

* Add doc comment

* Update use-user-preferences.ts test doc comment
2022-06-22 17:27:18 +08:00
Chi-Hsuan Huang e412d5912b
Migrate `@woocommerce/data` item store to TS (#33482)
Migrate item store to TS
2022-06-21 16:46:30 +08:00
Chi-Hsuan Huang 7068c78101
Fix JS lint errors (#33484)
* Fix @woocommerce/data lint errors

* Fix internal-e2e-builds lint error

* Fix lint errors
2022-06-21 16:37:34 +08:00
RJ a78670bfec
Updated @automattic/tour-kit to 1.1.1 which has live resize functionality (#33452) 2022-06-16 15:49:03 +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
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
Chi-Hsuan Huang 33ce73f47f
Fix explat fetchExperimentAssignment response (#33425)
Fix fetchExperimentAssignment response
2022-06-15 10:18:45 +08:00
Joel Thiessen 183ac65c82
Adding context property to tasklist tracks event, introducing LayoutContext (#33287) 2022-06-14 11:31:50 -07: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 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
Adrian Duffell 1e03b68598
Update onboarding email marketing checkbox default to false (#33292) 2022-06-13 09:55:57 +08: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
Paul Sealock 16a478eeb2
Extend cart checkout block package: Prep for publish (#33355) 2022-06-10 15:25:17 +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
Chi-Hsuan Huang 5db5c8b110
Add tour kit component (#33229)
* Add tour-kit component

* Add @types/wordpress__viewport to @woocommerce/components devDeps

* Add tour-kit README.md

* Add primaryButtonText option to tour kit step meta

* Add changelog

* Remove unneeded style import

* Set position and z-index style for tour-kit

* Add disable primary button feature for tour kit

* Export TourKitTypes

* Update style-build config for @automattic/* packages

* Add @automattic/* deps for components

* Ignore fs in webpack.config.js

* Update tour-kit stories

* Add tour-kit tests

* Update tour-kit README.md

* Update tour-kit types

* Update webpack.config.js

* Update style.scss

* Add auto focus feature

* Update type doc
2022-06-08 17:16:31 +08:00
Joshua T Flowers 17d9e8072d
Add create product actions in products data store (#33278)
* Add create product actions in products data store

* Add changelog entry

* Yield to actions in generator

* Add mutable properties type
2022-06-07 09:23:27 -04:00
Christopher Allford bb320a935a
Removed `@woocommerce/notices` Internal Prefix (#33283)
Since we're exposing the package in some form,
we cannot rename it since that would break backwards
compatibility.  This commit changes it back.
2022-06-03 16:05:26 -07:00