Commit Graph

1147 Commits

Author SHA1 Message Date
Joel Thiessen c76203cde5
Correcting spacing for image gallery block (#38151)
* Correcting spacing for image gallery component

* Adding changelog
2023-05-08 14:18:15 -03:00
Maikel David Pérez Gómez c265db936e
Add Sale price validation (#38078)
* Create sale-price block

* Create regular-price block

* Add changelog files

* Fix some typos in field validator names
2023-05-08 10:05:13 -04:00
Jeffrey Paul df0583f9b8
Fix/37502: Correct spelling errors. (#37887)
* change reference of Catpure to Capture

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference of expicitly to explicitly

Co-Authored-By: Vikram  <93216400+vikrampm1@users.noreply.github.com>

* change reference 'cutted' to 'cut'

* change reference 'determening' to 'determining'

* change reference 'retreive' to 'retrieve'

* change reference 'neccessary' to 'necessary'

* change reference 'Fitler' to 'Filter'

* change reference of "seperate" to "separate"

Co-Authored-By: Ankit K Gupta <ankit.himcs@gmail.com>

* change reference of "wether" to "whether"

Co-Authored-By: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>

* change reference of "staus" to "status"

* change reference of "retrive" to "retrieve"

* change references of "gatways" to "gateways"

* change references of "existant" to "existent"

* change reference of "requries" to "requires"

* change reference of "configuation" to "configuration"

* change reference of "processsing" to "processing"

* change reference of "represenation" to "representation"

* change reference of "dimentions" to "dimensions"

* change references of "reigster" to "register"

* change reference of "colum" to "column"

* change reference of "transtions" to "transitions"

* change references of "intially" to "initially"

* change references of "orignal" to "original"

* change references of "deprected" to "deprecated"

* change references of "paramter" to "parameter"

* change reference of "intance" to "instance"

* change reference of "elemets" to "elements"

* change references of "funcitons" to "functions"

* change reference of "specificed" to "specified"

* change references of "atributes" to "attributes"

* change reference of "tast" to "task"

* change reference of "chaning" to "changing"

* change reference of "retreiving" to "retrieving"

* change reference of "caluclation" to "calculation"

* change references of "Invaid" to "Invalid"

* change references of "paramaters" to "parameters"

* change reference of "Additonal" to "Additional"

* change reference of "teh" to "the"

* change reference of "evalutes" to "evaluates"

* change reference of "addedd" to "added"

* change reference of "excempt" to "exempt"

* change reference of "sequencially" to "sequentially"

* change reference of "previos" to "previous"

* change reference of "elegible" to "eligible"

* change references of "Boostrap" to "Bootstrap"

* change references of "compability" to "compatibility"

* change reference of "heirarchy" to "hierarchy"

* change references of "visibilty" to "visibility"

* change reference of "comparsion" to "comparison"

* change reference of "capabilties" to "capabilities"

* change reference of "datatores" to "datastores"

* change reference of "occured" to "occurred"

* change reference of "coresponding" to "corresponding"

* change references of "thier" to "their"

* change reference of "sucessfully" to "successfully"

* change reference of "insde" to "inside"

* change reference of "nagivation" to "navigation"

* change references of "visiblity" to "visibility"

* change reference of "documentaiton" to "documentation"

* change reference of "anayltics" to "analytics"

* change reference of "intalling" to "installing"

* change reference of "mininum" to "minimum"

* change references of "intial" to "initial"

* change reference of "Feld" to "Field"

* change reference of "taks" to "task"

* change reference of "trasnfer" to "transfer"

* change reference of "respone" to "response"

* change reference of "Extenstions" to "Extensions"

* change reference of "detault" to "default"

* change reference of "simultanious" to "simultaneous"

* change reference of "overides" to "overrides"

* change references of "Indvidual" to "Individual"

* change reference of "refering" to "referring"

* change reference of "aginst" to "against"

* change reference of "execuatable" to "executable"

* change reference of "repsonse" to "response"

* change reference of "documention" to "documentation"

* change reference of "asumed" to "assumed"

* change reference of "Minium" to "Minimum"

* change reference of "unqiue" to "unique"

* change references of "existance" to "existence"

* change reference of "compatability" to "compatibility"

* change reference of "Taxnomy" to "Taxonomy"

* change reference of "quering" to "querying"

* change reference of "retrun" to "return"

* change reference of "informations" to "information"

Co-Authored-By: Viktor Szépe <viktor@szepe.net>

* Add changelog

* Add changelog

* Fix typo

---------

Co-authored-by: Vikram  <93216400+vikrampm1@users.noreply.github.com>
Co-authored-by: Ankit K Gupta <ankit.himcs@gmail.com>
Co-authored-by: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-05-08 15:55:09 +08:00
Joshua T Flowers c4806c3ac8
Show comma separated list in ready only mode of select tree control (#38052)
* Add read-only state to selected items in select control

* Only close menu on focus outside of select control

* Add changelog entry

* Remove errant comment out of onBlur line

* Fix regression of input focus behavior

* Hide input when in read only mode

* Turn off read only mode when focused

* Show select control input on single item dropdowns and when no selections have been made in multiple dropdowns

* Prevent focus loss when removing an item

* Prevent loss of field focus when clicking on selected item tags

* Fix broken assertion with comma separated list

* Add product editor changelog entry
2023-05-08 04:17:52 -03:00
Chi-Hsuan Huang 2a87e4d21c
Migrate select control component to TS (#37751)
* Migrate select control to TS

* Add changelog

* Migrate test to TS

* Change value type to be optional

* Fix missing prop
2023-05-08 12:18:27 +08:00
Joel Thiessen e7d67710fd
Restoring standard tabbing behavior in product block editor (#38105) 2023-05-05 12:39:39 -07:00
Joshua T Flowers f1db682cc6
Fix summary toolbar positioning and selection on blur (#38086)
* Remove block selection on summary input blur

* Move block props to wrapper around rich text

* Fix content ID and for label

* Add changelog entry

* Use useInstanceId instead of lodash uniqueId
2023-05-05 11:52:12 -07:00
Joshua T Flowers bb244484d3
Update shipping dimensions image in new product blocks editor (#38101)
* Update shipping dimensions image SVG

* Allow labels in shipping dimension SVG

* Add changelog entry
2023-05-05 09:15:35 -07:00
Joshua T Flowers 14ed88cd1f
Prevent double debouncing of iframe editor callback (#38087)
* Prevent double debouncing of iframe editor callback

* Add changelog entry
2023-05-05 09:15:07 -07:00
Nathan Silveira 95ca53675f
Fix TreeControl bugs in single selection mode (#38079)
* Add onFirstTreeItemBack hook

* Fix item not being selected on single mode when it had children

* Remove if statement that prevented items with children from being selected in single mode

* Add storybook example with onFirstTreeItemBack

* Remove onFirstTreeItemBack

* Replace radio button with checkbox

* Update changelog
2023-05-05 09:21:32 -03:00
Joshua T Flowers 4deb5b3f84
Remove drag and drop handle in product blocks editor (#38127)
* Remove drag and drop handle in product blocks editor

* Add changelog entry
2023-05-05 04:55:57 -03:00
louwie17 ce07458752
Update disable drag and drop within images block (#38045)
* Allow disabling of drag and drop within ImageGallery component

* Add changelogs

* Fix onReplace logic for images block

* Fixing linting error

---------

Co-authored-by: Joel <dygerati@gmail.com>
2023-05-05 04:45:26 -03:00
Chi-Hsuan Huang ef7bf6a28b
Update Payfast logo and title (#38090)
* Update Payfast title

* Update Payfast logo

* Add changelog

* Update Payfast 72x72 logo
2023-05-05 15:42:47 +08:00
Joel Thiessen 4729ea054b
Adding basic ordering to tab slot fill (#38081) 2023-05-04 10:57:19 -07:00
Chi-Hsuan Huang ea58ae339a
Add core profiler "Welcome to Woo!" page (#37952)
* Add core profiler - welcome to woo page

* Add changelog

* Update checkbox styles

* Update copies

* Add test

* Add enable prop to window.wcTracks type

* Add tracks

* Add explat changelog

* Fix import

* Update default tracking value

* Update copies

* Fix test

* using invoked promise instead of useState

- take advantage of xstate's built ins for side effects instead of  useEffect/hooks
- discovered that error result wasn't really handled in original useEffect
- use text labels instead of inline functions so that we can decouple the implementation from the machine model
- todo: can move the invoked function out elsewhere and also tests if needed (not necessary here because it's a simple call)

* use actions.choose instead of branching inside action 

- https://stately.ai/docs/xstate/transitions-and-choices/guarded-actions#the-choose-action
- makes it so that the machine model is serializeable
- todo: in the distant future i wonder if it might be tidier to have tracks be its own actor that just receives the same events that this machine does, that way it's just standalone instead of mixing up tracks with the implementation

* use dispatch instead of useDispatch

- decouples the implementation of the handler from the react component
- makes the handler testable on its own if needed
- makes the state machine testable without relying on external dependencies

* decoupled remaining function calls

* Fix lint error

* Fix style lint

* address xstate console warnings

- .withConfig() is a function call that returns a new object every invocation so we need to wrap it in useMemo to keep it stable

* Add optInDataSharing is false test

* Fix lint

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-05-03 15:54:28 +08:00
Joel Thiessen 3679f019bb
Adding attributes block to product block editor. (#38051) 2023-05-02 21:13:48 -07:00
Joshua T Flowers 6b141fa2c6
Add fixed toolbar to modal editor (#38031) 2023-05-02 08:45:50 -07:00
Joel Thiessen 16b9191c0d
Adding shipping class option and modal (#37968) 2023-05-01 10:04:54 -07:00
Joshua T Flowers 8827d3fb9a
Add block inspector to modal iframe editor (#38011)
* Add block inspector to modal iframe editor

* Add changelog entry
2023-05-01 10:04:25 -07:00
Joel Thiessen d014e80a20
Fixing more menu width in product block editor header (#38053)
* Fixing more menu styles

* Adding changelog
2023-05-01 06:55:31 -03:00
Nathan Silveira 8fc6972161
Fix N/A displayed on re-enabling toggles for "Stats overview" panel after refreshing "Woocommerce > Home" page. (#38030)
* Fix N/A on stats overview on WooCommerce > Home

* Add changelogs

* Fix wrongfully added type definition
2023-04-28 16:15:10 -03:00
Maikel David Pérez Gómez a35f2c3d5d
Update List price Pricing link on the general tab to navigate to the Pricing tab (#37961)
* Update List price Pricing link on the general tab to navigate to the Pricing tab

* Add changelog files

* Simplify the event name to product_pricing_help_click
2023-04-28 11:33:56 -04:00
Maikel David Pérez Gómez 1514333162
Remove AUTO-DRAFT in product name field on create new product page (#37982)
* Remove AUTO-DRAFT in product name field on create new product page #37930

* Add changelog file

* Remove non needed useEffect import
2023-04-28 11:33:28 -04:00
Maikel David Pérez Gómez f3959d0700
Summary field remove 'inline image' and 'keyboard input' options (#38012)
* Summary field remove 'inline image' and 'keyboard input' options

* Add changelog file
2023-04-28 10:51:22 -04:00
Joshua T Flowers bf14b26846
Add modal editor for use in product editor (#37937)
* Add modal editor for use in product editor

* Allow title of modal to be modified by consumer

* Add changelog entry

* Remove errant style imports after rebase

* Handle PR feedback
2023-04-28 07:48:36 -07:00
louwie17 452fa75038
Remove strange block editor highlighting within product block editor (#38000)
* Remove or hide block highlighting within product block editor

* Add changelog
2023-04-28 08:31:14 -03:00
Moon 8f02ecbeba
Migrate Ellipsis Menu component to TS (#36405)
* Migrate ellipsis-menu to TS

* Add changelog

* Remove React.VFC -- it is deprecated in React 18

* Make renderContent props optional

* Allow KeyboardEvent

* Make onToggle optional

* Allow undefined for backward compatibility

* Remove unnecessary @ts-expect-error -- ellipsis menu is now in TS

* Make onToggle required

* Make event e required - backward compatibility

* Use toggleHandlerOverride to make it more readable

* Remove React.VFC -- it is deprecated in React 18
2023-04-27 17:00:35 -07:00
Joshua T Flowers 64dbeba260
Add ContentPreview component for previewing block content (#37990)
* Allow custom tags and attributes in sanitize html util

* Add ContentPreview component for previewing block content

* Add styling around preview area

* Add changelog entry

* Only show content preview area when content exists
2023-04-26 19:29:50 -07:00
Moon 4f484f144e
Migrate Rating component to TS (#36301)
* Convert rating to ts

* Add changelog

* Add gridicons type

* Fix style

* Change ReactElement to ReactNode

* Remove propTypes

* Remove React.VFC -- it is deprecated in React 18
2023-04-26 15:21:16 -07:00
Matt Sherman e81f8ae88f
Update AdvancedFilters to use createInterpolateElement instead of interpolateComponents (#37967) 2023-04-26 06:58:14 -04:00
psealock b726c62be5 Automated change: Prep @woocommerce/extend-cart-checkout-block for release. 2023-04-26 00:53:18 +00:00
Joel Thiessen 6f7eeeaf49
Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
Joshua T Flowers 48af8c1333
Add the product description block and callbacks for the IframeEditor (#37852)
* Add onChange and onClose callbacks to IframeEditor

* Add description block

* Add initial blocks to iframe editor

* Update button text when description already exists

* Remove unused editorStyle block property

* Debounce onChange callback

* Add changelog entry

* Handle PR feedback

* Fix up export after rebase
2023-04-25 11:05:25 -07:00
Sam Seay 7cbc3811d8
Update monorepo to pnpm 8 and Node to 16.14 (#37915) 2023-04-25 18:49:30 +12:00
Maikel David Pérez Gómez fb7e68a83d
Track stock quantity for this product should be disabled when Enable stock management within settings is disabled, and enabled otherwise (#37957)
* Track stock quantity for this product should be disabled when Enable stock management within settings is disabled, and enabled otherwise.

* Add changelog files
2023-04-24 13:42:45 -04:00
Joel Thiessen 3c5a96712a
Adding Stock status to inventory tab and toggle block (#37906) 2023-04-21 14:49:34 -07:00
Maikel David Pérez Gómez 1f2d735d0c
Update current block names to reflect use case and avoid conflicts (#37851)
* Change woocommerce/product-name to woocommerce/product-name-field

* Change woocommerce/product-summary to woocommerce/product-summary-field

* Change woocommerce/product-pricing to woocommerce/product-pricing-field

* Change woocommerce/product-radio to woocommerce/product-radio-field

* Change woocommerce/product-images to woocommerce/product-images-field

* Fix product name block invalid class name

* Move woocommerce/product-section to blocks folder

* Move woocommerce/product-tab to blocks folder

* Move woocommerce/product-collapsible to blocks folder

* Organize block registration, imports and styles

* Add changelog files

* Change woocommerce/product-category to woocommerce/product-category-field

* Change woocommerce/product-checkbox to woocommerce/product-checkbox-field

* Change woocommerce/product-inventory-email to woocommerce/product-inventory-email-field

* Change woocommerce/product-sku to woocommerce/product-sku-field

* Register woocommerce/product-schedule-sale-fields in server side

* Register woocommerce/product-track-inventory-fields in server side

* Fix invalid reference in tabs tests
2023-04-21 16:26:53 -04:00
Joel Thiessen 87da63eb3a
Moving section icon svgs to assets folder and loading by URL (#37869) 2023-04-21 11:53:06 -07:00
Joshua T Flowers 343d4d9fdf
Record tracks on product edit/update (#37770)
* Add auto-draft to product statuses

* Record event on draft save

* Record event on product update

* Add changelog entry

* Add data changelog

* Refactor to use shared function for recording product events

* Handle PR feedback
2023-04-21 09:51:59 -07:00
Joshua T Flowers 1cc5d0dd15
Disable toolbars in all relevant product editor blocks (#37912)
* Disable toolbars in all relevant product editor blocks

* Add changelog entry
2023-04-21 09:51:40 -07:00
louwie17 e88152ff3c
Add category field block (#37295)
* Add initial category block

* Add changelogs

* Add label to font family for block editor and fix template

* Fix rebase conflict and add content role

* Some styling changes for the category field

* Move category block to blocks folder and fix merge conflict.

* Address some styling issues, and update keywords

* Fix css lint error
2023-04-21 05:10:35 -03:00
Jarda Snajdr 8b8cc93f85
Rewrite the useOptionsHydration hook to not dispatch inside useSelect (#37882)
* Rewrite the useOptionsHydration hook to not dispatch inside useSelect

* Fix types of Options store to allow startResolution etc actions

* fixed tests and added changelog

---------

Co-authored-by: rjchow <me@rjchow.com>
2023-04-21 13:58:27 +08:00
Moon 4a52d6b82c
Rewrite withNavigationHydration to work with Gutenberg 15.5+ (#37901)
* Refactor withNavigationHydration to not dispatch inside useSelect

* Add changelog

* Remove unused import
2023-04-20 20:09:10 -07:00
Moon 83981c61b2
Rewrite the withPluginsHydration hook to not dispatch inside useSelect (#37896)
* Fix types to allow startResolutions etc actions

* Rewrite the usePluginsHydration hook to not dispatch inside useSelect

* Add changelog

* Remove unused import
2023-04-20 20:09:00 -07:00
Moon 85a71f8cee
Rewrite the withCurrentUserHydration hook to not dispatch inside useSelect (#37908)
* Rewrite withCurrentUserHydration hook to not dispatch inside useSelect

* Remove unused import

* Update comment
2023-04-20 20:08:48 -07:00
Joel Thiessen 7023a80937
Adding global product block editor styles (#37805)
* Removing unecessary class

* Organizing editor styles

* Tweaking global fonts

* Correcting section spacing and adding divider

* Adding header styles

* Refactoring block editor styles

* Tweaks to spacing

* Adding changelogs

* Removing uneeded styles

* Fixing colors and link decoration

* Unifying error styles
2023-04-20 05:21:23 -03:00
Maikel David Pérez Gómez 33798acd65
Add a11y support to collapsible content component (#37760)
* Improve a11y support to collapsible content component

* Add changelog file

* Change id pattern to
2023-04-19 18:04:05 -04:00
louwie17 b42da82e50
Update/34885 category field in product editor (#36869)
* Add initial custom meta box for product categories

* Make use of TreeSelectControl

* Update classnames

* Display selected items and sync with most used tab

* Always show placeholder and remove checklist container

* Reactify category metabox tabs

* Add create new category logic

* Remove unused markup

* Fix saving of empty category list

* Add callback when input is cleared as well

* Some small cleanup and refactoring.

* Add changelog

* Fix tree creation and style enqueue

* Auto fix lint errors

* Fix linting errors

* Fix css lint errors

* Add 100 limit, and address some PR feedback

* Fix some styling and warnings

* Remove unused code

* Address PR feedback

* Fix lint error

* Fix lint errors

* Address PR feedback

* Fix lint error

* Minor fixes and add tracking

* Add debounce

* Fix lint error

* Allow custom min filter amount and fix menu not showing after escaping input

* Allow single item to be cleared out of select control

* Fix bug where typed values did not show up

* Fix some styling issues

* Allow parents to be individually selected

* Address PR feedback and add error message

* Add changelogs

* Fix saving issue

* Add client side sorting and stop clearing field upon selection

* Update changelog

* Create feature flag for async product categories dropdown

* Fix lint errors

* Fix linting
2023-04-19 04:28:18 -03:00
Joshua T Flowers ebe879d5dd
Add IframeEditor component to product editor (#37570)
* Add initial modal editor

* Add in iframe editor styles

* Convert components to TS

* Sync dependencies

* Remove unused components and props

* Set min height to avoid jumpiness during resize

* Fix up private APIs dependency version

* Update ModalEditor name to IframeEditor

* Add changelog entry

* Remove IframeEditor from details block

* Update frozen lock file

* Add support for missing gutenberg assets function

* Fix lock file after rebase

* Use default editor settings when none are provided

* Remove currently unused editor styles

* Remove unused private apis package

* Fix php lint errors

* Remove unused import

* Pin keycodes version

* Remove another unused import from testing

* Add WC changelog entry
2023-04-18 10:52:28 -07:00
Maikel David Pérez Gómez 41545ec459
Invert the useValidation hook behavior to return an error instead of a boolean value (#37695)
* Invert the useValidation hook behavior to return an error instead of a boolean value

* Fix validation logic in schedule-sale and track-inventory blocks

* Add changelog file

* Add validations to product name block

* Fix shipping dimensions validations

* Fix shipping fee validations

* Add i18n error message example to readme.md

* Cover semantic issues
2023-04-17 23:54:15 -04:00
Joshua T Flowers ffcbaf5b3a
Move tabs to header and adjust title position (#37696)
* Move product editor tabs to header

* Update header styles to place tabs on bottom

* Center header title and adjust font size

* Style title and columns on mobile

* Add changelog entry

* Truncate longer titles

* Hide title on smaller viewports

* Truncate via css width instead of character count
2023-04-17 15:39:09 -07:00
Chi-Hsuan Huang a953904d84
Remove theme step from onboarding wizard (#37671)
* Remove theme step from onboarding wizard

* Remove theme step from e2e tests

* Deprecated "theme" prop from profileItem type

* Add changelog

* Remove theme product from dashboard

* Update packages/js/data/src/onboarding/types.ts

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

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2023-04-17 11:59:02 +08:00
Maikel David Pérez Gómez 42cc482ebc
Create shipping fee field block and initial shipping section (#37642)
* Setting up the Fees & dimensions section

* Create product shipping fee block

* Register product shipping fee block

* Add changelog files

* Fix php linter errors

* Add reusable radio field and move the radio block to the blocks folder

* Remove manually set block className because is autogenerated base on the block name
2023-04-14 22:44:28 -04:00
Maikel David Pérez Gómez 3f23301f3f
Create product shipping dimensions block (#37683)
* Move ShippingDimensionsImage component to @woocommerce/product-editor package

* Create woocommerce/product-shipping-dimensions-fields block

* Register woocommerce/product-shipping-dimensions-fields block

* Add changelog files

* Fix php linter error

* Change unused attr name to __contentEditable to better indicate the porpose

* Remove manually set block className because is autogenerated base on the block name
2023-04-14 14:08:57 -04:00
Joel Thiessen 83458a1dee
Adding inventory advanced section with radio and text fields (#37646) 2023-04-14 08:39:53 -07:00
louwie17 6e2c11f556
Select tree dropdown menu SlotFill support (#37574)
* Add initial select tree popover and modal story

* Add slot fill popover support

* Add changelog

* Remove unneeded use of combobox ref in select-tree

* Fix lint errors

* Address PR feedback and fix issue with parent select control

* Add changelog
2023-04-14 04:22:59 -03:00
Joel Thiessen 247787484a
Add inventory section and SKU blocks (#37623) 2023-04-13 15:33:25 -07:00
Joel Thiessen 038b97a318
Add edit product link modal under name field (#37612) 2023-04-13 08:56:47 -07:00
Joel Thiessen fb12ad20fd
Replacing rest_namespace modification with middleware due to blocks issues (#37621) 2023-04-13 08:45:50 -07:00
Ilyas Foo a02d0a8117
Fix invalid return callback ref warning (#37655)
* Fix invalid return in callback ref and add tests

* Changelog
2023-04-13 23:16:45 +08:00
Maikel David Pérez Gómez f5591b7c9a
Add track inventory field to inventory section (#37585) 2023-04-11 11:52:20 -07:00
Maikel David Pérez Gómez 8354ae2792
Create schedule sale pricing block (#37567)
* Create schedule sale pricing block

* Add auto show/hide and clean fields depending on the initial values

* Add validations to From and To dates fields

* Add changelog files

* Align block with the figma design

* Revert linter replacement in the editor global style.scss file

* Fix some words typos

* Move and rename schedule sale block to the blocks folder

* Load datetime format from @wordpress/date instead of using the woo options datastore

* Remove the min difference using by moment to compare dates from 'minute' to undefined

* Make sure the dates are normalized for comparison
2023-04-11 10:53:37 -04:00
Nathan Silveira fa4dd90401
Change link all variations label (#37632) 2023-04-11 11:44:27 -03:00
Darren Ethier 50593c5257
Fix issue that breaks the WooCommerce Home Page when Gutenberg 15.5 is active (#37641)
Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
2023-04-11 15:27:38 +08:00
Joshua T Flowers 7734027b4a
Add product radio block and tax class to product blocks editor (#37529)
* Add product radio block

* Wrap tax class radio in collapsible block

* Add link to description and sanitize HTML

* Add changelog entry

* Fix up php lint errors

* Add changelog entry

* Fix linting errors

* Remove unused import
2023-04-05 10:13:05 -07:00
Maikel David Pérez Gómez bb22fd5864
Prevent click event when buttons are aria-disabled (#37577)
* Prevent click event when buttons are aria-disabled

* Add changelog file
2023-04-05 12:55:22 -04:00
Maikel David Pérez Gómez f7572b4361
Move the Save draft and Preview buttons to the product editor header (#37461)
* Add preview button to the product editor header

* Publish the product on add or on save

* Add save draft button

* Save product changes before previewing it

* Add notice messages

* Fix linter errors

* Force the store page to be openned in a new tab after publishing the product

* Enable publish button when the status is not publish

* Add changelog files

* Fix some comment typos

* Address comment suggestions

* Move preview logic to its own component

* Move save draft logic to its own component

* Move publish logic to its own component
2023-04-04 11:30:39 -04:00
Nathan Silveira 6291d10112
Use SelectTree component in Category field (#37479)
* Migrate category field to TreeSelect

* Rename and refactor some props due to changes in SelectTree that were introduced afterwards

* add Changelog

* Rename type to a better name

* Add tests to select-tree and remove tests from category-field

* Restore ts change that broke build

* Run linter

* Fix broken tests

* Update test

* Import from wordpress instead of react
2023-04-04 09:28:19 -03:00
Ilyas Foo 502279dff1
Remove inbox notes exceeding characters warning (#37392)
* Removed inbox notes warning

* Changelog

* Removed dompurify dependency from data package

* Remove dompurify types
2023-04-03 19:13:36 +08:00
Maikel David Pérez Gómez 6df1cef307
Add Sale price and list price blocks to pricing tab with pricing section (#37513)
* Add pricing section to the pricing tab

* Add changelog file

* Fix php linter errors
2023-03-31 14:47:31 -03:00
Joshua T Flowers 85080f642b
Add block related assets entry points to product editor build (#37318)
* Add editorStyle properties to blocks

* Rename style.scss files to editor.scss

* Get block entry points for block related assets

* Copy block assets to core assets build folder

* Remove unusable dependency

* Add changelog entries

* Fix up RTL style builds for block assets

* Update copy-webpack-plugin dependency and lock file

* Fix up lock file after rebase

* Fix order of webpack rtl stylesheet builds to prevent additional stylsheets

* Fix up lock file after rebase

* Fix tsconfig
2023-03-31 10:36:40 -07:00
Joshua T Flowers 681391a50a
Add product images block to product editor (#37455)
* Add images block to the product editor

* Allow html in section block descriptions

* Add changelog entry

* Add client changelog entry

* Remove SVG related changes

* Fix up lock file after rebase

* Remove unused import

* Fix up php lint errors

* Move sanitize function to utils folder
2023-03-30 11:22:07 -07:00
Gan Eng Chin b2629c03db
Make Multichannel Marketing the default new UI for Marketing page (#37430) 2023-03-29 21:09:23 +08:00
Gan Eng Chin 34bd123448
Remove unused button-style mixins. 2023-03-29 19:06:40 +08:00
Chi-Hsuan Huang 19a119f0a8
Upstream changes from experimental-select-control back to @woocommerce/components (#36521)
* Add scrollIntoViewOnOpen and position props to menu

* Add ability to customize active item style

* Add menu toggle button

* Add changelog

* Fix changelog

* Rename toggle button classname

* Change default menu position

* Update toggle button story

* Add default value to getToggleButtonProps
2023-03-29 17:18:43 +08:00
Niels Lange 96a1e9cd7b
Update extend-cart-checkout-block dependency (#37191) 2023-03-29 09:39:46 +07:00
Joshua T Flowers 49cde4cad6
Content lock all blocks in the product editor (#37382)
* Lock all blocks in the product editor to content only

* Add changelog entry

* Add content role to summary field to allow editing

* Remove unused BlockControls
2023-03-28 15:18:00 -07:00
Christopher Allford 2f4f0bea54
Added Build File Caching (#37459)
Since these files can impact the build, we need to make sure to use
them as part of the cache key.
2023-03-28 12:48:20 -07:00
Matt Sherman 30ea6cfc71
Show spotlight when switching to variable product type (#37413)
* Show variable product tour
* Only show tour when product type is changed to variable
* Only show tour if it hasn't been shown before
* Add variable_product_tour_shown to UserPreferences type
* Store whether tour has been shown in user preferences
* Record Tracks events
* Add docblock for woocommerce_admin_get_user_data_fields filter
* Add test for tour
2023-03-28 13:49:40 -04:00
Matt Sherman eab7750208
Move product-editor CES-related components and utilities (#37131)
* Update package.json and lock file
* Move ProductMVPFeedbackModal to @woocommerce/product-editor
* Move ProductMVPFeedbackModalContainer to @woocommerce/product-editor
* Move ProductMVPCESFooter and useProductMVPCESFooter to @woocommerce/product-editor
* FIx mock of __experimentalUseProductMVPCESFooter in test
2023-03-28 13:38:08 -04:00
louwie17 bc42b853d8
Update product editor interpolate components (#37453)
* Remove use cases of `interpolateComponents`

* Remove from package json

* Add changelog
2023-03-28 04:15:17 -03:00
Niels Lange 9eeda1d853
Move .wp-env.json.mustache to root folder 2023-03-28 12:05:58 +07:00
Maikel David Pérez Gómez a5b104eaed
Add icon support to product section block (#37340)
* Add block icon component

* Use the block icon component within the section block

* Add changelog file

* Fix rebase conflicts

* Remove icon configuration from the client side

* Change the BlockIcon component to get the icon from the attributes first and then from the metadata

* Expose the BlockIcon to be used outside of the package

* Add the BlockIcon documentation

* Configure the block to support the new icon via attributes

* Set the icon to the block section in the server template definition

* Revert back index.tsx -> index.ts in the section block

* Fix php linter errors

* Add changelog file

* Fix php linter error

* Return null instead of a Fragment
2023-03-27 12:52:03 -03:00
Matt Sherman de111c1edb
Update TourKit README to correct primaryButton example and formatting (#37427) 2023-03-27 07:09:39 -04:00
Matt Sherman a77e4abffe
Emit error on webpack build when invalid export name used in import for JS (#37195) 2023-03-26 21:42:33 -04:00
Christopher Allford a8fff3175c
Fix TypeScript Incremental Build Regression (#37432) 2023-03-24 12:07:49 -07:00
Nathan Silveira 1f698d2583
Create experimental SelectTree component (#37319)
* Create a new experimental component TreeSelect
Add functionality to TreeControl to support additional scenarios

* Fix a bug where the shouldNotRecursivelySelect was not passed to Trees inside Tree Items

* Do not collapse nodes inside useEffect if they are already expanded

* Add storybook example for SelectTreeControl

* Move component to its own directory

* Remove wrong comment

* Fix CSS import path

* Remove getFilteredItems from select-tree

* Stop using getFilteredItems inside select tree
Create new shouldShowCreateButton prop to allow receiving only filtered items inside component
Remove support to show custom getItemLabel and getItemValue

* Change interface

* Rename back Item type names

* Rename back value

* Fix lint error and remove passing ref to treeProps

* Make id mandatory in SelectTree

* Refactor

* Improve selector to focus on create button
2023-03-24 14:49:45 -03:00
Christopher Allford 67cde87fd1
Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
Christopher Allford 3d614cd862
Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00
Joshua T Flowers 562749b60a
Prevent duplicate registration of core blocks in client (#37350)
* Prevent duplicate registration of core blocks

* Add components changelog entry
2023-03-22 16:56:35 -07:00
Joel Thiessen 4ae467af9e
Adding more menu with items using slot fill (#37255)
* Refactored, adding slot fill, basic working via common components

* Pinning plugins dep

* More menu style tweaks

* Fixing merge issues

* Adding product header item slotfill to support more menu modal

* Fixing moved imports

* Adding changelogs

* Adding hover state for more menu toggle btn

* Fixing typo

* Refactoring to use WooHeaderItem instead of adding new slot-fill

* Removing unneeded fragment

* Adding admin layout changelog

* PR feedback

* Fix up lock file after rebase

---------

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2023-03-22 07:30:06 -03:00
Joel Thiessen b8416d7948
Replacing multiple components on the product page with a single hook. (#37283)
* Replacing multiple componments on the product page with a single hook.

* Adding changelog

* Removed the conditional hook logic, because of React rule - Don’t call Hooks inside loops, conditions, or nested functions.

* Use promise for receiving entity, and reload template on product change

* Add changelog

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-22 04:48:55 -03:00
Matt Sherman b27f6023f8
Move remaining CES-related components to @woocommerce/customer-effort-score (#37316)
* Add @woocommerce/tracks to dev dependencies
* Move remaining CES-related components to @woocommerce/customer-effort-score
* Update imports in woocommerce/client/admin
2023-03-21 11:58:35 -04:00
Maikel David Pérez Gómez 62ca7a266b
Add the summary field to the product form (#37302)
* Add summary block

* Add changelog files

* Add text alignment

* Add RTL and type definitions

* Add justify text alignment

* Fix rebasing errors
2023-03-21 12:34:24 -03:00
Maikel David Pérez Gómez b9df0e09f0
Create a helper hook for field validation (#37196)
* Add custom hook to validate product fields within blocks

* Add changelog file

* Add unit tests

* Fix non working tests

* Fix linter errors

* Add changelog file

* Fix async validation rejection

* Solve conflicts after rebasing

* Revert false negative lint errors

* Move the hook to its own folder and add the readme.md file
2023-03-20 23:12:09 -03:00
Joel Thiessen edbe36d7ad
Adding collapsible content block with flexible rendering (#37305)
* Adding collapsible content block with flexible rendering

* Adding changelogs

* Move content inside display state to avoid backwards compat issues

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-20 18:18:44 -07:00
Chi-Hsuan Huang 7b10baff00
Add tracks for plugin installation and activation (#37261)
* Add @woocommerce/tracks to @woocommerce/data dependencies

* Add tracks for plugin actions and handle plugin error properly

* Add changelog

* Add doc

* Update doc
2023-03-20 10:38:30 +08:00
louwie17 345ad58919
Add product pricing block (#37211)
* Adding initial pricing block

* Have price block render in form

* Make sure price is loaded correctly and fix template rendering

* Make pricing block abstract and add list and sale price to template

* Add changelogs

* Revert changes in wc/data package

* Fix lint issues

* Fix type error

* Add styling

* Fix styling lint issues

* Revert config change missed in rebase

* Make use of base control help text for field info

* Allow additional callbacks for onFocus and onKeyUp
2023-03-17 14:03:10 -03:00
Maikel David Pérez Gómez e370f25c0c
Add a product header component to the blocks interface (#37152)
* Add button and saving logic

* Add comment suggestions

* Add changelog files

* Add comment suggestions

* Set header title to product name if the name field is dirty otherwise the default title value

* Navigate to EditProductPage after creating the product succesfully

* Add get-header-title util and expose edited product name from useSelect
2023-03-17 13:21:15 -03:00
Joshua T Flowers 5ed070d78a
Add tests around product block editor tabs (#37225)
* Add tests around tabs

* Add changelog entry

* Fix up frozen lock file

* Fix up frozen lock file

* Fix up lock file after rebase
2023-03-16 14:46:38 -07:00