Commit Graph

1869 Commits

Author SHA1 Message Date
Chi-Hsuan Huang b471e51734
Temporarily commented out failing date package test due to the February 29th issue (#45202)
* Temporarily commented out a test due to February 29th issue

* Add changelog

* Fix lint
2024-02-29 11:23:45 +08:00
Moon 49b3e510cb
Allow JSON schema string (#45151)
* Receive JSON schema string from the constructor -- this is more flexible than accpeting a physical file

* Add changelog

* Add get_bundle_json method

* Update composer version
2024-02-27 00:34:41 -08:00
Chi-Hsuan Huang ec8bd31365
Improve webpack cache-busting version parameter by using file contents hash (#44838)
* Update webpack config to use file content hash for chunks and generate asset php for styles

* Use StyleAssetPlugin to generate style.asset.php

* Remove unneed ?ver=<version> code

* Use file hash from asset file when SCRIPT_DEBUG is off

- Use file hash to load scripts/styles ?ver=<file hash>
- Add register_style() method to WC_Admin_Assets

* Load payment method promotions in admin_enqueue_scripts

* Add changefile(s) from automation for the following project(s): @woocommerce/product-editor, woocommerce

* Add json2php

* Update doc

* Update pnpm-lock.yaml

* Fix add_print_shipping_label_script

* Add a comment to style-asset-plugin.js

* Change register_style to use WC_ADMIN_DIST_CSS_FOLDER

* Reset the outputNormal object to avoid duplicate files

* Fix type error

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-27 08:07:53 +00:00
Fernando Marichal 3d3f6d64b8
Add `Always show pre-publish checks` checkbox (#44595)
* Add show-prepublish-checks-section

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/prepublish-panel.tsx

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Add show-prepublish-checks hook

* Refactor prepublish panel button visiblity

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

# Conflicts:
#	packages/js/product-editor/src/components/header/header.tsx

* Fix footer styles

* Add changelogs

* Add content div

* Fix styles

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Rename recorded action

* Fix styles

* Hide panel after unchecking option

* Improve resolving

* Add new E2E test for merchant transforming classic cart to cart block (#44926)

* Update the monorepo-utils gitignore to only include index.js and its license file. (#44932)

* Fixed `@woocommerce/plugin-woocommerce` Watch (#44930)

By default `nodemon` only watches for JS file changes. This expands the
config so that it watch the file extensions that are actually
produced by builds.

* Update core package.json to remove nightly ci config (#45096)

* Update core package.json to remove nightly ci config

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>

* Update blocks build message (#44811)

* Update blocks build message

* Add changefile(s) from automation for the following project(s): woocommerce

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* Update plugins/woocommerce/src/Blocks/Domain/Bootstrap.php

Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>

* [CYS on Core] Update the themes list on the intro screen (#44822)

* Update themes list on core. Update the themes data and remove hardcoded reference to free themes.

* Update styles for the Free, Paid and active cards.

* Add the color palletes to TT4 theme.

* Update the references for default and core themes.

* Add changefile(s) from automation for the following project(s): woocommerce

* Update the link to TT4 theme

* Update default value for price.

---------

Co-authored-by: github-actions <github-actions@github.com>

---------

Co-authored-by: Veljko V <veljano@yahoo.com>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Roy Ho <roykho77@gmail.com>
Co-authored-by: Patricia Hillebrandt <patriciahillebrandt@gmail.com>
2024-02-26 07:38:48 -04:00
Maikel Perez 9498687d2c
Add menu item to publish button to schedule product updates (#44783)
* Add support for other Button Props to the ButtonWithDropdownMenu component

* Refactor the PublishButton to be used in the PrepublishPanel and the Header at the same time

* Prevent button behavior when it's visually disabled

* Improve date timezone calculation in the Schedule Section component

* Revert status to publish if it was future and the date is not in the future

* Get the product status from the edited product

* Create SchedulePublishModal component

* Integrate SchedulePublishModal component

* Change the edit schedule menu item style

* Fix date time formating

* Fix date time conversion across different timezones

* Update ScheduleSection to use useProductScheduled hook

* Add changelog file

* Fix linter error

* Hide the scheduling messages behind the product-pre-publish-modal feature flag

* Validate product before trying to schedule it

* Fix schedule section publish error
2024-02-23 10:14:50 -03:00
louwie17 ddbbccf5a3
Fix download buttons in downloads section (#44816)
* Remove use of subsection actions and fix add support for subsection and section in SectionActions

* Add changelog

* Make sure subsection description block will still work.
2024-02-20 14:35:27 -04:00
Nathan Silveira ff23d1ed21
Prepare @woocommerce/product-editor for release 1.4.0 (#44817)
Prepare for release 1.4.0
2024-02-20 18:33:11 +00:00
Damián Suárez 3b4cb31d4e
[Product Block Editor]: do not include current product in the suggested products list (#44815)
* exclude current product from suggested list

* changelog
2024-02-20 14:30:01 -04:00
Nathan Silveira 9fa9431534
Export Notice component in @woocommerce/product-editor (#44812) 2024-02-20 15:01:38 -03:00
Moon 0bc6c37aa6
Add JSON schema files for remote spec validation (#44484)
* Add build scripts

* add schemas

* Add more schemas

* Update readme

* Add wc-pay-promotions schema

* Add composer version

* Update pnpm-lock.yaml

* Add changelog

* Fix markdown lint errors

* Fix markdown lint errors

* Add RemoteSpecValidator

* Update README

* Add fixture tests

* Add bundle names

* Remove Tests\\ from namespace

* Remove version from package.json

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

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

* Update packages/php/remote-specs-validation/src/RemoteSpecValidator.php

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

* Update packages/php/remote-specs-validation/tests/RemoteSpecValidatorTest.php

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

* Update packages/php/remote-specs-validation/bin/build

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

* Update packages/php/remote-specs-validation/README.md

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

* Update lock file

* Fix markdown lint errors

* Revert package.json

* Update composer

* Use jetpack changelogger 3.3.0

* Update lock file with php 7.4

---------

Co-authored-by: Ilyas Foo <foo.ilyas@gmail.com>
2024-02-16 13:31:21 -08:00
Fernando Marichal 587ba79350
Modify pre-publish texts after scheduling product (#44652)
* Modify prepublish texts after scheduling product

* Add changelog
2024-02-16 13:06:05 -03:00
Fernando Marichal cb967f6dfd
Change Visibility section label when a password is set (#44624)
* Change visibility section label

* Add changelog

* Fix changelog
2024-02-16 08:54:37 -03:00
Alexandre Lara 452c522b95
[DOC] Resolve incorrect branch references in Gutenberg links (#44566)
* Fix Gutenberg links in the docs pointing to the wrong branch

* Add changefile(s) from automation for the following project(s): @woocommerce/notices, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/components, woocommerce-blocks, woocommerce-beta-tester, woo-ai

* Fix markdown lint errors

* Fix wrong link in the docs

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-02-15 14:13:28 -03:00
Fernando Marichal f09bc85875
Fix pre-publish modal styles (#44562)
* Fix pre-publish modal styles

* Improve styles

* Add changelog

* Add vars to styles

# Conflicts:
#	packages/js/product-editor/src/components/prepublish-panel/style.scss

* Fix sidebar styles

* Add changelog

* add overflow auto

* Fix quotes
2024-02-15 09:36:59 -03:00
RJ 141c2e4399
add/explat experiment name validation (#44535) 2024-02-15 12:35:23 +08:00
Maikel Perez 5af88543eb
Add the collapsible Schedule section (#44563)
* Create schedule section within the pre-publish panel component

* Add publish date time picket to the schedule section

* Enhance schedule section title to show the selected date

* Change the text of the publish button to schedule once the product is scheduled

* Add changelog file

* Fix linter errors

* Set schedule text in pre publish button too

* Fix timezone offset from getSiteSettingsTimezoneAbbreviation when the onboarding wizard is skipped
2024-02-14 13:57:53 -03:00
Matt Sherman d279466eb3
[Product Editor] Fix blank editor flash when loading product (#43840)
* EditorLoadingContext

* Use EditorLoadingContext

* Remove fallbacks

* Make sure metadata exists before using it

* Add header loading state

* Do not return skeleton

* Use EditorLoadingContext

* Update editor loading state

* Remove ProductPageSkeleton

* Remove unused import

* Remove unused import

* Handle undefined variationId and parentId in VariationSwitcherFooter

* Remove ProductPageSkeleton

* Include productId in determination of whether editor is loading

* Handle variation loading

* Fix rebase merge conflict mistakes

* Fix layout margins

* Show welcome tour and feedback bar after editor has loaded

* Changelogs

* Make loading context experimental
2024-02-14 09:57:17 -05:00
Matt Sherman a619aba5ee
Product Editor: load translations (#44520)
* Clarify when the custom message is used in useConfirmUnsavedChanges

* Changelog

* Load translations for wc-navigation and wc-product-editor scripts

* Changelog
2024-02-13 15:38:04 -05:00
Fernando Marichal 75791b2aff
Add visibility section to pre-publish panel (#44434)
* Add visibility-section

* Fix generic checkbox

* Move visibility-section

* Add isPasswordRequired to store

* Change password checked

* Add tracks events

* Fix generic checkbox

* Add changelog

* Create reequire-password component

* Create CatalogVisibility component

* Use CatalogVisibility component

* Add changelog

* Fix lint

* Remove requirePassword from store

* Add useEffect to update checkbox

* Remove object spread from state

* Remove empty line

* Fix useEffect

* Refactor if in useEffect

* Refactor catalog-visibility

* Modify useEffect

* Remove not used import
2024-02-13 10:09:06 -03:00
Fernando Marichal dd64e2724a
Refactor section and subsection blocks (#44502)
* Add section-header component

* Use section-header and remove inventory-email scss

* Add changelog

* Rename file type
2024-02-09 15:47:02 -03:00
Maikel Perez f68467ff96
Filtering product variations by attributes that are not associated to any generated variations leads to blank variations results (#44505)
* Add empty state when filtering variations by attribute terms and the response is empty

* Add changelog file

* Fix linter errors
2024-02-09 15:46:34 -03:00
Maikel Perez 0d52fdb738
Toggle Visibility doesn't seem to work always as it should in the product variations (#44508)
* Fix toggle visibility on bach update variations

* Add changelog file
2024-02-09 15:46:24 -03:00
Fernando Marichal 30f66aa94f
[Product editor block]: Rename the Add button to Publish (#44461)
* Rename Publish button

* Fix e2e tests

* Add changelog

* Add WC changelog

* Modify "Product published" copy
2024-02-09 15:19:35 -03:00
Nathan Silveira 596bf271ab
Prepare product-editor package for release 2.0 (#44507) 2024-02-09 12:45:22 -04:00
Fernando Marichal a89d2572f0
Product Editor: Subsection block (#43725)
* Add SubsectionInterface

* Replace use of add_section inside sections

* Add Subsection class

* Add subsection block component

* Add subsection-description block

* Update deprecation note

* Add changelogs

* Fix lint

* Add get_subsection_by_id

* Add tests

* Fix ProductFormTemplate lint

* Fix CustomProductFormTemplateTest lint

* fix readme

* Fix lint

* Replace add_section with add_subsection

* Fix readme

* Fix markdown file multiple headings duplication
2024-02-08 15:44:49 -03:00
Paul Sealock c6e11562ac
Remote Specs Testing package: Add new package (#44419) 2024-02-08 12:46:26 +13:00
Fernando Marichal 19a78cd176
Add pre-publish sidebar (#44331)
* Add prepublish sidebar

* Add openPrepublishSidebar to store

* Add changelog

* Rename modal and small refactor

* Add feature flag

* Move prepublish sidebar

* change import path

* Rename classes

* Fix width

* Fix styles

* Rename prepublish panel

* Rename div class

* Remove onSuccess from PublishButton

* Fix panel position

* Use actions instead of sidebar

* Add wc-admin changelog

* Move changelog

* Fix lint
2024-02-07 15:30:33 -03:00
Guilherme Pressutto 4dcc7d8bf8
Make state optional when filling address with e2e-util (#44090)
Co-authored-by: Francesco <frosso@users.noreply.github.com>
2024-02-06 09:30:53 -08:00
Matt Sherman 68247d13de
Product Editor: Export recent SlotFills as __experimental (#44285)
* Make header slotfills experimental

* Make variation quick update menu items experimental

* Changelog
2024-02-06 09:33:24 -05:00
Maikel Perez 26bcbb0417
Add an empty state to the variations table when there are no options added yet (#44163)
* Create variation empty state when no variable attributes are asigned to the product

* Add changelog file

* Remove the Add new button when a custom empty state is set

* Conditionally invalidate resolution before requesting a new variations page
2024-02-05 18:00:37 -03:00
Matt Sherman 7e7b78f943
[create-product-editor-block] Fix product editor block registration (#44194)
* Use registerProductEditorBlockType

* Changelog

* Update changelog to provide more detail
2024-02-05 15:59:39 -05:00
Damián Suárez 35b5677860
[Product Block Editor]: fix the top area for the dashboard (#44370)
* fix the padding-top for the dashboard

* changelog
2024-02-05 15:11:21 -03:00
Damián Suárez 4492698340
[Product Block Editor]: use Label component to render Textarea field block label (#44222)
* use Label to render base control label

* changelog
2024-02-02 18:57:41 -03:00
Damián Suárez 207e8de73d
[Product Block Editor]: add plain and rich text mode to the Textarea field block (#44191)
* introduce `mode` attribute

* move block props to wrapper el

* render plain text mode

* minor const name change

* changelog

* add toolbar buttons only in rich-text mode

* set rich-text mode as default
2024-02-02 16:04:01 -04:00
Damián Suárez 951e5ecce6
[Product Block Editor]: redefine the app dashboard size (#44166)
* chnages how to define the editor dashboard size

* remove onBlur stuff from summary block

* add a @todo note about dashboard padding top

* changelog
2024-02-02 15:57:28 -04:00
Damián Suárez f1236696d9
[Product Block Editor]: use Textarea block in the variation description field (#44151)
* use text-area for variation desctiption field

* changelog

* tweak // Translators string

* use var to define textarea border color

* remove optional from description label
2024-02-02 15:50:36 -04:00
Maikel Perez eaa791f7da
Hide Downloads section under Toggle for product variations (#44152)
* Create DownloadableProductTrait for common downloadable blocks creation

* Use DownloadableProductTrait in SimpleProductTemplate

* Use DownloadableProductTrait in ProductVariationTemplate

* Remeber downloadable files in product variations

* Add changelog file

* Fix php linter error

* Unlink downloads and downloadable product props so they can be managed separately

* Remove invalid margin bottom from the uploader label

* Add changelog file
2024-02-02 10:04:42 -03:00
Nathan Silveira 862383e1eb
Fix invalid value being propagated on change event for number input (#44195) 2024-02-01 12:49:12 -03:00
Maikel Perez 861cc7cc02
Add common options to the variations options empty state (#44001)
* Always show Variation options and Variations sections within the Variations tab

* Remove woocommerce/product-variations-fields block since it's not needed anymore

* Create ProductTShirt image for variation options empty state

* Add renderCustomEmptyState to the attribute control component to be able to set a not default empty state

* Render a custom empty state for variation options

* Adds defaultSearch prop to NewAttributeModal so it can be used to start searching right after the modal is shown

* Let the empty state adds an attribute that matches a given text

* Add changelog files

* Fix linter errors
2024-02-01 11:18:23 -03:00
github-actions[bot] 495bf4eeb2
Prepare Packages for Release (#44211)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2024-01-31 18:58:06 +13:00
Fernando Marichal e703b3d947
Add slotFills for header items (#43687)
* Add slotFills for header items

* Refactor plugin-header-items

* Add changelog

* Remove order prop

* Fix lint

* Change constant name

* Rename constant

* Add callback to fills

* Make icon not required

* Add fallback plugin
2024-01-30 16:58:20 -03:00
Damián Suárez 05aa24df0b
[Product Block Editor]: introduce note attribute to Label component (#44198)
* do not use createInterpolateElement

* introduce `note` to Label component

* changelog
2024-01-30 16:40:30 -03:00
Nathan Silveira e0728e6d11
Fix undefined meta_data on slow connections (#44197) 2024-01-30 18:08:08 +00:00
Damián Suárez 20fe832f8b
[Product Block Editor]: fix e2e test that happens in the text-area block (#44184)
* add components-summary-content class to rich text

* changelog
2024-01-30 12:33:52 -03:00
Nathan Silveira c1a5b60245
Add isLoading to useProductMetadata hook (#44156)
* Add isLoading to useProductMetadata hook

* Add unit test

* Rename `updateMetadata` to `update`

* Remove content from inside useSelect
2024-01-30 10:05:01 -03:00
Paul Sealock 740c5e40ae
Create-woo-extension: Update WC version (#44107)
* Update version

* Add changefile(s) from automation for the following project(s): @woocommerce/create-woo-extension

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-01-29 21:29:37 +00:00
Damián Suárez 74d0b39bb0
[Product Block Editor]: introduce TextArea field block (#44104)
* introduce TextAreaBlockEdit block

* reglister text area block

* use text-area block in the summary block

* changelog

* changelog

* fix whitespace lint issue

* remove unused types

* intrduce placehholder attribute

* property is the only required attribute

* tidy block attributes

* use useProductEntityProp()

* define fallback value

* remove unused CSS class

* organize attrs

* do not implement tooltip yet

* fix eslint error

* update text-area keywords
2024-01-29 17:14:17 -03:00
Nathan Silveira 8e79cfa3ea
Fix product editor UI misbehaving in Calypso (#44132)
* Fix product editor UI misbehaving in custom adminmenu widths (e.g. Calypso)

* Extract logic to useAdminSidebarWidth hook
2024-01-29 14:09:06 -05:00
Damián Suárez cd3feaa3dd
[Product Block Editor]: always show "loading" state when choosing suggested products (#44053)
* add forceRequest param

* changelog

* force request when getting suggestions for linked
2024-01-24 19:08:40 -03:00
Damián Suárez aaf9981e90
[Product Block Editor]: improve getting suggested products from linked product section (#44047)
* introduce getSuggestedProductsFor helper

* use suggested products to get choices

* update helper to the data store

* changelog
2024-01-24 18:11:31 -03:00