* fix doc. improve doc
* disabe `Add` button when not terms nor options
* variant="primary" > isPrimary
* move helpers to utils file. improve jsdoc
* add tests for hasTermsOrOptions helper
* add isAttributeFilledOut unit tests
* changelog
* allow any type in unit tests
* show a toolip with not possible to add attributes
* fix wrong inline code comment
* expect the Add button is initially disabled
* check the `Add attributes` button is enabled
* changelog
* remove obvios jsdoc
* check all terms are accepted
* minor changes
* update tests
* remove console.log to dev purpose
* improve E2E testing remviing attr row
* Add a new event called wcadmin_product_variations_inline_select that fires when the user selects one of the inline options
* Add a new event prop called updated_options to wcadmin_product_variations_change to identify the options updated by the user
* Add changelog file
* prevent creating duplicated items with different cases
* changelog
* allow terms with same name for local attributes
* fix wrong const name to identy local attributes
* use more complext terms for E2E test
* encode URL to pass E2E test
* split E2E when creating new terms
* introduce `slug` property to TokenItem
* rename terms with globalAttributeTerms
* jsdoc
* minor test name change
* changelog
* Fix "fullfilled" typo
* Add changefile(s) from automation for the following project(s): @woocommerce/admin-e2e-tests
---------
Co-authored-by: github-actions <github-actions@github.com>
* Remove duplicate
* Add is-coming-soon-page endpoint
* Render invalid cache warning
* Use meta tag instead
* Add url for debug purpose
* Use a different copy for the congrats page when the cache is still shown
* Clean up unused codes
* Guard the api with permission
* Add changefile(s) from automation for the following project(s): woocommerce
* Reuse $is_fse_theme
* Lint fixes
* Update 48586-update-48516-detect-cache-when-launching-store
* Add changefile(s) from automation for the following project(s): woocommerce
* Add changefile(s) from automation for the following project(s): woocommerce
* Update plugins/woocommerce/changelog/48586-update-48516-detect-cache-when-launching-store
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
* Add changefile(s) from automation for the following project(s): woocommerce
* changed to js method
* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce
* empty commit to trigger CI
* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce
* empty commit to trigger CI
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: rjchow <me@rjchow.com>
* show terms optimistically
* define values as TokenItem array
* introduce TokenItem type
* add token animation when adding
* terms could be undefined
* remove unused action
* changelog
* minor doc enhancements
* rename consts
* simplify items selector
* clean the temporary items, one by one
* do not pass selectedTerms when adding a new one
* pull and update form terms when creating new ones
* fix typo
* do not export TokenItem type
* rename and tweak jsdoc
* skip E2E test
* Automated change: Prep @woocommerce/extend-cart-checkout-block for release.
* Re-add removed items from changelog with updated prefixes
---------
Co-authored-by: opr <opr@users.noreply.github.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Fix review error type
* Add changelog
* Rename global error-boundary class to avoid conflict
* Rename global error-boundary class to avoid conflict
* Wrap panels in error boundary
* Remove console
* Reformat
* Fix test
* Fix test
* Add changelog
* Move productBlockEditorSettings type to global.d.ts
* Set maxUploadFileSize to system settings
* Changelog
* Add maxUploadFileSize to test
* Set maxUploadFileSize for downloads
* Set maxUploadFileSize for variation image quick action
* Remove unused EditDownloadsModal props
* Fix typo in EditDownloadsModal prop
* Remove unused EditDownloadsModalProps prop
* Remove unused function
* Show specific error message when upload of download file fails
* Show error notice when upload fails for variation image quick action
* Set maxUploadFileSize for download files menu item
* Close downloads menu on error
* Fix up types to avoid duplicate definitions
* Show specific link error
* Create VariationStockStatusForm component
* Integrate VariationStockStatusForm within the VariationsTableRow component
* Add woocommerce_manage_stock option to the default_option_permissions list in the Options rest controller
* Enable track inventory when woocommerce_manage_stock is set to yes
* Add stock_status radio component to the VariationStockStatusForm component
* Fix VariationStockStatusForm padding
* Fix control spacing
* Add stock_quantity to the VariationStockStatusForm component
* Add changelog files
* Fix linter errors
* Fix invalid sortable state in the variations table
* switch setting templates order
* pull product_form from the entity store
* fix typo
* set post excerpt with template description
* update the description for the Simple template
* rename type for product form post
* introduce isProductFormTemplateEnabled() helper
* render the PFTs into the templates selector
* changelog
* tscripting
* remopve dropdown
* re-write changelog files
* change and rename isProductFormTemplateSystemEnabled
* remove unused component
* try change the template version name
* Add tests for ProductPage
* Add tests for ProductVariationPage
* Add test for product_tab_click event
* Add test for product_editor_feedback_bar_turnoff_editor_click event
* Add test for product_dropdown_option_click event
* Add test for product_add_view track
* Changelogs
* Changelog
* Lint
* Add product_edit_view test and falsey test
* Fix test name
* Only run layout effect after product is resolved
* Fix edit variable product test
* Add changelog
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* Remove template matching from front-end
* Create 'woocommerce_rest_get_product' filter to allow extensions to change the product when it's fetched through the REST API
* Stop defaulting to 'standard-product-template' product template and handle defaults only in getLayoutTemplateId function
* Use created hook to determine and persist the product template ID when it's not defined.
Also introduce 'match_fn' in ProductTemplate to allow extensions to provide robust ways of matching the template
* Add changelog
* Fix tests
* Remove outdated tests
* Fix issue in filter because $product can be false and move API change to v3
* Add comments to continue statements
* Small refactor
* Only send layout template id to useLayoutTemplate after product is loaded
* Revert front-end changes
* Remove match_fn and create filter to allow extensions to determine the product template id
* Avoid loading layout template before product is loaded
* Create woocommerce_product_editor_determine_product_template filter and use it
* Update changelogs and remove unused code
* Remove _product_template_id for products that were created with the new product editor.
* Use only id to find productTemplate
* Turn hook into experimental
* Remove deprecated tests
* Rename filter
* Add more typings to useEntityRecord
* Use hasResolved boolean to check whether product has been resolved
* Add changelog
* Add 'variation' to ProductType
* Don't default to the standard-product-template for variations
* Update changelog
* Accept null in getLayoutTemplateId
* Fix edit variable product test
* Rename hook
* Revert changed logic to avoid regressions
* Increment useProductTemplate logic
* Default to standard-product-template instead of undefined when no matches
* Re-import Features class
---------
Co-authored-by: Jon Lane <jon.lane@automattic.com>
* introduce ProductFormTemplateProps type
* pull and set the default product form template
* render the PFT when it exists
* render a temporeary form templates selector
* changelog
* rollback TS global changes
* fix typo
* focus description when generating slug
* focus the name once the modal renders
* changelog
* do not focus on description field
* isSecondary is depcreated. use "variant" prop
* move changelog file
* Temp commit
* Clean up unused codes and streamline logic
* More cleanups and add comment
* Better naming and fix logic
* Rename and comment
* Changelog
* Changelog
* Lint
* Moved leap year utils to date package, added tests
* Moved functions to utils, add tests
* Add more test
* Fix changelog
* Focus tab shows focus style
* Tabbing when inside the tabs takes you to the first focusable element inside the current tab's tab panel
* Users can press the left and right arrow keys to move between tabs
* When a tab is focused and the Home key is pressed the first tab in the list should be focused. When the End key is pressed the last tab should be focused
* Add changelog file
* Fix e2e tests
* Add changelog file
* Get last tab by index
* Fix linter errors
* minor change in reducer
* use organizeItemsById to compute new items
* add reducer test with pick optimisticUrlParameters
* rename constant name
* add optimisticUrlParameters to CRUD actions types
* use organizeItemsById to generate store IDs
* add more reducer tests
* compute nextItemsData based on ids
* tessstssssss
* add a order_by: name test
* fix sorting data when url parameters
* add tests
* introduce filterDataByKeys helper fn
* fix process to sort items optimistically
* rollback wrong change in actions
* changelog
* set action `options` as optional
* set default value for options
* Explicitly check whether the only block is a paragraph
* Update comment
* Move handling of empty block array into clearDescriptionIfEmpty
* Add areBlocksEmpty util function
* Check for empty block inside iframe editor
* Remove check for empty block from description block
* Add unit tests for areBlocksEmpty
* Changelog
* Update comment to clarify
* Lazy load the PluginArea and the ModalEditor
* Remove repeated product request when editing a specific product
* Fix linter errors
* Add changelog files
* Fix linter errors
* Refactor the block editor to remove some extra rerenders
* Defer the publish button processing
* Defer the tab content render 500ms to reduce the total blocking time
* Fix linter errors
* Fix unit test and tabs unexpected rerender
* Fix linter errors
* Reduce the defered time to 300ms
* Fix get product url when the product has been duplicated since the new copy does not have permalink
* Fix the invalid unregistration of wc-admin-more-menu in the product page
* Fix compilation errors
* Don't use NavigableToolbar for header
* Rename CSS styles for header
* Put document tools in NavigableToolbar
* Fix alignment of inserter button
* Switch non-toolbar items to regular buttons
* Remove unused const
* Use same CSS styling as core for document tools
* Clean up errant change while rebasing
* Changelog
* Add workflow_call event
* Add tests-daily-run.yml
* Remove workflow version
* Update input value
* Remove secrets from caller workflow
* Rename job
* Check context
* Check context
* Check workflow_call inputs
* Override github.event_name with inputs.trigger
* Fix input name
* Add config for daily e2e tests with Gutenberg
* Update env commands for Gutenberg run
* Add disableHpos env variable in ci-utils
* Revert the trigger to push
* Revert the env variable setting in ci-jobs
* Revert the env variable setting in ci-jobs
* Rebuild utils
* Update test env start command
* Define the Gutenberg Playwright project
* Use path relative to workspace root
* Update events for test projects
* Update events for test projects
* Add changelogs
* Remove the e2e tests with Gutenberg tests from daily runs
* Set the schedule and workflow_dispatch triggers
* Add --project default flag to only run the default tests in CI
* Renamed snapshots to match the new Playwright project name
* Rename appendEdit function to appendToEditorHistory
* Don't append to editor history onInput
* Changelog
* Move onChange and onInput handles to named functions
* Debounce appendEdit
* Change undo and redo to useCallback
* Update debounce time to feel closer to post editor
* Move debounce of appendEdit into useEditorHistory
* Make sure debounced appendEdit is flushed before undo/redo
* Remove console.log() statement
* introduce processItems() util function
* add processItems fn tests
* use processItems in the reducer process
* udpate GET_ITEMS reducer test
* minor CREATE_ITEM_SUCCESS test update
* changelog
* Add undo shortcut support
* Add redo shortcut support
* Add document overview shortcut support
* Move keyboard shortcuts to after interface store is registered in subregistry
* Move settings sidebar identifier to a constant
* Add settings sidebar shortcut support
* Changelog
* Update to pnpm 9.1 and fix a mini css bug
* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai
* temporarily disable swallowing build output to diagnose issue with perf workflow
* Ignore some type issues that commonly resurface when deps slightly change
* Fix persistent type issues that have recurred many times
* Add more ignores
* Fix lint issue
* Revert change to swallow build error
* Improve access of the config that needs updated build dir.
---------
Co-authored-by: github-actions <github-actions@github.com>
* fisrt approach
* do not clear same selected term
* tweak token field component
* chage the attributes type
* filter attributes already taken
* set instanceNumber for each combobox instance
* implement remove attribute
* final first approach
* update onRemove type
* rename edit VariationItemsBlockEdit
* handle local attributes
* rollback unrelated issue
* changelog
* remove unused component
* remove test
* add border color when disabled
* Use min and max values if provided when sanitizing values
* Pass min and max attributes to NumberControl
* Use 'min' and 'max' values when incrementing through + and - buttons
* Add changelog
* Handle increment when pressing buttons
* Show + and - buttons disabled when max/min has been reached
* Prevent suffix from being selected
* iframe editor PluginSidebar
* iframe editor PluginArea and ComplementaryArea
* iframe editor PinnedItems
* Try ComplementaryArea slot
* Update scope name
* Only render ComplementaryArea.Slot when right sidebar is open
* Register interface store in sub registry
* Move block inspector to complementary area
* Remove hardcoded inspector toggle button from header
* Remove debug statement
* Remove unused isSidebarOpened context
* Set settings sidebar to be active by default
* Don't allow unpinning of settings sidebar
* Organize sidebar components under folder
* Add plugin more menu item
* Remove width for sidebar
* Update PluginArea scope name
* Pull out small viewport support for pinned items (incomplete)
* Move sidebar complementary area scope to a const
* Update sidebar complementary area scope name
* Update PluginSidebar export name
* Provide comments to clarify sidebar props settings
* Add comment about why this icon was copied
* Remove unnecessary wrapper div around complementary area
* Changelog
* add package
* remove log
* Add changefile(s) from automation for the following project(s): @woocommerce/dependency-extraction-webpack-plugin, woocommerce
* Add changefile(s) from automation for the following project(s): @woocommerce/dependency-extraction-webpack-plugin
---------
Co-authored-by: github-actions <github-actions@github.com>
* Set BlockEditorProvider's value to temporalBlocks
* Remove unnecessary code
* Set initial blocks in editor history, so that the first edit on an existing description can be undone
* Changelog
* Increment ProductVariationImage type
* Allow adding images to variations from the main product screen through a button
* Add changelog
* Add changelog
* Change showSuccess parameter to optional
* Add 'placeholder' attribute to taxonomy block and add 'placeholder' attribute to category field in Simple Product Template
* Only show placeholder when nothing is selected
* Remove suffix from function parameters
* Add changelog for component
* fix unit tests
* Avoid requesting product with id -1
* Add changelog
* Move changelog
* Add options to useEntityRecord type
* Fix editedRecord
* Add comment
* Undo early return
* Avoid making a request for product if it isn't already loaded
* Avoid making a request for product if it isn't already loaded
* Add typing for useEntityId
* Rework header to avoid requesting product unless we have a product ID
* Avoid requesting product when getting productTemplateId and blocks
* Remove unused import (fix lint error)
---------
Co-authored-by: Matt Sherman <matt@jam123.com>
* Rename filter options in Orders Analytics.
* Sort filter options in labels in Orders Analytics.
* Change filter labels to singular.
* Wider label column to accommodate label change.
* Rename filter options in Variations Analytics.
* Change filter options to Attribute, Category and Product in Variations Analytics.
* Revert "Change filter options to Attribute, Category and Product in Variations Analytics."
This reverts commit b3ca5d5807.
* Change "Add a Filter" to "Add a filter".
* Add changelog.
* Add changelog.
* Refactor getAvailableFilterKeys and getAvailableFilters into one function.
* Add code comment and remove unneeded code.
* Code refactor getAvailableFilters.
This is done by starting from allFilterKeys, and filtering with allowMultiple or not yet active.
With this, we don't need to have `inactiveFilterKeys` and "Ensure filters that allow multiples are always present."
* Fix tests and lint issues.
* Simplify code with Object.entries.
* rename type for item of attribuite input field
* options is not part of the input item
* update type of getProductAttributeObject
* update types
* changelog
* fix eslint issue
* fix test
* move the logic to pull attribute to modal cmp
* changelog
* remove options from item props
* rename TS prop name
* save unsaved change
* rename type for item of attribuite input field
* options is not part of the input item
* update type of getProductAttributeObject
* update types
* changelog
* fix eslint issue
* fix test
* tweak optimisticQueryUpdate type
* sort items optimistically
* update attributes list optimistically
* do not invalidate when creating a new attribute
* changelog
* changelog
* update tests
* update options param in test
* wait for the promise when creating new attribute
* fix the rest of tests
* Import colors.native scss variables
* Add changelog
* Refactor WCPay banner and cleanup
We introduce a new WCPayConnectCard onboarding component and
remove/cleanup all other WCPay surface components.
This component uses the new design, updated payment methods icons
and WCPay logo.
* Add changelog
* Upgrade the WCPay payments settings banner
* test: Fix WCPay payments settings banner tests
* Update the WCPay welcome page to use the WCPayConnectCard component
* Update the Payments task page to use the WCPayConnectCard component
* Fix copy for payments settings methods CTA buttons label
* Add changelog
* Further cleanup of no-longer-used WCPay surfaces
* Consolidate onboarding component icons for single sources
* Minor cleanup
* test: Fix WCPay payments settings banner test
* test: Fix payments tasks page tests
* Add apiFetch middleware to add X-Wc-Product-Editor header to all requests from product editor
* Use productEditorHeaderApiFetchMiddleware
* Update name of header
* Utility function to check header
* Changelog
* Changelog
* Fix UI for add filter popover in Analytics.
* Make character casing consistent for filters.
* Add changelog.
* Add changelog.
* Change filter label to sentence case.
* Show validation message in the field that lost the focus
* Add unique validation for custom field names and trim values
* Let edit custom fields when creating a new product
* Add changelog file
* Allow saving a product as a draft when hitting ctrl/cmd + S
* Increment logic to keep product published/scheduled after it is published when using shortcut