Commit Graph

3138 Commits

Author SHA1 Message Date
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
Matt Sherman 94599a14cf
Add product type options to product tracking (#38017)
* Add product_type_options to wcadmin_product_add_publish
* Add product_type_options to wcadmin_product_update
* Add product_type_options to other wcadmin_product_ events
2023-05-02 13:42:57 -04:00
Nathan Silveira 4145b6e0f7
Await triggerNoteAction before navigating when action is clicked (#38047)
* Await triggerNoteAction before navigating when action is clicked

* Add additional logic and use @woocommerce/navigation to navigate
2023-05-02 11:17:50 -03:00
Joel Thiessen 16b9191c0d
Adding shipping class option and modal (#37968) 2023-05-01 10:04:54 -07: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
RJ d15f62241f
dev: added xstate inspector toggling (#38022)
* dev: added xstate inspector toggling

* dev: added eslint-plugin-xstate
2023-04-28 15:30:52 +08:00
Moon 3c2bae196b
Add navigation and progress-bar components for the new core profiler (#37741)
* add: core profiler scaffolding using xstate

* Add navigation and progress-bar components

* fix css lint error

* Update plugins/woocommerce-admin/client/core-profiler/components/navigation/woologo.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce-admin/client/core-profiler/components/progress-bar/progress-bar.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update plugins/woocommerce-admin/client/core-profiler/components/navigation/navigation.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Import HTMLAttributes

* Remove var from __ function

* Make progress bar color configurable

* Destruct props directly in the function and use const to define the comp

* Refactor fillerStyles

* Use woocommerce prefix for classnames

* Use inherit for display -- initial did not work properly

* Fix css lint error

* Remove unused WooLogo var

* Use named export

* Fix js style

* Add changelog

* Fix broken tests

---------

Co-authored-by: rjchow <me@rjchow.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-04-26 17:27:53 -07:00
Matt Sherman e81f8ae88f
Update AdvancedFilters to use createInterpolateElement instead of interpolateComponents (#37967) 2023-04-26 06:58:14 -04:00
Joel Thiessen 6f7eeeaf49
Refactoring LayoutContext and implementing with product editor (#37720) 2023-04-25 15:17:33 -07:00
RJ f0109e89ac
add: new core profiler scaffolding in xstate (#37628)
* add: core profiler scaffolding using xstate

* address review feedback and questions

* changed path to use setup-wizard

* default new core-profiler feature flag to false
2023-04-24 10:08:24 +08: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
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
Adrian Duffell 03ce56a99e
Add Woo Payments Feature Slot Fill on Homepage (#37768)
* Add slot

* Add fill

* Add changelog
2023-04-18 05:07:25 +08:00
Adrian Duffell 4fca6d1f63
Add Onboarding Heuristics Tracks Event (#37767)
* Add heuristics data to onboarding setting

* Add track

* Add Tracks event
2023-04-18 04:47:24 +08:00
Fernando Marichal a67b7df26f
Add tracks events to attributes tab (#37622)
* Refactor method `addProductAttributesTracks`

# Conflicts:
#	plugins/woocommerce-admin/client/wp-admin-scripts/product-tracking/shared.ts

* Add changelog

* Record remove attribute Tracks event

# Conflicts:
#	plugins/woocommerce/client/legacy/js/admin/meta-boxes-product.js

* Record `used for variations` and `visible on product page` events

* Record `used for variations` and `visible on product page` events

* Fix js error

* Remove not used code

* Refactor `add_existing` attribute recording

* Fix event action

* Refactor `attachEventListenerToParentForChildren`

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-04-17 12:50:30 -03:00
Shojib khan a4a2ef732d
Solved issue of Ellipsis menu overlaps on small screen (#37583)
* solved ellipsis menu overlaps on mobile

* solved ellipsis menu overlaps on small screens

* removed package.json and pnpm lock files

* restore default package.json

* Update plugins/woocommerce/changelog/fix-37517-fix-ellipsis-menu-overlaps

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* solved lint error

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-04-17 13:22:34 +08: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 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 fb12ad20fd
Replacing rest_namespace modification with middleware due to blocks issues (#37621) 2023-04-13 08:45:50 -07:00
Dano 252c2593b2
Updated task progress header title (#37546)
* Updated task progress header title

## Issue
Special characters in site titles would not render as readable text in the mentioned title.

## Summary
Updated task progress header title to support special characters using the dangerouslySetInnerHTML function was a ready solution used throughout the application, so it makes sense to apply it here as well.

* Import sanitizeHTML

* Add changelog

* Tweak changelog

---------

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-04-13 11:42:22 +08:00
Fernando Marichal 1187df9d82
Add Tracks events to variations tab (#37607)
* Refactor `product-tracking` file

* Add variations tracks events

* Add changelog

* Refactor method `addProductAttributesTracks`

* Add `remove_variation` Tracks event

* Modify code comments

* Rename `query` prop

* Modify `generate_variations` event to be recorded after confirmation

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-04-12 16:37:23 -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 868fbbf23a
Register product editor blocks server-side (#37339)
* Move product block editor to new feature name

* Register all blocks and block assets server-side

* Add changelog entry

* Disable phpcs rule for file_get_contents
2023-04-06 10:13:48 -07:00
Nathan Silveira 277f4aab12
Show tooltip in Save attributes button instead of using title attribute (#37345)
* Modify tipTip to allow showing dynamic content

* Show tooltip when button is disabled

* Add tipTip and disabled logic to create variations button

* Add header comment in tipTip plugin
2023-04-05 16:22:59 -03: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
Chi-Hsuan Huang e553759ab6
Fix `FormContext` type error in client/tasks/fills/steps/location.tsx (#37532)
* Fix FormContext type error

* Add changelog
2023-03-31 18:43:16 +08:00
Moon 658034f64e
Migrate steps/location to TS (#37257)
* Migrate steps location to TS

* Add description for ts-expect-error
2023-03-30 12:07:58 -07:00
Ilyas Foo d3229b97cb
Update mobile app modal image resolution (#37506)
* Update image

* Changelog
2023-03-30 23:36:12 +08:00
Gan Eng Chin 5094cc6742
Code refactor: Simplify boolean expression before `&&` in Marketing page (#37452) 2023-03-29 21:15:01 +08:00
Gan Eng Chin a57ec7818e
Code refactor: Move marketing components into coupons directory (#37444) 2023-03-29 21:13:04 +08:00
Gan Eng Chin b2629c03db
Make Multichannel Marketing the default new UI for Marketing page (#37430) 2023-03-29 21:09:23 +08: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
Gan Eng Chin de2aa280ef
Simplify boolean expression before && in Marketing page. 2023-03-27 21:55:42 +08:00
Gan Eng Chin 64bd683e0b
Simplify import. 2023-03-27 20:17:05 +08:00
Gan Eng Chin ab2d56d8b3
Move card and slider into coupons directory. 2023-03-27 19:56:40 +08:00
Gan Eng Chin 48c50afcbf
Move RecommendedExtensions and KnowledgeBase into coupons directory. 2023-03-27 19:56:40 +08:00
Gan Eng Chin 12ec1c88fc
Remove unused classic marketing overview component. 2023-03-24 16:56:52 +08:00
Chi-Hsuan Huang 9cf7ef5a3d
Migrate woocommerce-payments task fills to TS and remove connect.js fill (#37308)
* Migrate woocommerce-payments.js to TS

* Remove tasks/fills/connect.js

* Add changelog

* Remove connect js
2023-03-24 12:26:13 +08:00
Christopher Allford 67cde87fd1
Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
Gan Eng Chin 51a57c2808
Remove unused Button component in marketing directory. 2023-03-23 23:28:55 +08:00
Gan Eng Chin 4f7705f691
Always use MarketingOverviewMultichannel for marketing page. 2023-03-23 23:19:34 +08:00
Gan Eng Chin 5953362485
Refetch "Installed extensions" card data after installing recommended channels (#37300) 2023-03-23 15:06:08 +08:00
Gan Eng Chin 1453351521
Simplify tests for CreateNewCampaignModal. 2023-03-22 18:38:43 +08:00
Gan Eng Chin 59c94ce24a
Fix build errors after merging from trunk. 2023-03-22 18:35:06 +08: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
Gan Eng Chin 186f1fb850
Merge branch 'trunk' into feature/37127-marketing-reload-installed-extensions 2023-03-22 18:28:39 +08:00
Gan Eng Chin c0dc416700
Exclude marketing channels in "Installed extensions" and "Discover more marketing tools" cards (#37126) 2023-03-22 17:41:04 +08:00
Gan Eng Chin 76379770a1
Fix hook file name with correct casing. 2023-03-22 16:51:25 +08:00