Commit Graph

794 Commits

Author SHA1 Message Date
Sam Seay 9225fce382 Fix a bug in useSettings that causes an infinite loop. (https://github.com/woocommerce/woocommerce-admin/pull/6540) 2021-03-09 12:44:11 +13:00
renovate[bot] 19a13ae09c Update dependency core-js to v3.9.1 (https://github.com/woocommerce/woocommerce-admin/pull/6497)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-03-05 16:19:30 +13:00
Fernando 09d6bd9164 Fixed a few console errors in JS tests (https://github.com/woocommerce/woocommerce-admin/pull/6472)
* Fixed connect test

* Fixed plugins test

* Fixed stock panel tests

* Added changelog

# Conflicts:
#	readme.txt

* Removed blank line

* Changelog line removed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-03-04 09:15:03 -03:00
Joshua T Flowers 40a86daf2f Remove active item from navigation store (https://github.com/woocommerce/woocommerce-admin/pull/6486)
* Remove active item from navigation store

* Add changelog entry
2021-03-03 16:57:00 -05:00
David Levin f00721fa3e Fix summary number style regression on analytics reports (https://github.com/woocommerce/woocommerce-admin/pull/5913)
* Update summary number styles

* Add changelog

* Add testing instructions

Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2021-03-02 13:07:35 +08:00
Hsing-Yu Flowers 5aaf5d83c4 Add exclusion on getOptions and method renaming (https://github.com/woocommerce/woocommerce-admin/pull/6115)
* Remove exclusion in getFilteredOptions

* Update filteredOptions to searchOptions

* Check if options then setState after searchOptions is updated

* Show all options under business details select controls
2021-03-02 09:06:29 +08:00
Paul Sealock 077eb4d4f8 Dates: Account for leat year in `getLastPeriod` (https://github.com/woocommerce/woocommerce-admin/pull/6470)
* force end of month

* changelog
2021-03-02 09:40:26 +13:00
Sam Seay 630f31ae9d Clean up unused deps and add TS to the build. (https://github.com/woocommerce/woocommerce-admin/pull/6441) 2021-03-01 16:01:22 +13:00
Sam Seay 4d4d4ec49d Skip a test that is currently broken till we can find the cause. (https://github.com/woocommerce/woocommerce-admin/pull/6469) 2021-03-01 15:37:59 +13:00
Paul Sealock 101df3b019 Add Dependency Extraction Webpack Plugin (https://github.com/woocommerce/woocommerce-admin/pull/5762)
* Add woo flavored DEWP

* clean up webpack config

* clean

* marketing coupons

* onboarding scripts

* nav scripts

* better imports of deps

* add asset files to bundle

* under git rebase conflict error

* try order

* Add wp_set_script_translations to the scripting loop

* changelog
2021-03-01 12:48:52 +13:00
renovate[bot] 1a67c4098b Update dependency @woocommerce/csv-export to v1.3.0 (https://github.com/woocommerce/woocommerce-admin/pull/6438)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-25 16:38:02 +13:00
renovate[bot] e7994f549e Update dependency @woocommerce/number to v2.1.0 (https://github.com/woocommerce/woocommerce-admin/pull/6439)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-25 16:37:41 +13:00
renovate[bot] c9e7ad7dcf Update dependency @testing-library/react to v11.2.5 (https://github.com/woocommerce/woocommerce-admin/pull/6434)
* Update dependency @testing-library/react to v11.2.5
* Move the react testing library to dev deps in CES package.
2021-02-24 15:08:42 +13:00
Joshua T Flowers 9c5aa6d318 Move capability checks to client (https://github.com/woocommerce/woocommerce-admin/pull/6365)
* Move user data store folder

* Add user capability check hook

* Don't limit script loading by user capability

* Convert ActivityPanel to functional component

* Update ActivityPanel to use useSelect

* Check that a user can manage woocommerce for the store setup tab

* Add capabilities to pages

* Add testing instructions
2021-02-19 08:57:17 -05:00
Sam Seay 5354e4e856 Remove googlefonts/material icons. Migrate to @wordpress/icons and gridicons (https://github.com/woocommerce/woocommerce-admin/pull/6343) 2021-02-18 11:54:02 +13:00
Joshua T Flowers 452494a4fe Move favorited menu items to primary menu (https://github.com/woocommerce/woocommerce-admin/pull/6290)
* Update menu ID when favoriting an item

* Allow favorites to be included alongside the primary menu items

* Add categories to favorites menu server-side

* Don't reset menu state when active item is the same

* Make sure favorites are finished resolving before showing
2021-02-16 11:12:25 -05:00
Paul Sealock 07c4404f16 add settings and bump version (https://github.com/woocommerce/woocommerce-admin/pull/6331) 2021-02-15 10:44:46 +13:00
renovate[bot] 8c9235096c Update wordpress monorepo (https://github.com/woocommerce/woocommerce-admin/pull/6013)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2021-02-11 10:52:39 +13:00
Joshua T Flowers cb03659dbd Add navigation favorites data store (https://github.com/woocommerce/woocommerce-admin/pull/6275)
* Add favorites data methods

* Add reducer tests

* Refactor actions to be more event based

* Add favorites resolver

* Fix requesting property for addFavorite

* Fix up misnamed types and missing yields

* Update nav data store to work with REST endpoints

* Remove errant addFavoriteSuccess call
2021-02-10 15:26:11 -05:00
Darren Ethier 4cd14f5137 Fixes for @woocommerce/dependency-extraction-webpack-plugin (https://github.com/woocommerce/woocommerce-admin/pull/6295)
* switch block-settings alias to settings and fix mapped external

* don’t force compilation of externals to `this` scope.

* update various meta data in package related files (changelog etc)

* update starter pack

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-02-10 12:55:38 +13:00
louwie17 3d330bcee3 Fix the react state update error on homescreen (https://github.com/woocommerce/woocommerce-admin/pull/6286)
* Fix the react state update error on homescreen

* Fix note store dependency

* Update package lock file

* Add tests, and revert package-lock

* Add transient notices tests, and address PR feedback
2021-02-09 11:19:43 -04:00
Paul Sealock 5871e9e9d2 Dependency Extraction Webpack Plugin: bump version to 1.2 (https://github.com/woocommerce/woocommerce-admin/pull/6268)
* bump DEWP to 1.2

* reference PR number
2021-02-09 15:20:54 +13:00
renovate[bot] 999549da3c Update dependency core-js to v3.8.3 (https://github.com/woocommerce/woocommerce-admin/pull/6105)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-09 13:56:20 +13:00
louwie17 e7c0d0b8b1 Add paypal commerce obw integration (https://github.com/woocommerce/woocommerce-admin/pull/6261)
* Initial paypal plugin name replacement

* Add necessary fields for the Paypal plugin

* Updated payment methods info to use new options key

* Add most of the OBW paypal integration

* Some old code cleanup

* Get ready for the dynamic onboarding addition.

* Update paypal onboarding, adding script after plugin enabled

* Revert some old changes

* Check if plugin is enabled correctly

* Allow for manual input as a fallback

* Fix unit tests and alter the config updates

* Update plugin to use latest rest endpoint instead :)

* Add comment

* Fix some naming from PR feedback

* Made use of the payment gateway info from tasks/status, and show 500 error message

* Add support for the status and set credential endpoints

* Set the enabled value in ppcp-settings as well

* Added fall back for the 'get-status' method

* Fix issue where I was overwriting the options :/

* Small fix for when updating items manually

* Add changelog

* Remove old tests

* Add testing instructions
2021-02-06 09:41:26 +10:00
Hsing-Yu Flowers db0552e714 Change from MenuGroup to label (https://github.com/woocommerce/woocommerce-admin/pull/6090)
* Change from MenuGroup to label

* Remove icon

* Remove icon folder

* Update input style

* Remove list message

* Run test snapshots

* Add single knob

* Add changelog

* Change to wrap list with ul

* Run snapshots test

* Add styling on li

* Move renderList outside of li to prevent nesting

* snapshots test
2021-02-05 13:24:34 -03:00
Sam Seay 6847c44869 Add the Mollie payment provider setup task (https://github.com/woocommerce/woocommerce-admin/pull/6257)
* Whitelist the mollie plugin and ensure it does not crash on activation.

* Improve error messages for failed plugin installs.

* Add the payment provider screen for the Mollie payment provider.

* Revert change to try/catch activation, its not needed.

* Move the whitelist of mollie to Onboarding.php.

* Add api fetch to dep list of components, update the node setup workflow on gh actions.

* Pass indsutry to the klarna tests to avoid a crash.

* Add some tests for the mollie payment method.

* Remove redundant change to handler.

* Add a changelog entry for the feature.

* fix name of option

* Add testing instructions

Co-authored-by: Rebecca Scott <me@becdetat.com>
2021-02-05 13:41:55 +10:00
Joshua T Flowers 816b68eb83 Add WooCommerce flyout menu (https://github.com/woocommerce/woocommerce-admin/pull/6165)
* Unhide the submenu

* Add method to get items by category

* Add flyout menu items

* Sort items by menu ID

* Allow marketplace in flyout menu

* Remove unused styles on non-wc pages
2021-02-04 11:20:35 -05:00
Paul Sealock 88d72c88cd Dependency Extraction Webpack Plugin: Add Woo Blocks packages (https://github.com/woocommerce/woocommerce-admin/pull/6228)
* Hard code package names and alias block-settings

* instructions

* update readme

* block to blocks

* plural blocks

* just wcSettings, not wc.wcSettings
2021-02-04 17:43:24 +13:00
Joel Thiessen 68f06ccde8 Fixing certain screenreaders (NVDA) not recognizing chart data points correctly, and saying "blank" (https://github.com/woocommerce/woocommerce-admin/pull/6227) 2021-02-02 15:27:23 -08:00
Joel Thiessen 2e3f23f653 Fix 'sort by undefined' issue with screen readers in reports table (https://github.com/woocommerce/woocommerce-admin/pull/6232) 2021-02-02 15:02:57 -08:00
Joel Thiessen 969af77ced Changing heading on report tables to use semantic header tag (https://github.com/woocommerce/woocommerce-admin/pull/6234) 2021-02-01 13:59:21 -08:00
Joel Thiessen cd9b2f8715 Adding checkbox role to chart legend component to make it compatible with screen readers (https://github.com/woocommerce/woocommerce-admin/pull/6226) 2021-02-01 13:26:00 -08:00
Ilyas Foo e65dabdcb6 Add unit test for CES package (https://github.com/woocommerce/woocommerce-admin/pull/6196) 2021-01-28 11:35:38 +08:00
Hsing-Yu Flowers fc41022dd4 Return empty object if not in locale info (https://github.com/woocommerce/woocommerce-admin/pull/6188) 2021-01-28 09:38:46 +13:00
Darren Ethier 4210b6f0a8 Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856)
* update @wordpress/eslint-plugin dependency to latest version

* local prettier config isn’t needed anymore because of fix in upstream package

* add jsdoc config to use typescript format for jsdocs

* update changelog

* update packages and include .prettierrc.js back in for code editor support of prettier

* add docs

* minor prettier fix in test file

* Convert all new eslint rules throwing errors to warnings temporarily to be handled in separate prs

* updated changelog

* fix package-lock.json

* prettier auto-fixes

* add prettier dependency at root

* sigh prettier is being finicky

* version bump

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-01-26 13:24:28 +13:00
louwie17 74b3eccbc9 Add option to create product by template (https://github.com/woocommerce/woocommerce-admin/pull/5892)
* Initial product template modal

* Add custom product template for the new-post route

* Add test, and code for making use of the insert_post action

* Added ProductTemplates Datastore to create template with REST api

* Add back variation method, deleted by accident

* Move product from template endpoint to OnboardingTasks class

* Fix lint errors

* Added tracks and template hooks

* Rename product create permission check function, for less confusion

* Remove duplicate recommended option

* Fix stylelint errors

* PHP tests for the product_from_template endpoint

* Fix onboarding php unit tests

* Write tests for client product template options

* Refactored list component, to use it as a radio control list

* Fix lint errors

* REmove assertion as it fails on the ci

* Add changelog

* Updating tests to make sure all product attribute taxonomies are removed

* Add more specific assertions for importing sample products test

* Update the sample products test

* Deconstruct item object, from PR suggestion

* Fix PHP errors, by updating the createProductFromTemplate call
2021-01-25 12:52:42 -04:00
manjeet-wisetr 3a792f66d9 Update FilterPicker Component README.md (https://github.com/woocommerce/woocommerce-admin/pull/5928) 2021-01-25 11:21:57 -05:00
renovate[bot] 2d106bb0b3 Update dependency qs to v6.9.6 (https://github.com/woocommerce/woocommerce-admin/pull/6107)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-23 10:41:40 +13:00
Tomek Wytrębowicz f012bbb7ca Render SummaryNumber delta precisely. (https://github.com/woocommerce/woocommerce-admin/pull/5926)
Previously only a given delta was rendered as an integer. Now it renders the number with a given precision.
Fixes woocommerce/woocommerce-admin#5925.

Co-authored-by: Rebecca Scott <me@becdetat.com>
2021-01-21 19:06:07 +01:00
Joshua T Flowers 828ffc8a1a Fix WooCommerce mobile menu for new navigation (https://github.com/woocommerce/woocommerce-admin/pull/6096)
* Show the first WooCommerce item in WP menu on mobile

* Hide excluded menu items from WooCommerce wp menu
2021-01-20 19:26:54 -05:00
Sam Seay 35a448a8f3 Allow for larger result sets of attribute terms (https://github.com/woocommerce/woocommerce-admin/pull/6077) 2021-01-18 09:49:32 +13:00
renovate[bot] 52197af57e Pin dependency @babel/runtime to 7.12.5 (https://github.com/woocommerce/woocommerce-admin/pull/6053)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-14 10:39:31 +13:00
renovate[bot] 219092808b Update dependency @testing-library/react to v11.2.3 (https://github.com/woocommerce/woocommerce-admin/pull/6057)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-14 10:38:18 +13:00
Fernando 513173a9d9 Add merchant email notifications (https://github.com/woocommerce/woocommerce-admin/pull/5922)
* Added MerchantEmailNotifications class

* Added new type and Events refactor

# Conflicts:
#	src/Events.php

* Added templates

* Refactored MerchantEmailNotifications and NotificationEmail

* Templates refactored

* Added email opening tracking endpoint

* Added templates handling

* Moved folder `MerchantEmailNotifications`

* Fixed template extensibility

* Fixed note `heading` check

* Added default type in `get_template_filename`

* Added tests

* Removed bypass

* Modified URL

* Added required noteTypes

* Added flag for functionallity

* Fixed plain link

* Fixed comment

* Turned email notifications on by default

This commit adds the code to turn email notifications on by default

* Fixed email styles

* Fixed typo

* Renamed method "possible_send" as "run"

* Removed unnecessary control

* Fixed another typo

* Renamed method as "get_notification_email_addresses"

* Refactored method "send_merchant_notification"

* Renamed plain-merchant-notification

* Fixed tests

* Merchant email notifications - Action triggering (https://github.com/woocommerce/woocommerce-admin/pull/5976)

* Added templates

# Conflicts:
#	includes/emails/plain-mechant-notification.php

# Conflicts:
#	includes/emails/html-merchant-notification.php

* Added note action triggering

This commit adds the note actions triggering

# Conflicts:
#	includes/emails/html-merchant-notification.php

* Fixed error handling

* Refactored "trigger_note_action" method

* Fixed actions url

* Fixed note URL

* Added external redirect

* Added image and html handling for email

* Fixed tests

* Fixed buttons style

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Add your first product: email notification (https://github.com/woocommerce/woocommerce-admin/pull/6024)

* Added AddFirstProduct note

# Conflicts:
#	src/Events.php

* Added "AddFirstProduct" email note

This commit adds the email note "AddFirstProduct"

* Fixed image

This commit removes the image img-product-light.svg to use a png instead. Otherwise, the gmail proxy would break the image

* Fixed readme.txt

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>

* Added readme.txt

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-01-12 21:09:22 -03:00
Joshua T Flowers 0b3f4d8e92 Try: Replace Accordion with Panel component (https://github.com/woocommerce/woocommerce-admin/pull/5970)
* Use Panel for Activity Panels

* Update styling for panels in activity panels

* Remove Accordion component

* Add collapsible param to activity panel tests

* Fix errant comma

* Add bottom border to panel header toggle and remove disbled button styling

* Update empty activity card styles

* Add border between activity cards
2021-01-12 16:18:51 -05:00
Joshua T Flowers bc998444a3 Future proof experimental components (https://github.com/woocommerce/woocommerce-admin/pull/5961)
* Possibly use safe Text component

* Possibly use safe navigation components

* Add experimental package

* Update components to import from woocommerce/experimental

* Make experimental package private

* Reference experimental package relatively

* Update packages/experimental/README.md

Co-authored-by: Paul Sealock <psealock@gmail.com>

* Update packages/experimental/CHANGELOG.md

Co-authored-by: Paul Sealock <psealock@gmail.com>

* Update history state instead of mocking getQuery in tests

* Handle PR feedback

* Create excluded externals array and return early

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-01-07 18:57:09 -05:00
Joel Thiessen 2f9598e4ed Adding history listener to support persisted queries for new navigation (https://github.com/woocommerce/woocommerce-admin/pull/5883) 2021-01-07 08:53:31 -08:00
Jeff Stieler 0c951a4652 Reduce Unnecessary Re-renders in Revenue Report (https://github.com/woocommerce/woocommerce-admin/pull/5986)
* Avoid new references in getReportChartData() return.
* Avoid some new references in ReportTable component.
* Avoid some new references, fix cache key for getReportChartData memoization.
* Memoize date package functions used in ReportTable.
* Avoid more new references in RevenueReportTable.
2021-01-07 14:01:45 +13:00
renovate[bot] 1b2f20b6bb Update dependency react-transition-group to v4.4.1 (https://github.com/woocommerce/woocommerce-admin/pull/5950)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-07 12:57:50 +13:00
Sam Seay a2c4a6a306 A/B test creating a business features step for free extensions (https://github.com/woocommerce/woocommerce-admin/pull/5786)
This fixes woocommerce/woocommerce-admin#5287 

Major changes:

1. The `<Form>` component (which is a published component) gets a new optional prop (so its backward compatible), called `onChangeCallback`. This is called when any form value changes, allowing the controlling component to act on individual form changes. This was needed to utilise `<Form>` to revalidate and check if the user could access the next tab. This should not impact existing usages of the `<Form>`, but it could be good to test this.

2. Introduces a new flow for choosing business extensions that was specified in woocommerce/woocommerce-admin#5287 issue description. Please check the issue for reviewing the designs. The simplest way to implement this, ended up being keeping the existing flow intact and where necessary copy pasting code from those components into the new flow. This new flow is only shown if your segmentation matches the following: `Stores that selected the US as the country and Other or Food & Drinks as the industry
2021-01-07 11:08:57 +13:00