Commit Graph

1102 Commits

Author SHA1 Message Date
Nathan Silveira 581601f545
Add single selection mode to SelectTree (#38140)
* Add single mode for SelectTree

* Add storybook example for single selection in SelectTree

* Add changelog

* Improve type definitions and refactor code

* Add onRemove to story
2023-05-11 13:42:20 -03:00
Joshua T Flowers a587612934
Add editor styles to product editor and iframe editor (#38168)
* Add editor styles to product editor and iframe editor

* Make section title css selectors more specific

* Add changelog entry

* Remove additional commented component

* Remove unused import
2023-05-11 11:43:22 -03:00
Nathan Silveira f668ce72ac
Add tests to tracks events fired through JS (#38124)
* Add test for inbox_note_view event

* Add tracks test for Layout's page_view

* Add test to inbox_action_click

* Add tests to analytics_filter tracks event

* Add tracks event test to activity_panel_open

* Add tests to tracks event activity_panel_orders_orders_begin_fulfillment

* Add tracks tests to activity_panel_stock_update_stock

* Improve tests based on code review comments

* Mock recordEvent and recordPageView globally

* Add missing mock

* Improve inbox panel tests
2023-05-10 09:36:42 -03:00
Maikel David Pérez Gómez 227695386d
Fix spacing between pricing fields (#38146)
* Fix spacing between pricing fields

* Add changelog file

* Fix spacing between sale toggle and the next section
2023-05-09 19:13:56 -04:00
Chi-Hsuan Huang 4a237ca476
Migrate Purchase task and dashboard utils to TS (#37725)
* Fix onboarding productTypes TS define type

* Rename purchase.js -> purchase.tsx

* Rename utils.js -> utils.ts

* Migrate dashboard/util to TS

* Rename tasks fills to index.ts

* Migrate purchase task to TS

* Add changelog

* Fix types

* Update changelog
2023-05-09 11:28:57 +08:00
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