Commit Graph

2039 Commits

Author SHA1 Message Date
Damián Suárez 63a2788527
Product Block Editor: improve a11y when creating a new Shipping class (#47995)
* 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
2024-06-04 10:12:08 +01:00
Matt Sherman 1386fa2df2
Product Editor: Remove Add Sizes and Add Colors buttons from Variations tab (#48114)
* Temporarily remove Add Sizes and Add Colors buttons until they are fixed

* Changelog
2024-06-03 12:23:01 -04:00
Maikel Perez a0f9d159e5
New image empty state for variations (#47909)
* Fix the variations image block placeholder to show only one image

* Add changelog file
2024-05-31 11:14:33 -03:00
Damián Suárez ac6fe9f933
Product Block Editor: populate shipping class slug automatically (#47896)
* extend shipping_classses with '/suggest-slug' endpoint

* generate slug automatically

* changelog

* jsdoc

* polish setting and pulling the slug

* replace checkbox by button

* reword slug inout label with "Slug"

* add slug help

* use prefix input property

* isPrimary is deprecated. Use "variant" instead

* fixing typo. props to @mdperez86
2024-05-30 12:05:34 +01:00
Ilyas Foo c9752f1eaf
Fix analytics chart previous year data when date range includes 29 Feb (#45874)
* 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
2024-05-30 12:54:00 +08:00
Ilyas Foo 98b32b5ecc
Fix getPreviousDate default behaviour to compare previous year (#47951)
* Add default compare previous_year and add tests

* Changelogs
2024-05-30 11:31:10 +08:00
Damián Suárez 6f8bce8bb0
Product Block Editor: load and create shipping classes optimistically (#47848)
* define ans use shippingClassRequestQuery

* do not invalidate getProductShippingClasses

* changelog
2024-05-29 19:59:24 +01:00
Maikel Perez 189476fcdf
Fix accessibility issues when using the keyboard to navigate/select tabs in the new product editor (#47860)
* 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
2024-05-28 17:44:21 +00:00
Fernando Marichal 890fd87e7e
Update product name validation message (#47846)
* Update product name validation message

* Add changelog
2024-05-27 15:43:44 -03:00
Matt Sherman 8894850ce1
Product Editor: Fix styling of checkboxes in Categories and Tags fields with Gutenberg plugin installed (#47816)
* Remove styling of checkbox (use GB core styling)

* Remove setting of margin on checkbox control

* Remove unused CSS

* Changelog
2024-05-27 14:34:21 -04:00
Matt Sherman 988c3634b7
Doc: Update list of product editor generic blocks to include select and text-area (#47810)
* Add select and textarea fields to list

* Changelog
2024-05-27 14:34:01 -04:00
Damián Suárez f51b93359f
CRUD: populates `items` and `itemsCount` when a new item is created (#47632)
* 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
2024-05-27 16:34:12 +01:00
Ilyas Foo 012f0d3418
Fix redundant confetti on LYS task congrats page (#47838)
* Add useRef to ensure confetti is only trigerred once

* Changelog
2024-05-27 21:01:40 +08:00
Maikel Perez 55aafb9fc6
Remove the new old experience (#47814)
* Remove ProductTitle component

* Remove ProductSettings component

* Remove ProductMoreMenu component

* Remove ProductFormHeader component

* Remove ProductVariationFormHeader component

* Remove ProductFormFooter component

* Remove ProductFormLayout component

* Remove ProductForm component

* Remove ProductTourContainer component

* Remove AddProductPage component

* Remove ProductVariationForm component

* Remove EditProductPage component

* Remove ProductFormTab component

* Remove SingleImageField component

* Remove ProductVariationDetailsSection component

* Remove ProductVariationsSection component

* Remove DetailsSectionFills component

* Remove ImagesSectionFills component

* Remove ShippingSectionFills component

* Remove AttributesSectionFills component

* Remove PricingSectionFills component

* Remove InventorySectionFills component

* Remove product-form-fills file

* Remove product-form-variation-fills file

* Remove product-form-api-fills file

* Remove ClassicEditorIcon component

* Remove HiddenIcon component

* Remove VisibleIcon component

* Remove drag-and-drop.svg file

* Remove ProductSectionLayout component

* Remove products/constants.tsx file

* Remove new-product-management-experience feature flag

* Fix linter errors

* Add changelog files
2024-05-24 18:00:22 +00:00
Matt Sherman 660c550071
Product Editor: Set description properly if description consists only of a single non-paragraph block (#47763)
* 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
2024-05-24 13:32:06 -04:00
Maikel Perez 4ddfd43864
Enhancement editor loading speed (#47425)
* 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
2024-05-24 08:39:53 -04:00
Maikel Perez 7f6e73dcd3
Cannot create variation options when viewport width is small (#47766)
* Fix cannot create variation options when viewport width is small

* Add changelog file
2024-05-23 14:16:03 -04:00
Matt Sherman 5e6bce3334
Product Editor: Fix deprecation warnings about toolbar items in modal block editor (#47527)
* 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
2024-05-22 15:37:17 -04:00
Adrian Moldovan 13ab9007f6
[testing workflows] Add workflow_call trigger in CI workflow - support daily and other types of runs (#47612)
* 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
2024-05-22 11:04:44 -07:00
Matt Sherman 8c47cfd247
Product Editor: Fix modal block editor undo granularity (#47524)
* 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
2024-05-22 09:07:04 -04:00
Maikel Perez bdf2ed170d
Simplify the product images empty state (#47663)
* Simplify the product images empty state

* Add changelog file
2024-05-22 08:36:22 -03:00
Maikel Perez 4c0399991a
Replace copy: List Price to Regular Price (#47658)
* Replace copy: List Price to Regular Price

* Add changelog files

* Fix md-docs linter errors and update the manifest
2024-05-21 16:28:01 -04:00
Maikel Perez 30c449e749
Fix layout template request not being executed after registering a new entity with the new version of GB installed (#47678)
* Fix layout template request not being executed after registering a new entity with the new version of GB installed

* Add changelog file
2024-05-21 20:02:02 +00:00
Damián Suárez fcc4c33726
Product Block Editor: tweak the gap between the form field blocks (#47666)
* introduce block gap unit-20

* set unit-20 as default for section and subsections

* changelog
2024-05-21 14:46:16 -03:00
RJ 2b69d28ecb
add: return to lys from cys (#47654)
* add: return to lys from cys

* types

* lint

* lint

* fixed task id
2024-05-21 21:45:38 +08:00
Fernando Marichal bf7204f119
Modify components empty state (#47487)
* Create EmptyState component

* Create getEmptyStateSequentialNames util

* Use EmptyState component in Custom fields

* Use EmptyState in AttributeControl

* Use EmptyState component in VariationItems

* Remove not used references

* Accept empty strings

* Add tests

* Add changelog

* Improve rows opacity

* Add i18n to Attributre

* Fix lint
2024-05-21 10:07:38 -03:00
Damián Suárez 6c966a4314
Product Block Editor: change attribute row based on the form token field component (#47649)
* minor TS enhancement

* tweak attribute row height based on terms selector

* changelog

* handle by using CSS

* define modal size with `medium`
2024-05-21 13:00:02 +00:00
Damián Suárez f5713b3f94
CRUD: introduce organizeItemsById helper function (#47624)
* 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
2024-05-21 10:15:22 +01:00
Damián Suárez 64b8c680fc
Product Block Editor: fix performance issue when rendering thousands of attributes in the attributes modal (#47638)
* define select deps to avoid re-renders

* chnagelog

* define sort criteria out of the cmp scope
2024-05-21 10:14:41 +01:00
Adrian Duffell 8cbc799067
Update Core Profiler Industries (#47605)
* Update indistries list order

* Add arts and crafts

* Add sports and recreation

* Tweak size of dropdown to allow 9 items

* Add small screen size height restriction

* Add changelogs

* Update documentation

* Fix lint issues
2024-05-20 23:10:53 +08:00
Matt Sherman a6b0bb7138
Product Editor: Fix modal block editor crashing when Add button clicked with Gutenberg 18.3.0 (#47561) 2024-05-20 08:36:52 -04:00
Matt Sherman 5c393f1857
Product Editor: Add keyboard shortcuts for undo/redo to modal block editor (#47488)
* 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
2024-05-17 07:47:11 -04:00
Damián Suárez 1f20bc5af1
Data: update getKey helper function (#47548)
* build key conidering all url params

* add getKet test with multiple parents

* changelog
2024-05-16 07:06:41 -07:00
Damián Suárez ff4422aff9
Product Block Editor: improve the process when creating a new attribute (#47518)
* introduce onAddNew() combobox property

* use onAddNew prop to handle adding new attributes

* changelog

* update packs after mergining with trunk

* move changelog file location

* remove unneeded change
2024-05-16 10:54:21 +01:00
Fernando Marichal 8dd87820cf
Disable pre-publish panel (#47430)
* Disable pre-publish panel

* Add changelogs

* Fix e2e tests
2024-05-15 15:52:42 -03:00
Fernando Marichal f94d08a0db
Add Tracks events to Publish dropdown and Save draft button (#47320)
* Add product_switch_draft event

* Add "product_save_draft" tracks event

* Add schedule_publish and dropdown_open events

* Refactor saveDraft method

* Add changelog

* Rename const

* Add onToggle callback

* Refactor saveDraft method
2024-05-15 15:16:32 -03:00
Fernando Marichal aa6137128d
Move pricing features to General tab (#47435)
* Move pricing section

* Fix e2e tests

* Fix create-variable-product tests

* Add changelog

* Add changelog in WC
2024-05-15 14:53:27 -03:00
Sam Seay 3ef7a01840
Update blocks JS tests to React 18 (#47383) 2024-05-15 21:33:36 +12:00
Chi-Hsuan Huang 14a5628e78
Fix remote inbox layout overflows the page width (#47451)
* Fix remote inbox layout overflows the page width

* Add changelog

* Update changelog
2024-05-15 01:55:27 +00:00
Matt Sherman a6e1f67a47
Produc Editor API: Modal block editor more menu extensibility (description field) (#47436)
* Const for more menu action item slot name

* PluginMoreMenuItem implementation

* Changelog

* Use WP core MenuItem instead of WooCommerce MenuItem
2024-05-14 14:25:22 -04:00
Damián Suárez 6ce65cadf7
Data: improve reducer with optimisticQueryUpdate test (#47428)
* update when creating new Item

* improve optimisticQueryUpdate reducer test

* changelog

* minor
2024-05-14 15:03:10 +01:00
Fernando Marichal fdb4069566
Remove not used feature flags (#47150)
* Remove product-virtual-downloadable

* Remove product-variation-management

* Remove product-external-affiliate

* Remove product-grouped

* Remove product-linked

* Remove customer-effort-score-tracks

* Add beta tester changelog

* Add changelogs
2024-05-13 15:05:47 -03:00
Damián Suárez 7c1da8129d
Product Block Editor: tweak styles/layout of attribute modal implementation (#47374)
* align terms dropdown help box

* reduce spinner size

* set a min height for each table row

* tweak terms style component when disabled

* changelog
2024-05-13 19:02:26 +01:00
Fernando Marichal b3e76c41b4
Request attributes conditionally (#47361)
* Request terms conditionally

* Add changelog

* Add used context

* Transform fetchAttributes into a hook

* Call fetchAttributes inside Attributes component

* Fix tests

* Remove useless useEntityId and fix dependency

* Refactor attriburtes component

* Add AttributeControl to Attributes component

* Add warning comment to Attributes component
2024-05-13 14:00:31 -03:00
Sam Seay 2db29164f9
Update to pnpm 9.1 (#47385)
* 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>
2024-05-13 10:57:39 -03:00
Fernando Marichal 69fa74ef8d
Request variations conditionally (#47360)
* Get variations conditionally

* Make second call conditionally

* Add changelog

* Remove usesContext from JSON
2024-05-13 10:57:03 -03:00
Damián Suárez c31051385d
Product Block Editor: use FormTokenField component for the attribute terms (#47288)
* 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
2024-05-10 15:45:58 +01:00
Nathan Silveira 7c7d9837a4
Add improvements to NumberControl (#47121)
* 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
2024-05-10 10:02:00 -03:00
Fernando Marichal d81ab3c9d3
Request categories conditionally (#47216)
* Request categories conditionally

* Add changelog
2024-05-09 08:29:55 -03:00
Chi-Hsuan Huang f2cf6b56aa
Update @automattic/tour-kit to 1.1.3 and @automattic/components to 2.1.1 (#47129)
* Use @automattic/tour-kit@1.1.3

* Update onPreviousStep and onNextStep callback

* Add changelog

* Add changelog

* Update @automattic/components

* Update package.json

* Fix pnpm-lock.yaml

* Update changelog

* Add changelog

* Enable autoScroll for shipping tour
2024-05-09 08:56:08 +08:00