Commit Graph

1996 Commits

Author SHA1 Message Date
Tomek Wytrębowicz da14803c64 Add fancy placeholders for Marketing components (https://github.com/woocommerce/woocommerce-admin/pull/5611)
- Add placeholders for `RecommendedExtensionsItem` and `KnowledgebaseCardPost`. Addresses https://github.com/woocommerce/woocommerce-admin/issues/5375.
- Fix translation of "By" in KnowledgeBase Card. Addresses https://github.com/woocommerce/woocommerce-admin/pull/5611#discussion_r525406563 (comment).
2020-11-23 11:15:07 +01:00
Moon edde19a7fb Stripe - Remove redundant text (https://github.com/woocommerce/woocommerce-admin/pull/5701)
* Remove redundant text

* Remove stripe subtext
2020-11-20 14:48:58 -08:00
louwie17 76954a5e23 Continue showing tasklist even if list is complete, only hide if set to hidden (https://github.com/woocommerce/woocommerce-admin/pull/5673) 2020-11-20 14:46:47 -04:00
Matt Sherman f5f222096a Always call onRemove when action is clicked in Snackbar (https://github.com/woocommerce/woocommerce-admin/pull/5703) 2020-11-19 19:59:49 -05:00
Matt Sherman 64b40a9e39 Fix typo in classname that prevented explicit dismissal button not being styled correctly (https://github.com/woocommerce/woocommerce-admin/pull/5700) 2020-11-19 19:01:57 -05:00
Jeff Stieler daebc45ac9 Fix snackbar dismissal bug (https://github.com/woocommerce/woocommerce-admin/pull/5696)
* Fix hook dependencies.

* Dismiss notices from both stores.

* Pass onRemove2 prop to SnackbarList

Co-authored-by: Matt Sherman <matt@jam123.com>
2020-11-19 16:51:47 -05:00
Rasmy Nguyen b007043d94 Remove check for Jetpack and WCS from Stripe onboarding task (https://github.com/woocommerce/woocommerce-admin/pull/4933)
* Remove check for WC Services and Jetpack

As part of work to move stripe connect logic to the Stripe plugin, this removes the WC Services and Jetpack dependencies from the stripe onboarding flow in WC-Admin.

This also adds a ToS prompt to the stripe OAuth onboarding task. Because we
are removing the Jetpack and WC Services dependencies for Oauth, it is
no longer clear that data will be shared with WC. As such we need to add
this notice.

Further, this adds a link to revert to manual config so that merchants
can opt-out of sharing data with WC.
2020-11-19 02:00:53 +00:00
Joel Thiessen 4e5fa5cee9 Hiding primary tabs on Settings within WooCommerce since it's redundant with items in nav (https://github.com/woocommerce/woocommerce-admin/pull/5630)
* Hiding tabs displayed on wc-status pages as well
2020-11-18 15:54:24 -08:00
Matt Sherman ad78576cf4 Record Tracks events when CES notice/snackbar and modal is viewed (https://github.com/woocommerce/woocommerce-admin/pull/5648) 2020-11-18 15:53:52 -05:00
Sam Seay be47d9d795 Only import the Gridicons we need, to reduce package size. (https://github.com/woocommerce/woocommerce-admin/pull/5668) 2020-11-19 09:52:24 +13:00
Fernando 649cb0f6ad Fixed orders panel flickering (https://github.com/woocommerce/woocommerce-admin/pull/5655)
* Fixed orders panel flickering

This commit fixes the orders panel flickering when Gutenberg is activated

* Fixed badge flickering

* Removed unnecessary line

* Fixed items selector

This commit fixes the items selector. The method 'getItemsTotalCount' was returning the 'defaultValue' instead of the 'totalCount' when  its value was 0

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-11-18 15:59:46 -03:00
Joel Thiessen f8e053dcb4 Renaming navigation body classes to be less generic (https://github.com/woocommerce/woocommerce-admin/pull/5660) 2020-11-18 10:43:20 -08:00
Moon af4c268742 Add key to the component to fix the warning and unexpected behavior (https://github.com/woocommerce/woocommerce-admin/pull/5661) 2020-11-18 15:29:18 -03:00
Fernando e5cf64cb14 Fixed Link component prop (https://github.com/woocommerce/woocommerce-admin/pull/5653)
* Fixed Link component prop

This commit fixes a Link component prop name

* Fixed Link prop

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-11-18 12:31:21 -03:00
Bec Scott ff923bcb82 Add support for an explicit dismiss button to snackbar, as well as an onDismiss callback (https://github.com/woocommerce/woocommerce-admin/pull/5623)
* Add support for an explicit dismiss button to snackbar, as well as an onDismiss callback

* Fix effect dependencies

* Fix disabling auto-dismiss when explicit dismissing is on, fix cursor styles

* fix noops and dismiss on action

* refactor action click handler

* rename dismiss button class

* increase CES modal placeholder z index

* white. space.

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-18 12:15:42 +10:00
Joel Thiessen b3e094889a Preventing desktop-sized navigation placeholder from appearing on mobile during load (https://github.com/woocommerce/woocommerce-admin/pull/5616) 2020-11-16 10:11:13 -08:00
louwie17 7a2a361cb8 Update panel icon order - moving help tab far right (https://github.com/woocommerce/woocommerce-admin/pull/5624)
* Allows tabs component to render custom tab components, removing the need for showDisplayOptions

* Add display options logic to getTabs function

* Update const name from PR review suggestion
2020-11-16 09:48:50 -04:00
Jeff Stieler 3857d03e1d Fix WCS slug. (https://github.com/woocommerce/woocommerce-admin/pull/5614)
Tracks data was checking FB install instead.
2020-11-13 15:31:18 -05:00
Bec Scott fde504f9d6 Fix reference to navigation package and fix transient notices so it looks at core/notices as well as core/notices2 (https://github.com/woocommerce/woocommerce-admin/pull/5583)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-13 11:21:06 +10:00
Bec Scott 0b721d4461 Add icon to snackbar (https://github.com/woocommerce/woocommerce-admin/pull/5563)
* Add an icon to the snackbar displayed for CES

* Change icon from SVG to a unicode emoji pencil

* formatting changes to satisfy CI

* bump ci

* Fix prop types and jsdocs for the customer effort score component

* whitespace >:-(

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-13 10:53:28 +10:00
Joel Thiessen b8238d91dc Adding wrapper class around navigation to implement scroll styles/logic (https://github.com/woocommerce/woocommerce-admin/pull/5570) 2020-11-12 09:10:42 -08:00
louwie17 aebd120a16 Replaced default inbox message styling with message-is-unread styling, and deleted message-is-unread styles (https://github.com/woocommerce/woocommerce-admin/pull/5573) 2020-11-12 08:47:40 -04:00
Joshua T Flowers 4dde76e01c Update non-wca pages registered with nav to embed pages (https://github.com/woocommerce/woocommerce-admin/pull/5606)
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-11-11 16:27:26 -05:00
Fernando 0e78190fb2 Home screen - Fixed the orders not displaying bug (https://github.com/woocommerce/woocommerce-admin/pull/5590) 2020-11-12 09:28:44 +13:00
Paul Dechov 2b89b403ff Task List: Match Stripe settings to mode of provided keys (https://github.com/woocommerce/woocommerce-admin/pull/5353)
* Match settings to mode of provided keys

* Add validation error for mismatched mode edge case

* Tweak key validation error message for conciseness

* Add test mode case to method's isConfigured check

* Refactor stripe method isConfigured logic for clarity

* Fix small error message typo
2020-11-11 17:09:44 -03:00
Joel Thiessen db6a404ba8 Refactoring logic handling auto-folding navigation to support resize event (https://github.com/woocommerce/woocommerce-admin/pull/5578) 2020-11-11 11:44:58 -08:00
Joshua T Flowers cae0f33e38 Fix non-matching items and post type matching (https://github.com/woocommerce/woocommerce-admin/pull/5593)
* Don't match menu items with a non-positive score

* Match single post type page to post type menu item
2020-11-11 10:16:12 -08:00
Sam Seay 7d32d6db0e Change rendering of homescreen layout so store links are last (https://github.com/woocommerce/woocommerce-admin/pull/5579)
* Change rendering of homescreen layout so store links are last.

* Render in left column in 2 column mode.

* Revert accidental log changes.

* Make homescreen layout component width-aware.

Potentially toggle the two column styling when viewport width changes.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-11-11 12:20:15 -05:00
Jeff Stieler c794428710 Fix column scroll collision after layout change. (https://github.com/woocommerce/woocommerce-admin/pull/5586)
* Reset homescreen column stickiness when layout changes.

* Close display options menu when making a selection.
2020-11-11 12:19:24 -05:00
Sam Seay 908f8babb9 Fix a bug where the modal would display even when dismissed. (https://github.com/woocommerce/woocommerce-admin/pull/5581) 2020-11-11 13:23:33 +13:00
louwie17 89b88bd620 Add help tab to the home screen (https://github.com/woocommerce/woocommerce-admin/pull/5538)
* Show help tab always on homescreen, update help icon, and fix tests

* Add items to help menu for homescreen, when taskName is blank

* Add test for homescreen items when taskName is blank

* Add or case for showing help for performingSetupTask, incase setup happens on annother route

* Removed tabindex logic to allow for keyboard navigation when multiples tabs are available

* Update activity panel height and top when new navigation experience is enabled

* Moved style back into scss wrapper and used parent selector - &
2020-11-10 09:36:04 -04:00
Paul Sealock 29f1d823fe Fix homescreen id on client (https://github.com/woocommerce/woocommerce-admin/pull/5564) 2020-11-10 12:02:26 +13:00
Timmy Crawford 95dfca5983 Customers: Update column heading for date registered. (https://github.com/woocommerce/woocommerce-admin/pull/5542) 2020-11-09 13:23:22 -08:00
Moon ad4a0371c3 Add onsubmit_label string that can be used to create a snackbar upon … (https://github.com/woocommerce/woocommerce-admin/pull/5544)
* Add onsubmit_label string that can be used to create a snackbar upon survey submission

* Make onSubmitLabel required
2020-11-09 11:09:04 -08:00
Bec Scott 4cde62561a Copy the snackbar component from Gutenberg into wp-admin (https://github.com/woocommerce/woocommerce-admin/pull/5532)
* Copy the snackbar component from Gutenberg into wp-admin

* Copy @wordpress/data in from Gutenberg

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-11-09 17:17:08 +10:00
Joel Thiessen c8a67bfef9 Navigation: Adding ability for new navigation to scroll when list of links exceed viewport height (https://github.com/woocommerce/woocommerce-admin/pull/5524)
* Adding ability for new navigation to scroll when list of links exceeds the viewport height

* Resetting scroll to the top of element when transitioning menus on navigation
2020-11-06 12:52:01 -08:00
Sam Seay 536f426525 Do a refresh when redirecting to homescreen after OBW to ensure inbox notifications show. (https://github.com/woocommerce/woocommerce-admin/pull/5547) 2020-11-06 16:52:57 -03:00
Jeff Stieler 041aec8ff9 Homescreen layout changes (https://github.com/woocommerce/woocommerce-admin/pull/5465)
* Migrate homescreen specific backend code to its own class.

* Default to single column homescreen.

Create an option to handle the default homescreen layout value.

* Potentially reset sticky column when layout is changed.

* Move homescreen components to their new locations.

* Clean up defunct CSS.

* Default to the two-column layout on existing stores.

* Remove header from inbox notes.

* Add "your store today" header on two column homescreens.

* Set default homescreen layout to two columns when task list is complete or hidden.

* Remove unused variables.

* Add sticky scrolling behavior to both homepage columns.
2020-11-06 12:53:03 -05:00
Fernando f739d1feac Added support for custom actionable statuses (https://github.com/woocommerce/woocommerce-admin/pull/5550)
* Added support for custom actionable statuses

This commit adds support for custom actionable statuses

* Fixed styles

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-11-06 13:50:24 -03:00
Timmy Crawford 8e5e410605 Add missing text domain on home screen stats. (https://github.com/woocommerce/woocommerce-admin/pull/5541) 2020-11-06 08:36:33 -08:00
Fernando 6ae4c5fbfd Home Screen - migrated orders panel (https://github.com/woocommerce/woocommerce-admin/pull/5455)
Fixes woocommerce/woocommerce-admin#5238
2020-11-06 14:21:05 +13:00
Joel Thiessen c73bafbd09 Store Profiler - include Creative Mail as a free extension (https://github.com/woocommerce/woocommerce-admin/pull/5543)
* Include Creative Mail as a free extension in onboarding wizard on main flow
2020-11-05 16:55:44 -08:00
Joshua T Flowers 88a4ed76eb Try: Register plugins under separate navigation menu (https://github.com/woocommerce/woocommerce-admin/pull/5513)
* Create separate methods for registering plugin items

* Fix add plugin category

* Allow scrolling of nav menu

* Use group title

* Add example plugin items

* Make menu item and category methods private

* Add analytics pages to navigation

* Register home item if dashboard feature is enabled

* Allow navigation registration from all wca items

* Update example plugin item registration

* Update order of menu groups

* Update plugins group name to extensions

* Remove temporary scroll fixes
2020-11-05 09:00:04 -05:00
Sam Seay 5c50c4cc03 Restyle the setup task list to match new designs (https://github.com/woocommerce/woocommerce-admin/pull/5520)
Dev: Add the new `<Badge>` component to @woocommerce/components
Dev: Restyle the setup task list header to display incomplete tasks
2020-11-05 10:48:26 +13:00
Bec Scott 2bdab078e0 Use snackbar before CES modal (https://github.com/woocommerce/woocommerce-admin/pull/5406)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Use an interstitial snackbar to trigger the CES modal

* Moved notice (snackbar) into @woocommerce/customer-effort-score

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* drop initiallyVisible from container

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-04 10:48:56 +10:00
Sam Seay 06f9248572 Reorganize the store management link section and provide extensibility (https://github.com/woocommerce/woocommerce-admin/pull/5476)
Rearrange the store management links under categories and expose extensibility via the `woocommerce_admin_homescreen_quicklinks` filter.
2020-11-04 13:33:04 +13:00
Bec Scott 17c149f66e Only allow Customer Effort Score gathering if tracking is allowed (https://github.com/woocommerce/woocommerce-admin/pull/5365)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Display CES modal once per event per store

* Remove TODO

* appease the formatting gods

* Use Loader::load_features instead of DIY

* Drop CustomerEffortScoreTracks singleton

* Fix tracks event name

* Only add the CES JS if tracking is allowed

* Only display the CES modal if tracking is allowed

* bump ci

* Pull package-lock.json from main

* Refactor to remove some duplication

* Revert to keep toggleVisible etc

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-04 10:30:34 +10:00
Bec Scott 00eeede732 Display CES modal once per action per store (https://github.com/woocommerce/woocommerce-admin/pull/5352)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Display CES modal once per event per store

* Remove TODO

* appease the formatting gods

* Use Loader::load_features instead of DIY

* Drop CustomerEffortScoreTracks singleton

* Fix tracks event name

* bump ci

* Pull package-lock.json from main

* Refactor to remove some duplication

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-03 11:57:47 +10:00
Joel Thiessen 15b45c9db4 Navigation: Applying styles & behavior for folded menu, including mobile (https://github.com/woocommerce/woocommerce-admin/pull/5497)
* Adding base styles for collapsed nav menu.

* Handling varying behaviour on mobile-sized screens, with the menu overlaying content instead of shrinking the content area.

* Folding the menu by default on screen sizes less than 960px, and if that condition is met after an orientation change

* Refactoring logic from Header/index.js to flag if user has scrolled to apply shadow to folded navigation as well.

* Refactoring styles in navigation feature to allow them to be loaded properly with webpack (with imports/etc).
2020-11-02 16:57:49 -08:00
Bec Scott 0a1cec3d4e Only show CES survey on correct page (https://github.com/woocommerce/woocommerce-admin/pull/5511)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* Only show the CES survey in the correct screen

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-02 16:08:17 +10:00
Bec Scott 1e1e428354 Add store age to CES tracked data (https://github.com/woocommerce/woocommerce-admin/pull/5373)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

* Only display the CES modal if tracking is allowed

* Move MONTH constant into @woocommerce/data

* Remove unused const

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-11-02 13:47:15 +10:00
Matthew Harris f284638c7b Fix wrong casing used on the PayPal brand name (https://github.com/woocommerce/woocommerce-admin/pull/5514) 2020-11-02 15:22:50 +13:00
Joshua T Flowers 197320d93e Update navigation width to match designs (https://github.com/woocommerce/woocommerce-admin/pull/5489) 2020-10-30 14:02:22 -04:00
Joshua T Flowers aaaa82779b Prevent double fill of Customers nav slot (https://github.com/woocommerce/woocommerce-admin/pull/5495) 2020-10-30 11:28:34 -04:00
Bec Scott f29995124c Basic customer effort score survey functionality (https://github.com/woocommerce/woocommerce-admin/pull/5324)
* Spike out customer effort score

* Refactor CustomerEffortScore as Package (https://github.com/woocommerce/woocommerce-admin/pull/5342)

* Tidy up _webpack.config.js

* Fix linter issues

* refactor setting up CES tracking, add try..catch around loading from localStorage

* Add CES feature toggle (https://github.com/woocommerce/woocommerce-admin/pull/5387)

* Add feature toggle to only enable the customer effort score in development

* Move check into Loader

* fix logic 🙄

Co-authored-by: Rebecca Scott <me@becdetat.com>

* Add client-side check of the feature flag

* fix tabs in config

* Fix comment

* Use product lifecycle and options

* Add product count to tracks props

* Use Loader::load_features instead of DIY

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
2020-10-30 16:52:52 +10:00
Gan Eng Chin 4a28c61d86 Import @wordpress/base-styles/default-custom-properties in CSS file. (https://github.com/woocommerce/woocommerce-admin/pull/5491)
This is to get the root admin scheme color, so that we can use --wp-admin-theme-color in CSS.
2020-10-30 08:33:48 +13:00
Gan Eng Chin 43a54106f3 Convert the marketing tab cards to use the new @wordpress/components Card component. (https://github.com/woocommerce/woocommerce-admin/pull/5428)
* Change WooCommerce Card to WordPress Card in the WelcomeCard component.

Use isElevated and margin-bottom to make the Card look close to previous UI.

* Use WordPress Card in KnowledgeBase.

For the description in Card header, it will be rendered as a p element instead of h2, which should be more semantically correct. Test is updated to reflect this.

* Add Card component wrapper that supports title and description props.

* Use WordPress Card component wrapper in recommended extensions.

* Code refactor to use WordPress Card wrapper.

* Use WordPress Card wrapper in installed extension.

* Use margin-bottom for children layout at the parent CSS level.

* Add test for Card.

* Fix no margin between cards in Coupons page, and remove previous css for WooCommerce Card.

* Remove old WooCommerce Card css.

* Don't use isElevated in Card, to match the style in WooCommerce Home screen.

* Make item border color consistent with WordPress Card in Installed Extension card.

Use WordPress Card without CardBody here because we don't want the padding from CardBody.

* Make the card description look similar to previous WooCommerce Card description.

* Fix spelling in CSS class names.

* Fix WooCommerce spelling in comment.

* Change the Marketing Card style to match with WooCommerce Home style.

Also change the text gray color to use CSS variable instead of hardcoded gray value.

Also remove the usage of h2 in the Card header to follow WooCommerce Home style.

* Use $gray-200 as light borders between items in card.

* Remove unneeded CSS code based on TODO in comment.
2020-10-23 14:41:45 +08:00
Gan Eng Chin f5432beb72 Display a "read blog" message (https://github.com/woocommerce/woocommerce-admin/pull/5453)
* Display a "read blog" message when there is an error in getting blog posts or there is no blog posts.

* Simplify ReadBlogMessage with interpolateComponents and Link.
2020-10-23 14:07:58 +08:00
Joel Thiessen 3c62e171da Navigation: Adding Tracks by tying into wc-admin page view (https://github.com/woocommerce/woocommerce-admin/pull/5466)
* Adding 'has_navigation' flag to tracks pageView events to indicate if new navigation is enabled (https://github.com/woocommerce/woocommerce-admin/pull/5332)

* Testing if navigation is active using window.wcNavigation instead of window.wcAdminFeatures to handle the edge case of a single page opting out
2020-10-22 15:13:57 -07:00
Jeff Stieler eefe2e8acc Add Homescreen layout control (https://github.com/woocommerce/woocommerce-admin/pull/5429)
* Remove inbox-specific class, widen single column.

* Create user preference for homescreen column layout.

* Add display options "tab" to homescreen.

* Style display options.

* Tweak homepage layout option values.

* Add tracks events for homepage layout.

* Add test coverage for homescreen display options.

* No need to use Fragment component.

* Use named exports.

* Fix display options styling on mobile/narrow viewports.

Don't show the options at all if we're forcing single column.

* Fix linting error.
2020-10-22 18:13:14 -04:00
Paul Sealock ff203db3a8 include animate styles (https://github.com/woocommerce/woocommerce-admin/pull/5457) 2020-10-23 10:04:14 +13:00
Joshua T Flowers 11ebc96fbe Show parent as default back button label (https://github.com/woocommerce/woocommerce-admin/pull/5435)
* Show parent as default back button label

* Make back button logic more succinct
2020-10-22 15:56:44 -04:00
Timmy Crawford 22212e83ae Remove no longer used isPanelEmpty logic. (https://github.com/woocommerce/woocommerce-admin/pull/5423) 2020-10-22 08:14:13 -07:00
Paul Sealock 7e351c18a3 Navigation: extend with WC Admin router links (https://github.com/woocommerce/woocommerce-admin/pull/5445)
* add test case

* save

* pages

* comments

* use id

* bail on no wcAdmin pages

* prefix
2020-10-22 16:01:25 +13:00
Joshua T Flowers 84e006cc62 Migrate navigation store to data package (https://github.com/woocommerce/woocommerce-admin/pull/5420)
* Move data store to package and hydrate navigation

* Use wc settings to get site URL and title

* Use wc settings admin link

* Update nav util tests to work with installs in subdirectory
2020-10-21 13:02:45 -04:00
Joshua T Flowers 81a8a28b20 Only show menu group if items exist (https://github.com/woocommerce/woocommerce-admin/pull/5403)
* Only show menu group if items exist

* Improve performance for menu item filtering
2020-10-21 13:01:46 -04:00
Joshua T Flowers c0be4ecb56 Enqueue styles on non-WC pages (https://github.com/woocommerce/woocommerce-admin/pull/5419)
* Enqueue styles on non-WC pages

* Only load extra styles when navigation is enabled
2020-10-20 14:47:11 -04:00
Gan Eng Chin 523eac0131 Display messages for empty content and network request error (https://github.com/woocommerce/woocommerce-admin/pull/5411)
* Code refactor with reducer and new action type SET_ERROR.

* Add default state for errors and code for SET_ERROR for blogPosts.

* Don't use handleFetchError, instead save the error and blogPosts category into redux store.

* Display message for error and empty content.

* Fix grammar; fix relevant test.

* Code refactor: put action type strings in one place.

* Add tests for error UI.

* Remove illustration for empty content with no blog posts.
2020-10-19 23:18:21 +08:00
Sam Seay 91e3e7336d Fix a number of crashes that occur in reports when Gutenberg is active (https://github.com/woocommerce/woocommerce-admin/pull/5409)
Also fix a blank screen issue with rendering reports.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-10-17 07:47:29 +13:00
Timmy Crawford 1a94f54837 Home Screen: Always show the inbox for temporary gutenberg plugin fix. (https://github.com/woocommerce/woocommerce-admin/pull/5416) 2020-10-16 10:35:38 -07:00
Fernando 59f836d55f Show orders, stock and reviews activity panels (https://github.com/woocommerce/woocommerce-admin/pull/5400)
This commit fixes the check to show orders, stock and reviews activity panels

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-15 12:49:46 -07:00
Jeff Stieler 7ca9e691d4 Migrate Enzyme tests to React Testing Library (https://github.com/woocommerce/woocommerce-admin/pull/5299)
* Migrate leaderboard tests to RTL.

* Remove test of default prop value.

* Migrate ReportSummary tests to RTL.

* Migrate ActivityCard tests to RTL.

* Migrate ActivityCardPlaceholder tests to RTL.

* Migrate remaining ProductType tests to RTL.

* Migrate Card tests to RTL.

* Update RTL and user event packages.

* Migrate Date tests to RTL.

* Migrate D3Legend tests to RTL.

* Migrate D3Base tests to RTL.

* Migrate Gravatar tests to RTL.

* Migrate ImageUpload tests to RTL.

* Migrate ProductImage tests to RTL.

* Migrate Rating tests to RTL.

* Migrate Search tests to RTL.

* Migrate Plugins tests to RTL.

* Migrate SelectControl tests to RTL.

* Migrate Timeline tests to RTL.

Remove tests that inspect DOM since there are snapshots.

* Migrate DismissModal tests to RTL.

* Migrate SetupNotice tests to RTL.

* Migrate WelcomeCard tests to RTL.

* Fix setup error reason retrieval in ShippingBanner.

* Migrate ShippingBanner tests to RTL.

* Migrate RecommendedExtensions tests to RTL.

* Migrate KnowledgeBase tests to RTL.

* Rename enzyme setup file, modify to setup RTL.

* No need to import jest-dom in test files.

* Remove enzyme dependency.

* Use snapshot for testing Leaderboard markup.

* Switch from "not to be empty" to "be in the document".

* No need to waitFor() recordEvent mock.

* Be specific about clicking the "hide" button.

* Use toBeVisible() instead of checking style property.
2020-10-15 08:41:39 -04:00
Sam Seay fc030fb007 Migrate the devdocs examples to Storybook CSF stories (https://github.com/woocommerce/woocommerce-admin/pull/5271)
Fixes woocommerce/woocommerce-admin#5234
2020-10-15 14:55:55 +13:00
Joel Thiessen f1ce55041c Adding 24px spacing between any sibling nav groups (https://github.com/woocommerce/woocommerce-admin/pull/5329) (https://github.com/woocommerce/woocommerce-admin/pull/5359)
Adding 24px spacing between any sibling nav groups on new navigation feature (https://github.com/woocommerce/woocommerce-admin/pull/5329)
2020-10-14 11:48:21 -07:00
Fernando 4dd0232c44 Added a check to show the "Store Setup" button (https://github.com/woocommerce/woocommerce-admin/pull/5360)
This commit adds a check to show the "Store Setup" button

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-13 12:51:54 -07:00
Paul Sealock ad7cf64303 Navigation: Add client code (https://github.com/woocommerce/woocommerce-admin/pull/5309)
* is_feature_enabled

* feature class

* copy/paste

* hooked up

* its alive

* add wc-admin items

* clean up entry point

* Analytics remove url

* rebase error

* add back in check is_feature_enabled

* specificity CSS
2020-10-13 14:40:53 +13:00
Paul Sealock c089b49b38 Navigation: Prep feature flags and option (https://github.com/woocommerce/woocommerce-admin/pull/5292)
* add feature flag

* hydrate options on embedded screens

* is_feature_enabled

* feature class

* feedback

* better name

* fix
2020-10-13 13:05:06 +13:00
Jeff Stieler 8a0f580d1b Check for connected JP+WCS and non-ShipStation country for shipping defaults. (https://github.com/woocommerce/woocommerce-admin/pull/5320)
Fix UK country code too.
2020-10-09 13:28:41 -07:00
Bec Scott b8adfaaa94 Shipping task smart default: add exceptions (https://github.com/woocommerce/woocommerce-admin/pull/5312)
* Require Jetpack connected and WCS active to mark the shipping task as complete

* Require country _not_ be in AU, NZ, or UK to mark shipping methods as complete

* Bump CI

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-08 19:18:19 -07:00
Paul Sealock 52137fe3fa bump wp components and base styles (https://github.com/woocommerce/woocommerce-admin/pull/5293) 2020-10-09 12:10:32 +13:00
Fernando 3fb1fbba6a Invalidating cache for "getTasksStatus" (https://github.com/woocommerce/woocommerce-admin/pull/5291)
This commit invalidates the cache for "getTasksStatus" to force a rerequest of the value.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-08 14:25:41 -07:00
Joel Thiessen 23c19ee1b2 Removing breadcrumbs from wc-admin header, replacing with simple titl… (https://github.com/woocommerce/woocommerce-admin/pull/5232)
Removing breadcrumbs from wc-admin header, replacing with simple title (https://github.com/woocommerce/woocommerce-admin/pull/3963)

This is an interim step towards the integration of wc-navigation, where a back button will be provided to restore the critical functionality of the breadcrumbs. Note that the `breadcrumbs` data was preserved since it's still being utilized do construct the document title (in semi-breadcrumb-fashion) on both the backend and front-end.
2020-10-06 13:42:46 -07:00
Fernando 20a14ca689 Added animation to Inbox note deletion (https://github.com/woocommerce/woocommerce-admin/pull/5263)
This commit adds an animation to Inbox note deletion

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-06 11:07:06 -03:00
Fernando 1da4eedbf0 Moved Inbox Panel component (https://github.com/woocommerce/woocommerce-admin/pull/5252)
This commit moves the Inbox Panel component

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-10-06 10:13:32 -03:00
Joel Thiessen 484221c0cd Updating Stripe key field validation to support test keys (https://github.com/woocommerce/woocommerce-admin/pull/4391) (https://github.com/woocommerce/woocommerce-admin/pull/5201)
Updating Stripe key field validation to support test keys (https://github.com/woocommerce/woocommerce-admin/pull/4391)

Currently the form to configure Stripe keys accessed via the task list presents an error when test keys are used. I've updated the validation in order to support the format for test keys as well.
2020-10-05 11:52:12 -07:00
Bec Scott a75d1a5254 Change store details tooltip to a popover (https://github.com/woocommerce/woocommerce-admin/pull/5212)
* Change store details tooltip to a popover

* Change 'skip setup' tooltip to be a popover as well

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-10-02 11:47:08 +10:00
Paul Dechov 4d0e062ee1 Task list: Turn off Stripe test mode when submitting live keys (https://github.com/woocommerce/woocommerce-admin/pull/5226) 2020-09-30 09:24:14 -07:00
Sam Seay 305eff84b3 Fix a bug where the store task list would remain after completion (https://github.com/woocommerce/woocommerce-admin/pull/5205)
* Adjust the logic of display of the store setup link.

* Fix a bug where some values of woocommerce_task_list_complete cause issues with updating.
2020-09-29 08:24:39 -07:00
Fernando 2cf7ea56a8 Onboarding - Store Profiler - Removed selected CBD option for eCommerce plan (https://github.com/woocommerce/woocommerce-admin/pull/5124)
* Added filter to selected industries list

This commit adds a filter to the selected industries list

* Fixed lint error

* Fixed lint issues

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-29 08:10:40 -07:00
Fernando 63f2b9de8b Enlarged store profiler text in two steps (https://github.com/woocommerce/woocommerce-admin/pull/5194)
* Fixed small text in OBW

This commit makes some OBW texts larger

* Fixed list items size

This commit makes the list items in the 2nd step of the OBW larger

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-29 08:04:30 -07:00
Joshua T Flowers 6e8b4bad5f Fix header height and positioning for wc nav (https://github.com/woocommerce/woocommerce-admin/pull/5173)
* Fix header height and positioning for wc nav

* Remove body margin via CSS
2020-09-29 15:57:50 +03:00
Jeff Stieler 264aa8dee4 Add Variations Report (https://github.com/woocommerce/woocommerce-admin/pull/5167)
* Add initial Variations Report to analytics feature.

* Restrict query to variations when not specifying any product IDs.

* Add route to get variations without specifying a parent.

* Move variations table component to variations report directory.

* Add missing LIMIT clause to variations report query.

* Remove broken features from Variations table.

* Add Variations report controller to CSV emailer.

* Add initial Variation Stats endpoint, based on Product Stats.

* Hook Variations Report components up to new stats endpoint.

* Hook attribute filter up to variations report queries.

* Remove variation title filter usage.

See: https://github.com/woocommerce/woocommerce-admin/pull/5100

* Use filtered separator in variation name formatting.

* Add "single variation" to variations report, fix autocompleter API request.

* Fix segmentation by variation.

* Add comparison to variations report.

* Always include manually specified variations in report results.

* Fix variations report table comparison mode.

The ReportTable component expects the `filter` query param.

* Fixing styling of compare button without table search component.

* Add variation filter to Orders report.

* Link orders count to orders report filtered by variation.

* Orders report: include variation attributes in product names.

* Further style tweaks for variations report download button.

* Add variations filter to order stats query.

* Clean up "category includes" login in REST controllers.

Prep for "category excludes" in the Variations report.

* Support category exclusion in report filters.

* Fix filter param used by the variation report table component.

* Add category filter to variations report.

* Fix initial selected ReportTable rows when using non-default compareParam.

* Add a new autocompleter for variable products.

* Add products filter to variations report.

* Fix tests.

* Handle variation IDs that are no longer found.

* Add documentation.

* Use getSetting() instead of directly accessing window properties in client code.

* Fix ordering Variations by SKU.
2020-09-25 09:57:48 -04:00
Fernando 1f667456b2 Modified "Skip setup wizard" button text (https://github.com/woocommerce/woocommerce-admin/pull/5196)
This commit changes the "Skip setup wizard" button text to "Skip setup store details"

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-25 08:48:14 -03:00
Sam Seay e6d5786d1b Adjust the logic of display of the store setup link. (https://github.com/woocommerce/woocommerce-admin/pull/5180) 2020-09-25 09:23:27 +12:00
Fernando ce3dab196e Renamed task list item (https://github.com/woocommerce/woocommerce-admin/pull/5190)
This commit renames the task list item "Store wizard" to "Store details"

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-24 08:53:13 -03:00
Joshua T Flowers 12ffd61133 Show payments task for non-US stores when wcpay installed (https://github.com/woocommerce/woocommerce-admin/pull/5166) 2020-09-23 05:55:19 -07:00
Fernando 4aa01340ab Store Profiler - Industry: reduced padding and removed industry (https://github.com/woocommerce/woocommerce-admin/pull/5157)
* Reduced list padding

This commit reduces the industries list "padding" and its "min-height"

* Removed item from industries list

This commit removes the item "Art, Music & Photography" from the industries list

* Fixed e2e tests

This commit fixes the e2e tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-22 09:20:42 -03:00
Sam Seay b492a2aa15 Use 'yes' to update modal dismiss option. (https://github.com/woocommerce/woocommerce-admin/pull/5152)
Fixes a bug in Atomic sites where dismissing the home screen modal would not set the option causing the modal to come back on each reload.
2020-09-19 08:19:55 +12:00
Paul Sealock 328075abb7 Remove ` @woocommerce/wc-admin-settings` from data package (https://github.com/woocommerce/woocommerce-admin/pull/5158)
* remove getAdminLink

* prep for package release

* correctly pass in args

* tests
2020-09-18 14:22:52 +12:00
Francesco 36f61c89f1 chore: rename WCS to WC Shipping & Tax (https://github.com/woocommerce/woocommerce-admin/pull/5139) 2020-09-16 16:45:16 -05:00
Bec Scott 90567853de Enable the home screen for everybody (https://github.com/woocommerce/woocommerce-admin/pull/5108)
* One-shot to enable the homescreen for everybody

* Make the home page the default (only) experience

* remove option check in activity panel tabs, get tests working, fix lint issues

* Remove is-homescreen CSS class

* Remove extra home page route registration

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-15 09:44:46 +10:00
Bec Scott 5310944f17 Add option to not charge sales tax (https://github.com/woocommerce/woocommerce-admin/pull/5111)
* Add option to not set up sales tax

* Correct JS lint errors

* Add abort option to plugin step

* Inline redirect to home page

* Use testing-library/react for the new test

* Also set woocommerce_calc_taxes to 'no'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-14 08:50:02 +10:00
Adrian Duffell 7cd9e7f929 Remove the chevron icons from the “Finish setup” task list (https://github.com/woocommerce/woocommerce-admin/pull/5114)
* Remove the chevron icons from the “Finish setup” task list

* Add a data-testid attribute to the TaskDashboard dismiss button for testing

* Add test for dismiss button in TaskDashboard component
2020-09-11 14:09:17 +08:00
Jeff Stieler 35ee9901bc Avoid changing product titles by removing variation title filter usage. (https://github.com/woocommerce/woocommerce-admin/pull/5100)
* Remove use of `woocommerce_product_variation_title_include_attributes` filter.

* Use attribute values in product variation titles.

* Include attribute values in product variation name during segmentation.

* Include attribute values in product variations autocompleter query.
2020-09-09 09:29:10 -04:00
Bec Scott cd128488df Add initial end to end test suite (https://github.com/woocommerce/woocommerce-admin/pull/5028)
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2020-09-04 14:31:09 +12:00
Timmy Crawford 6e419e14ee Onboarding: Add TOS note to bundle install. (https://github.com/woocommerce/woocommerce-admin/pull/5096) 2020-09-03 16:35:06 -07:00
Paul Sealock 3c6483e842 Remove wc api 🎉 (https://github.com/woocommerce/woocommerce-admin/pull/5075)
* remove wc-api selects and constansts

* remove extendedItems dependence on wc-api

* remove wc-api

* PR feedback
2020-09-04 09:45:40 +12:00
Jeff Stieler ebfd28a9e6 Add product attribute filter to Orders Report. (https://github.com/woocommerce/woocommerce-admin/pull/5068)
* Add product attribute filter to Orders report config.

* Add attribute args to Orders report controller.

* Include attribute filters in orders report query.

* Add attribute args to Orders Stats report controller.

* Include attribute filters in orders report stats query.

* Add test for product attribute filter in orders report.

* Add tests for invalid parameter values.

* Add tests for product attribute filter in order stats endpoint.

* Fix tests for PHP 5.6 and WC 3.8.x.
2020-09-03 10:08:06 -04:00
Jeff Stieler 8814f6b46a Fix `analytics_filters_filter` event props. (https://github.com/woocommerce/woocommerce-admin/pull/5079) 2020-09-03 10:04:04 -04:00
Sam Seay 2146ccb78e Add an automated taxes smart default (https://github.com/woocommerce/woocommerce-admin/pull/5076) 2020-09-03 14:56:52 +12:00
Bec Scott b4fef3059c Add ToS agreement copy to the WCPay setup task (https://github.com/woocommerce/woocommerce-admin/pull/5085)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-03 12:28:31 +10:00
Bec Scott b5f9cf5fcd New marketing copy for the Kliken Google Ads plugin (https://github.com/woocommerce/woocommerce-admin/pull/5074)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-02 13:42:04 +10:00
Fernando 29e2dbffc9 Migrated "import" store to "wp.data" (https://github.com/woocommerce/woocommerce-admin/pull/4982)
* Migrated the "import" store to "wp.data"

This commit migrates the "import" store to "wp.data"

# Conflicts:
#	client/analytics/settings/historical-data/layout.js
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

# Conflicts:
#	packages/data/src/index.js

* Added error handling

This commit adds error handling to the apiFetch

* Fixred reducer.js

* Added reducer.js tests

* Removed "endpoint" references

* Tests fixed

* Removed old import store files and wc-api-spec import references

This commit removes old import store files and "wc-api-spec" import references

# Conflicts:
#	client/wc-api/wc-api-spec.js

# Conflicts:
#	client/wc-api/wc-api-spec.js

* Added interval to invalidate resolution of getImportStatus

* Fixed timestamp

* Store dependency removed

* Fixed reimport functionality

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Refactored layout.js

* Refactored clearCache method

* inProgress check refactored

* Using activeImport from store

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed console warning

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Migration done!

# Conflicts:
#	client/analytics/settings/historical-data/index.js

* Fixed hasImportFinished

* Test fixed

* Removed "setImportFinished" from actions.js and index.js

* Added style to disabled button

* Fixed incorrect "Finalizing"  status

* Fixed tests

* Fixed notes update on importation start

* Removed local constants

* Removed css for disabled button

* Typo corrected

* Fixed param for getImportError method

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-09-01 10:21:31 -03:00
Sam Seay fb03e64ced Profile wizard style consistency updates (https://github.com/woocommerce/woocommerce-admin/pull/5059)
Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-09-01 20:47:49 +12:00
Bec Scott 440137b555 Show usage modal when skipping the OBW (https://github.com/woocommerce/woocommerce-admin/pull/5061)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-09-01 10:16:53 +10:00
Chris Shultz 570de23747 Stop using missing installPlugin function and fix WCS 1.24 compatibility (https://github.com/woocommerce/woocommerce-admin/pull/5025)
* Update Shipping Banner to use installPlugins since installPlugin has been removed.

* Fix shipping banner compatibility with WCS 1.24.

* Update metabox content to match WC 4.5 metaboxes.
2020-08-31 08:13:14 -07:00
Joshua T Flowers 94db7f7f76 Add monthly pricing toggle to product types (https://github.com/woocommerce/woocommerce-admin/pull/5015)
* Add monthly pricing toggle

* Move product type label to its own folder

* Add popover to product type label

* Add card help text

* Add product type component tests

* Add tests for product types step

* Refactor validation in product types

* Export ProductTypes component for testing
2020-08-28 15:39:24 +03:00
Paul Sealock 7e7064e38c Fix components internal deps (https://github.com/woocommerce/woocommerce-admin/pull/5018)
* Fix components internal deps

* Pass full response

* remove errant comment
2020-08-28 11:55:48 +12:00
Bec Scott b64efcb2e8 Tweak button padding so it works on Safari (https://github.com/woocommerce/woocommerce-admin/pull/5043)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-28 09:00:12 +10:00
Jeff Stieler 650ecac14a Add "Product Attribute" advanced report filter. (https://github.com/woocommerce/woocommerce-admin/pull/5038)
* Simplify variation name logic.

* Remove errant commas from variation autocomplete options.

* Add single variation filter to products report.

* Include more variations in search results.

Also trim the response fields down.

* Add initial AttributeFilter component.

Only selected of attribute names for now.

* Add attribute term selection control.

* Position attribute filter inputs side by side.

* Add loading indicator to attribute term control.

* Clear term when attribute value changes, and handle backspaces.

* Generate screen reader text.

* Translate filter labels, add field separator.

* Improve grammar in screen reader text.

* Fix lint errors.
2020-08-27 08:11:12 -04:00
Jeff Stieler 5e7f2af61d Rename "profile" to "store details". (https://github.com/woocommerce/woocommerce-admin/pull/4965)
* Rename "profile" to "store details".

* Missed some /profiler links.

* Fix linter error.

* Store details => Setup Wizard.

* Rename task list item.
2020-08-27 08:10:23 -04:00
Sam Seay c0c9a20f73 Fix a bug where an event's data was recorded in camel case. (https://github.com/woocommerce/woocommerce-admin/pull/5051)
Fixes woocommerce/woocommerce-admin#4464 

`wcadmin_tasklist_shipping_label_printing` events were being filtered into rejected events because the data being passed was in camel case instead of snake case. This fixes that issue.
2020-08-27 14:26:59 +12:00
Sam Seay c884f96bf9 Add WooCommerce Mobile App Banner Ad for Android and iOS (https://github.com/woocommerce/woocommerce-admin/pull/5037)
Fixes woocommerce/woocommerce-admin#4654 

The feature calls for a mobile app ad banner to be displayed to users on mobile devices.

Based on the discussion in woocommerce/woocommerce-admin#4654 this implements the following:

1. [an iOS Smart App Banner](https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html). This banner is a meta tag that is generated in PHP. It will only display on iOS devices. One note about this: **This tag is not directly trackable like the implemented Android banner. If we would like to track its success then I believe [these instructions are relevant](https://stackoverflow.com/questions/12906502/is-it-possible-to-track-click-throughs-from-iphone-smart-banner/20422334woocommerce/woocommerce-admin#20422334)**. 

2. A mobile app banner ad that **only displays on Android** and only displays at the `738px` breakpoint specified in the issue. To only display this banner ad on Android, we use basic checking of the user agent string. I weighed this up against other approaches and for this kind of niche use case a simple UA string check is (imho) still the best way to do this.

3. The banner ad makes use of user preferences to retain a per user setting that determines if that user has dismissed the Android banner. We don't/can't do anything like this for the iOS Smart App Banner (but in theory we shouldn't need to).
2020-08-27 13:46:53 +12:00
Timmy Crawford 0374d48849 Onboarding: Do not show extensions bundle test if CBD is selected. (https://github.com/woocommerce/woocommerce-admin/pull/5040) 2020-08-26 09:15:02 -07:00
Timmy Crawford dd799b0504 Clean up copy/paste (https://github.com/woocommerce/woocommerce-admin/pull/5039) 2020-08-26 09:14:31 -07:00
Joshua T Flowers d4dd74e44a Remove onboarding feature flag and a/b testing (https://github.com/woocommerce/woocommerce-admin/pull/4999)
* Remove store page creation during new onboarding experience

* Remove onboarding feature flag

* Add back in onboarding feature flag to enable feature loading
2020-08-25 00:51:41 +03:00
Jeff Stieler eea63f602f Refactor task list status to onboarding data store. (https://github.com/woocommerce/woocommerce-admin/pull/4998)
* Add onboarding task status API endpoint.

* Add task status to onboarding data store.

* Update appearance task to use onboarding store for status info.

* Update main task list component to use onboarding data store for status info.

* Clear onboarding status info "cache" when setting shipping rates in the task list.

* Clear onboarding status info "cache" when enabling payment methods from the task list.

* Fix onboarding data store reducer tests.

* Clean up redundant code, nest task status settings under new key for hydration.

* Include tasks status in onboarding data hydration.

* Update tax task to use onboarding data store for status info.

* Avoid continually rehydrating onboarding data.

* Refactor payment task method retrieval to use onboarding data store.

* Fix bug with disappearing appearance tax steps.

* Update appearance completion faster by using hydrated onboarding value.

* Avoid PHP warnings when onboarding isn't enabled.

* Remove unused imports.
2020-08-24 09:20:57 -04:00
Joshua T Flowers f2771ab449 Add complete and incomplete task counts to tasklist_complete event (https://github.com/woocommerce/woocommerce-admin/pull/5000) 2020-08-24 14:19:36 +03:00
Sam Seay e61548d2c5 Refactor the Header component from class to function. (https://github.com/woocommerce/woocommerce-admin/pull/5023)
Working towards woocommerce/woocommerce-admin#4654 this refactors the `<Header>` component to be functional so that it can use hooks. The plan is to use the `useUserPreferences` hook there to determine if the mobile banner should be rendered or not.
2020-08-24 10:46:18 +12:00
Paul Sealock 74e8d7622e Items dataStore: Migrate from wc-api (https://github.com/woocommerce/woocommerce-admin/pull/5009)
* Create wp.data folder

* order panel

* fix isUnboundedRequest with Categories

* products report

* products table

* indicators and leaderboards

* orders and stock panels

* utils

* tests

* save

* updateStock

* remove wc-api items

* updateItems -> setItems
2020-08-21 11:37:41 +12:00
Paul Sealock 2f650b74a0 Replace useFilters with wp's withFilters (https://github.com/woocommerce/woocommerce-admin/pull/4962)
* use wp withFilters

* changelog

* remove altogether

* other uses of withFilters

* Add deprecation warning to README
2020-08-21 11:14:55 +12:00
Joshua T Flowers 0605e614a9 Group tasks by completion status (https://github.com/woocommerce/woocommerce-admin/pull/5001) 2020-08-20 22:33:55 +03:00
Daniel Bitzer d8098d6fd7 Adds `@woocommerce/tracks` package (https://github.com/woocommerce/woocommerce-admin/pull/5017)
* Add @woocommerce/tracks package.json

* Add @woocommerce/tracks .npmrc

* Move lib/tracks.js in to tracks package

* Add tracks package debug dependency

* Add readme for tracks package

* Add changelog for tracks package

* Add info about debugging and opt-ins to tracks package readme

* Load tracks package script

* Add tracks package to packages readme

* Add tracks package to webpack config

* Add tracks package external to starter-pack

* Replace lib/tracks uses with @woocommerce/tracks

* Update package-lock.json
2020-08-20 14:29:52 +09:30
Sam Seay 2f1d65847c Remove usage of __experimentalResolveSelect (https://github.com/woocommerce/woocommerce-admin/pull/4949)
This uses a generator action and hooks to reimplement the CTA as a more
simple and logicless component, with most of the logic now in the
HOC component.
2020-08-20 16:02:01 +12:00
Paul Sealock c7f63f7452 get selectors from wc-api (https://github.com/woocommerce/woocommerce-admin/pull/4997) 2020-08-19 10:03:40 +12:00
Jeff Stieler c16da34c30 Migrate export data store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4958)
* Add export ID to success response and fix typos in endpoint schema.

* Initial export data store.

Allows for starting export, but not checking progress.

* Use new export data store in analytics report tables.

* Remove defunct report export wc-api files.

* Apply review feedback from another wp.data PR.

* Use getResourceName() util for more DRYness.

* Fix linter error.

* Add response status code to fetchWithHeaders control.

* Use HTTP status rather than response body to determine success.

* Fix tests.

* Remove unused import from actions.
2020-08-18 09:04:58 -04:00
Joshua T Flowers df89bb7aac Fix note data actions and consolidate query constants (https://github.com/woocommerce/woocommerce-admin/pull/4990) 2020-08-18 14:45:42 +03:00
Timmy Crawford 7b2aedf88b Final css tweaks for business modal in onboarding wizard. (https://github.com/woocommerce/woocommerce-admin/pull/4994) 2020-08-17 15:11:42 -07:00
Paul Sealock 8afad405d4 Remove unused lib/date (https://github.com/woocommerce/woocommerce-admin/pull/4987) 2020-08-18 09:53:13 +12:00
Paul Sealock 5cbd4ed521 Documentation: Fix Add Report (https://github.com/woocommerce/woocommerce-admin/pull/4991)
* Update readme

* better
2020-08-18 09:45:21 +12:00
Paul Sealock 23846221e6 jsDoc: Fix errors (https://github.com/woocommerce/woocommerce-admin/pull/4985)
* jsDoc errors, round 1

* round 2

* round 3

* voila

* root0 -> props
2020-08-18 09:36:24 +12:00
Timmy Crawford dfdc6d8f28 CSS fixes for Business Features popover. (https://github.com/woocommerce/woocommerce-admin/pull/4907) 2020-08-17 12:13:12 -07:00
Bec Scott c253cc7796 Add updateOptions prop to Layout tests (https://github.com/woocommerce/woocommerce-admin/pull/4986)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-17 10:30:46 +10:00
Jeff Stieler 7ad5ea7d8d Use filtered headers array in onColumnsChange callback. (https://github.com/woocommerce/woocommerce-admin/pull/4964)
* Use filtered headers array in onColumnsChange callback.

* Table column example: show headers when there are no results.
2020-08-14 12:14:04 -04:00
Joshua T Flowers 1d339174f8 Migrate reports data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4966)
* Move controls to data package root

* Add reports data store in wp data

* Move report utils to data package

* Update error state and actions to match existing methods

* Update references to reports data store

* Add error setters

* Fix control registration path

* Add reports reducer tests

* Remove remaining report wc-api references

* Handle PR feedback

* reference packgage, not lib/date

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-08-14 14:19:04 +03:00
Paul Sealock c3d1e1eb61 Stock Report: Fix bad text domains (https://github.com/woocommerce/woocommerce-admin/pull/4980)
* Fix bad text domains

* fix currency bug
2020-08-14 08:25:08 +12:00
Joshua T Flowers 483055dd75 Migrate notes data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4943)
* Add initial notes data store using wp data

* Cache individual note queries

* Update notes undo endpoint to batch update endpoint

* Allow batch updates of notes

* Add requesting state

* Update components to use new note store

* Remove old notes store from wc-api

* Get note IDs from json and validate data in REST API

* Add an updating state to each note

* Throw errors in actions so they can be caught by client

* Add store reducer tests

* Handle PR feedback

* Fix failing tests

* Don't set inbox panel visibility while batch updating

* Move woocommerce block to external dependencies
2020-08-13 16:23:38 +03:00
Jeff Stieler 5fbc511f25 Don't directly import from React, use @wordpress/element. (https://github.com/woocommerce/woocommerce-admin/pull/4978) 2020-08-13 08:29:29 -04:00
Paul Sealock c145783e0a Fix dependency declarations (https://github.com/woocommerce/woocommerce-admin/pull/4972)
* renmove WC comment block

* client routes

* more fixes

* moar search

* getting there

* by hand now

* david beating goliath

* mission accomplished

* client filepath

* save

* got it

* remove script

* fixes

* deal with package internal dep

* remove webpack alias

* fix webpack relative paths

* remove commented rule

* remove extra line

* remove unused modules entry
2020-08-13 14:05:22 +12:00
Joshua T Flowers 92a8a58d2b Remove payment task actions (https://github.com/woocommerce/woocommerce-admin/pull/4917)
* Remove task list payment actions

* Check that the payments task has been marked complete in checkout note

* Track payments completion via enabled gateways

* Allow toggling to unfinish task when no payments enabled
2020-08-11 15:20:48 +03:00
Bec Scott b511469dc8 Automatically add free local shipping zone on completing the profiler (https://github.com/woocommerce/woocommerce-admin/pull/4857)
* Set up profile completed action

* Stub out the steps

* Only run if Jetpack is installed and connected

* Return if WCS isn't active

* Return unless physical is selected as a product type

* Return if there are existing shipping zones

* Shipping labels are enabled when WCS is installed

* Set up free local shipping

* Comment for the profiler complete action

* By default there is no international/catch-all shipping method set up

* Add review shipping settings note

* Record tracks event

* Fix logic

* Add unit test around setting up free local shipping

* Rename some functions

* Use countries service to get all countries

* Drop duplicated possibly_add_note()

* Check the old value when determining if the profiler has completed

* Fall back to country code if country name doesn't exist

* Use admin_url fn to build up URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-08-11 14:39:25 +10:00
Paul Sealock 8d5718fdb8 Reviews: Create wp.data dataStore (https://github.com/woocommerce/woocommerce-admin/pull/4941)
* scaffold out reviews store

* hook up dataStore

* get controls working

* getReviews working

* get count working

* get errors working

* indicators working

* reducer tests

* reviews

* Remove wc-api

* cleanup

* better way to fetch with headers

* add comment with issue

* better resolver
2020-08-11 12:16:27 +12:00
Jeff Stieler a42d4f4683 Don't redirect to connect Jetpack if "no thanks!" selected. (https://github.com/woocommerce/woocommerce-admin/pull/4944) 2020-08-10 08:18:09 -04:00
Timmy Crawford 2b7fddb16b Setup Payments: Add eWAY for AU/NZ Stores. (https://github.com/woocommerce/woocommerce-admin/pull/4947)
* Setup Payments: Add eWAY for AU/NZ Stores."

* Fix typo
2020-08-06 17:09:10 -07:00
Joshua T Flowers 09415ef7a8 Remove erroneous navigation component (https://github.com/woocommerce/woocommerce-admin/pull/4923) 2020-08-06 17:07:36 -07:00
Harris Wong 276d8455b0 Update style on shipping banner (https://github.com/woocommerce/woocommerce-admin/pull/4948)
* Change is-button to is-primary to address style issues

* Make sure the text is vertically aligned
2020-08-06 17:06:05 -07:00
James Koster 2c592b1209 Update the colors of the illustrations in the welcome modal to use the theme spot color (https://github.com/woocommerce/woocommerce-admin/pull/4945) 2020-08-06 16:58:00 -07:00
Sam Seay 0d95facf92 Task list - add a shortcut back to store setup (https://github.com/woocommerce/woocommerce-admin/pull/4853)
Fixes woocommerce/woocommerce-admin#4592

This adds the functionality to support a store setup tab displayed in ActivityPanel. The tab currently just redirects to the home page, rather than implementing the nice-to-haves of displaying the task list in the panel. The reason for this, is that I found it would require significant refactoring of the task list to support this currently.

As part of this I have also refactored rendering of tabs inside into 2 new functional components: <Tabs> and <Tab>. The reason for this is to decompose large untestable components, test them and by virtue of being decomposed they will also be more reusable in future. Ideally would have been refactored to a functional component as well, but it would have been too large a task.
2020-08-06 10:02:24 +12:00
Sam Seay 34d8d930b0 Display modal with more info about the new homescreen (https://github.com/woocommerce/woocommerce-admin/pull/4890)
Fixes woocommerce/woocommerce-admin#4590

This implements a paged modal via the Gutenberg Guide component. Some styling adjustment was needed to match the designs exactly.

This also introduces 3 SVG based illustrations for display in the modal. According to this comment there is a need to color them based on the theme at some point, but based on a current lack of requirements for that, I felt that could be done at a separate time (that was suggested in the comment as well).
2020-08-05 12:14:56 +12:00
Jason Conroy b078134073 Add product and category props to mock RecommendedExtensionsItem (https://github.com/woocommerce/woocommerce-admin/pull/4912) 2020-08-04 15:04:27 -07:00
Joshua T Flowers cf66e7984c Allow revisiting of the payments task (https://github.com/woocommerce/woocommerce-admin/pull/4918)
* Allow revisiting of the payments task

* Remove un-used import of getAdminLink

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-08-03 16:05:39 -07:00
Fernando Espinosa 95ce793bc0 Remove new WP 5.5 meta box arrows in the shipping banner (https://github.com/woocommerce/woocommerce-admin/pull/4914) 2020-08-03 15:56:31 -07:00
Timmy Crawford 1855057d25 Onboarding: Change account required text on biz step. (https://github.com/woocommerce/woocommerce-admin/pull/4909) 2020-08-03 15:08:07 -07:00
Timmy Crawford 979251784d Use lifesaver icon instead of gridicon for help panel. (https://github.com/woocommerce/woocommerce-admin/pull/4905) 2020-08-03 14:54:57 -07:00
Fernando a39e6fee62 Added personalization to purchase extension task (https://github.com/woocommerce/woocommerce-admin/pull/4849)
* Added personalization to purchase extension task

This commit adds personalization to purchase extension task

* Removed unnecessary naming fix

This commit removes an unnecessary naming fix

* Corrected param description

* Solved translation problem

* Naming corrected

The method 'getGroupedOnboardingProducts' was given a more accurate name.

* Modified string substitution

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-08-03 16:24:57 -03:00
Fernando 5ab72f6137 Activity Panel - event tracking improved (https://github.com/woocommerce/woocommerce-admin/pull/4861)
* Added event recording to `ProductStockCard`

This commit adds event recording to `ProductStockCard`

* Added event recording to `OrdersPanel`

This commit adds event recording to the orders panel

* Added event recording to `ReviewsPanel`

This commit adds event recording to the reviews panel

* Added `learn_more` event recording

* Modified orders event names

* Added event 'wcadmin_activity_panel_orders_learn_more' to Orders

* Modified "orders.js" indentation

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-08-03 13:38:57 -03:00
Joshua T Flowers 2902b8871b Only show WCPay task in US based stores (https://github.com/woocommerce/woocommerce-admin/pull/4899) 2020-08-03 11:22:25 +03:00
Jason Conroy a8275715e3 Use clipRule and fillRule props (https://github.com/woocommerce/woocommerce-admin/pull/4889) 2020-07-31 09:44:56 +09:30
Jeff Stieler adf51fc173 Center all descriptive text on OBW steps. (https://github.com/woocommerce/woocommerce-admin/pull/4902) 2020-07-30 13:58:10 -04:00
Jeff Stieler 53031f3fae OBW: fix product types step bugs (https://github.com/woocommerce/woocommerce-admin/pull/4900)
* OBW: fix tooltip display on product types step.

* Restore physical products as default.

* Slight improvement to screen reader text.
2020-07-30 12:14:18 -04:00
Jeff Stieler ee057bcb37 Enable tax calculation before redirecting to standard tax rates page. (https://github.com/woocommerce/woocommerce-admin/pull/4878) 2020-07-30 12:04:21 -04:00
Paul Sealock 80f4a86515 Declare packages dependencies independently of main package.json (https://github.com/woocommerce/woocommerce-admin/pull/4874)
* create file declaration to packages

* bump wordpress/components in packages

* get format right
2020-07-30 13:51:15 +12:00
Darren Ethier dc5304823b Add @woocommerce/eslint-plugin (https://github.com/woocommerce/woocommerce-admin/pull/4714)
* add new woocommerce/eslint-plugin

* implement eslint-plugin (switch scripts to use wp-scripts etc)

* various linting fixes

* more lint fixes

* improve fix script

* more eslint fixes

* more eslint fixes

* temporary convert rules to warnings until they are all handled

* linting fixes

* update package-lock.json

* remove duplicates

* remove unnecessary `@wordpress/dependency-group` rule config

* add docs and adjust rules

* prettier fix

* fix merge artifact

* convert more rules to warnings

* change order to reflect importance

* install babel-preset-default

* remove unnecessary configuration for babel

* fix dependency group rule and test

* fix test

* handle collapsible whitespace

* add react testing library eslint plugin

* linter errors

* Add back in prettierrc

* package-lock update

* js lint fix with --fix

* disable whitespace in translation

* package-lock update

* make eslint actual dependency, not peer dependency

* pin eslint to v7

* I don't know why, but its working

* fix lint js

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-07-28 14:32:58 +12:00
Joshua T Flowers fe4fcf2467 Add the experimental resolver to WCA data package (https://github.com/woocommerce/woocommerce-admin/pull/4862)
* Add the experimental resolver to WCA data package

* Add note about function origin and deprecation
2020-07-27 17:07:39 -07:00
Paul Sealock ac91a8fd60 Summary number bg (https://github.com/woocommerce/woocommerce-admin/pull/4858) 2020-07-28 11:45:36 +12:00
Bec Scott 533138a335 Center the skip link on the theme selection step (https://github.com/woocommerce/woocommerce-admin/pull/4847)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-23 09:37:40 +10:00
Chris Shultz 795c6ca585 Add copy that WCS TOS will be accepted upon install. (https://github.com/woocommerce/woocommerce-admin/pull/4799)
* Add copy that WCS TOS will be accepted upon install.

* Remove unused getAdminLink import.

Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-07-22 10:11:11 +10:00
Timmy Crawford ae6f5d4615 Onboarding: Fix alignment of container on benefits screen. (https://github.com/woocommerce/woocommerce-admin/pull/4837) 2020-07-21 14:03:34 -07:00
Bec Scott 551dfe1f0c Pills and tooltips in product step of OBW (https://github.com/woocommerce/woocommerce-admin/pull/4707)
* Add monthly product prices to OBW

* Remove description for physical and download products

* Use pills in product selection step of OBW

* Add missing translation wrapper, also convert some spaces to tabs

* Add pill to changelog

* Change pills to medium gray text and border

* Make everything line up correctly on smaller viewports

* Get the styles closer to the design

* Breakpoint to set font size to 11px

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-21 14:27:32 +10:00
Sam Seay a6ea004ee8 Rework the store details onboarding screen (https://github.com/woocommerce/woocommerce-admin/pull/4771)
Fixes woocommerce/woocommerce-admin#4566 **(and is dependent on the changes from woocommerce/woocommerce-admin#4759 )**

Changes:

* Use the new `Card` and `Flex` from `@wordpress/components`
* Add contextual tooltips
* Adjust existing styles to match [new designs](https://www.figma.com/file/JH9XMFUCOjfXdr3N09AHRD/On-boarding-iterations-June-'20)
2020-07-21 12:12:19 +12:00
Paul Sealock 2b56a9c015 Dashboard: Fix filter extensibility (https://github.com/woocommerce/woocommerce-admin/pull/4758)
* pass filterQuery to components

* pass filters to charts

* apply formatting
2020-07-21 10:17:28 +12:00
Joshua T Flowers 50ba675040 Create single source of truth for task list array (https://github.com/woocommerce/woocommerce-admin/pull/4825)
* Remove duplicate getAllTasks call

* Create single source of truth for task list array
2020-07-20 09:19:01 +03:00
James Koster 2fc2ad6ca9 Update store management links (https://github.com/woocommerce/woocommerce-admin/pull/4790)
Remove chevrons
2020-07-17 13:47:18 +01:00
Sam Seay b448ff60b7 Update @wordpress/base-styles and replace deprecated variables (https://github.com/woocommerce/woocommerce-admin/pull/4759)
Fixes woocommerce/woocommerce-admin#4732

This updates `@wordpress/base-styles`, and because `@wordpress/components` depends on variables from it, that must be updated as well.

There are 3 major changes required as part of updating:

1. The $theme-color variable is no longer exposed by base-styles. Instead there are 3 css vars exposed. These are made available by use of a provided mixin. Situations where $theme-color was darkened using scss have been mapped as best as possible to the 2 other darkened shades of the css var that are available such as `--wp-admin-theme-color-darker-20` and `--wp-admin-theme-color-darker-10`. In some cases this means the colors are not exactly the same as before.

2. The post css `theme()` call is no longer available. All uses of this have been consolidated to use of the main theme css var `--wp-admin-theme-color`. This means that calls like `theme(secondary)` or `theme(outline)` etc have all been consolidated to the one color.

3. Many of the variables used for different shades of gray have been deprecated. These have been mapped across to the new gray variables. (Mapped according to the list described in woocommerce/woocommerce-admin#4732)
2020-07-17 12:11:42 +12:00
Fernando c950b9fafd Reordered home screen tasks (https://github.com/woocommerce/woocommerce-admin/pull/4754)
* Removed task item `connect`

This commit removes the task item `Connect your store to WooCommerce.com`

# Conflicts:
#	client/task-list/tasks.js

* Reordered home screen tasks

This commit reorders the task list visible on the home screen.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-16 15:09:36 -03:00
Fernando 0c4dfb823c Added event recording to home/dashboard task list (https://github.com/woocommerce/woocommerce-admin/pull/4743)
This commit adds event recording to home/dashboard task list

# Conflicts:
#	client/task-list/tasks.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-16 13:54:31 -03:00
Fernando a7a59583c9 Added skip profiler functionality (https://github.com/woocommerce/woocommerce-admin/pull/4721)
* Added skip profiler functionality

This commit adds the skip profiler functionality, leaving the Home screen `Store details` as incomplete.

# Conflicts:
#	client/task-list/tasks.js

* Unit tests repaiared

* Added OBW page

This commit makes the necessary changes to add an OBW page

# Conflicts:
#	client/profile-wizard/index.js

* Event name changed

This commit renames the event name we were recording since it was wrong.

* Redirection modified

This commit modifies the way we do redirection

# Conflicts:
#	client/profile-wizard/index.js

* Removed `profiler` feature flag

* Removed `profiler` feature flag

This commit removes the `profiler` feature flag

* Added error handling for `updateProfileItems`

This commit adds error handling for the method `updateProfileItems`

* Update client/profile-wizard/index.js

Co-authored-by: Matt Sherman <matt.sherman@automattic.com>

* Removed "throw" from "then"

* Update client/dashboard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/profile-wizard/index.js

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Modified redirection URL

This commit modifies the redirection URL.

# Conflicts:
#	client/task-list/tasks.js

# Conflicts:
#	client/profile-wizard/index.js

* Removed the variable "lastStep" and the related logic.

* Removed change of state for variable "skipped"

* Added error trowing to onboarding actions

This commit adds error trowing to onboarding actions

* Removed response handling for `updateProfileItems`

* Added default value for "profileItems" in Homescreen and Dashboard

* Removed `step` from OnboardingProfile and test

This commit removes the `step` from OnboardingProfile.php and from tests

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Matt Sherman <matt.sherman@automattic.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-07-16 12:17:10 -03:00
Jason Conroy 8afaa58b9e Update marketing tab styles (https://github.com/woocommerce/woocommerce-admin/pull/4794)
* Fix incorrect woocommere-admin spelling

* Update styles

* Add icons

* Add hover effect for coupon icons

* Remove variable comment

* Update color case

* Style lint fixes

* Use $theme-color

* Update icons, use wordpress/icons where possible

* Adjustment for using smaller default icons and no fills in the svgs

* Use var(--wp-admin-theme-color) instead of $theme-color

* Reorg coupons stylesheet

* Update PropTypes for ProductIcon

* Adjust icon export

* Rever to using $theme-color

* Add versions of link, people and currency-dollar

* Overide coupons icon background color

* Add background transition to icon wrapper
2020-07-16 15:22:06 +09:30
Joshua T Flowers 90c1431129 Update connection flow for Bundle UI (https://github.com/woocommerce/woocommerce-admin/pull/4717)
* Move Jetpack connection from benefits to profiler completion

* Handle profiler completion and connection URL async

* Update cached components on each profiler step

* Show bundle install UI based on segment

* Create notice on error catch

* Refactor redirect after promise completion

* Fix up accessiblity issues in bundle popover UI
2020-07-15 17:52:21 +03:00
Jeff Stieler 98f09e2b7d Add option to automatically create a PayPal account (https://github.com/woocommerce/woocommerce-admin/pull/4804)
* Add "create an account" option to PayPal setup.

Requires a connected Jetpack and WCS.

* Incorporate account creation into multiple flows.

Consolidate form code as well.

* Empty emails aren't valid.

* Remove defunct manual form render.

* Only validate API credentials if needed.

* Update PayPal settings for account creation flow.

* Add first basic test for PayPal setup task.

* Add more test coverage.

* Add some padding to the create account form.

* Only show "create account" if WCS TOS has been accepted.
2020-07-15 08:10:21 -04:00
Matt Sherman c85f6bf0f3 Onboarding: Center continue buttons in profile wizard (https://github.com/woocommerce/woocommerce-admin/pull/4802) 2020-07-15 07:24:00 -04:00
Bec Scott 480362ca29 Admin note to install other payment providers (https://github.com/woocommerce/woocommerce-admin/pull/4795)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-15 12:09:49 +10:00
Jeff Stieler 7da3a59465 Show "Help" Activity Panel When Working Single Task List Item (https://github.com/woocommerce/woocommerce-admin/pull/4779)
* Add initial (rough) help panel.

Only includes "products" task items.

* Add help links for other tasks.

* Add header to help tab content.

* Toggle activity panel tabs when performing a setup task.

* Move query string parsing up a level.

* Pass query string as prop to ActivityPanel.

Fixes rerendering issue when entering a task.

* Pass current task to Help panel.

* Filter payments task help items by available payment methods.

* Filter shipping and tax help items based on WCS install.

* Add generic docs link to all help panels.

* Track help panel open.

* Track help panel link clicks.

* Show WCS help items when prompted to install.

* Tasks are only performed on the main route.

E.g. no value for "path".

* Small tweaks to make AcivityPanel more easily testable.

* Add initial tests for ActivityPanel tab logic.

* Modify HelpPanel component for easier testing.

* Add tests for conditional help panel links.

* Fix tracking keyboard "clicks" on help links.

* Fix query prop on embedded pages.

* Allow filtering of help tab items.
2020-07-14 08:20:51 -04:00
Joshua T Flowers 49a0a9f3a2 Add option to dismiss tasks (https://github.com/woocommerce/woocommerce-admin/pull/4733)
* Add dismiss button as task list item option

* Add option to undo task dismissal

* Record modal dismissal event

* Add transition animation to list items

* Use key for list items instead of index

* Remove dismissed tasks on recompleting profiler steps
2020-07-14 13:46:25 +03:00
Bec Scott 213fba853a Highlight WooCommerce Payments task (https://github.com/woocommerce/woocommerce-admin/pull/4793)
* Add wcpay setup task and hide normal payment task if the wcpay plugin is installed

* Record an event when selecting the wcpay task

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-14 11:40:56 +10:00
Timmy Crawford e02003b46d Onboarding: Don't show tracking modal if site is already opted in to usage tracking. (https://github.com/woocommerce/woocommerce-admin/pull/4766) 2020-07-13 15:35:20 -07:00
Bec Scott a6a8b82280 Limit status to unactioned notes (https://github.com/woocommerce/woocommerce-admin/pull/4765)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-09 14:49:13 +10:00
Bec Scott 3e79e973ab Toggle the “Physical products” checkbox on by default (https://github.com/woocommerce/woocommerce-admin/pull/4702)
* Toggle the “Physical products” checkbox on by default

* change 'preselect' to 'default'

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-07-08 12:14:57 +10:00
Paul Sealock d03f3e9553 fix staticParams (https://github.com/woocommerce/woocommerce-admin/pull/4704) 2020-07-08 12:38:50 +12:00
Joshua T Flowers bfb8b68aa6 Remove navigation feature (https://github.com/woocommerce/woocommerce-admin/pull/4740) 2020-07-06 10:21:15 +03:00
Fernando 7b1a485100 Added new note type (https://github.com/woocommerce/woocommerce-admin/pull/4686)
* Added new note type

This commit adds a new note type `survey`. The note is deleted after calling its CTA.

* Now using const from WC_Admin_Note

* Now using const from WC_Admin_Note in WC_Admin_Notes too

* Moved note deletion from NoteActions to WC_Admin_Notes

This commit moves the note deletion from NoteActions to WC_Admin_Notes. Also adds a hook to clean up actioned survey notes.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-07-02 15:56:06 -03:00
Joshua T Flowers 44dd1a25b5 Add bundle install UI to Business Details step (https://github.com/woocommerce/woocommerce-admin/pull/4695)
* Add simple business extension install form input

* Install all business extensions when checked

* Add popover with business extension benefits

* Remove errant hasInstallActivateError setState call

* Show popover on click and record event
2020-07-01 15:20:24 +03:00
Joshua T Flowers 8e5291e231 Refactor task tax to use promise chain (https://github.com/woocommerce/woocommerce-admin/pull/4683)
* Show success screen based on conditions instead of step

* Use promise chain to handle updating tax settings

* Fix up error handling for failed setting updates

* Skip store location step if complete address exists

* Fix up pending/requesting state logic

* Allow opt in to TOS on tax task

* Don't complete task from completeStep

* Add caption styling to TOS text
2020-07-01 15:19:15 +03:00
Fernando 1d5e7db33d Preventing refresh after answering a survey note (https://github.com/woocommerce/woocommerce-admin/pull/4711)
* Preventing refresh after answering a survey note

This commit adds the code necessary to prevent a webpage refresh after answering a survey note.

* Modified `action` URL check

This commit refactors the check we do for the action URL.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-30 12:14:55 -03:00
Jeff Stieler c4e9796244 Don't show the inbox panel on the new home screen. (https://github.com/woocommerce/woocommerce-admin/pull/4699)
* Don't show the inbox panel on the new home screen.

* Fix use of withRouter HoC on un-routed embed pages.
2020-06-30 11:10:26 -04:00
Paul Sealock 7dda8ad440 Inbox header: Update styles (https://github.com/woocommerce/woocommerce-admin/pull/4692) 2020-06-29 11:34:53 +12:00
Fernando 0d35c1c791 Added event prop 'screen' to be recorded (https://github.com/woocommerce/woocommerce-admin/pull/4643)
* Added event prop to be recorded

This commit adds the event prop `screen` to `wcadmin_wcadmin_inbox_action_click`

* Getting screen name from referer

Now the we get the screen name from the referer

* The screen name is not being sent anymore to the API

The screen name is not sent anymore to the API. Also, the $screen_name is set as empty in the API to make the method more defensive.

* Created method `get_screen_name`

This commit moves the code related  to getting the screen name to a specific method.

* Added screen name recording for individual posts

This commits adds screen name recording for individual posts

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-25 10:36:59 -03:00
Jeff Stieler a6195efad6 Fix Historical (deleted) Coupon Reporting (https://github.com/woocommerce/woocommerce-admin/pull/4671)
* Add (failing) test for deleted coupon amounts in reporting.

* Always sync an ID into the order-coupon lookup table.

* Don't remove coupon data from order analytics when the coupon is deleted.

* Fix coupon ID lookup from order item metadata.

* Allow negative coupon_id in the lookup table.

Representing deleted coupons.

* Handle deleted coupons when gathering extended info.

* Add more tests for deleted coupon handling.

* Handle deleted coupons in coupons report table.

* Fix lint errors.
2020-06-25 08:51:17 -04:00
Joshua T Flowers 774fd910c2 Refactor Jetpack connection flows (https://github.com/woocommerce/woocommerce-admin/pull/4655)
* Resolve Jetpack connection URL on benefits screen

* Resolve Jetpack connection URL in connection stats

* Fix up error handling for Jetpack connection flows

* Remove autoConnect option from Connect component
2020-06-25 15:01:33 +03:00
Paul Sealock a0d641d7ad Include dash stylesheets in homescreen (https://github.com/woocommerce/woocommerce-admin/pull/4693) 2020-06-24 18:08:30 -07:00
Bec Scott ced920a115 Fix reselecting advanced filters in the customer list (https://github.com/woocommerce/woocommerce-admin/pull/4650)
* Add advanced args to configured static args so it is persistent

* Make sure unique keys are set in loaded labels

* Simplify the key selection because javascript

* Smarten up the filter picker so it only navigates if the selected button has changed

* Add static params for advanced order filters

* Add static param to product comparison config

* Add static param to category comparison config

* Add static param to coupon comparison config

* Add static param to taxes comparison config

* Add static params to downloads comparison config

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-25 10:22:24 +10:00
Bec Scott 7011603c82 Fix dashboard task list menu placement (https://github.com/woocommerce/woocommerce-admin/pull/4664)
* Bring homescreen styles into task list so it is styled correctly in the dashboard view

* Copy homescreen card styles to new .woocommerce-dashboard-card class

* Move styles to dashboard stylesheet.

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
2020-06-25 08:14:44 +10:00
Bec Scott 11ee8aac2d Tweak the embed page CSS so the top content sits better (https://github.com/woocommerce/woocommerce-admin/pull/4622)
* Tweak the embed page CSS so the top content sits better

* Tweak the CSS to take notices into consideration

* Further tweak header styles

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-24 13:52:03 -07:00
James Koster 1649706b22 Fix spacing between stats overview and store management cards (https://github.com/woocommerce/woocommerce-admin/pull/4681)
* Fix spacing between stats overview and store management cards

* Revert "Fix spacing between stats overview and store management cards"

This reverts commit 993374313657f7ecf7803cc738b82bf63ecdf490.

* Home screen div margins
2020-06-24 13:08:59 -07:00
Fernando d1862b725c Added unread notes counter styles (https://github.com/woocommerce/woocommerce-admin/pull/4690)
This commit adds the styles to unread notes counter.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-24 14:58:40 -03:00
Paul Sealock a3b89c8867 save all settings (https://github.com/woocommerce/woocommerce-admin/pull/4661) 2020-06-23 14:47:02 +12:00
Paul Sealock c97e9d5ad1 Tax Task: don't rely on settings requesting (https://github.com/woocommerce/woocommerce-admin/pull/4660) 2020-06-23 13:14:57 +12:00
Daniel Rey López 86d2bc3837 Fix WCPay sometimes not appearing on the task list (https://github.com/woocommerce/woocommerce-admin/pull/4647)
* Fix WCPay sometimes not appearing on the task list

* preload general settings

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-06-23 10:18:35 +12:00
Paul Sealock ee360d14b3 UserPrefs store: Introduce optimistic update (https://github.com/woocommerce/woocommerce-admin/pull/4637)
* optimistically save woo meta

* dashboard

* save only once
2020-06-23 09:25:01 +12:00
James Koster 612ded1cf5 Fix inbox spacing (https://github.com/woocommerce/woocommerce-admin/pull/4632)
* Fix inbox spacing

* css tidy up

* Task list and stats margin
2020-06-22 13:17:17 -07:00
Fernando e0df6fa899 Inbox panel - Actioned inbox notifications now are visible (https://github.com/woocommerce/woocommerce-admin/pull/4621)
* Fix: Actioned inbox notifications now are visible

This commit fixes the actioned inbox notifications, now they are always visible.

* Fixed getUnreadNotes method

This commit fixes the getUnreadNotes method since it was returning the wrong information.

* Added two @todo

This commit adds two @todo referring to a few changes to do after implementing pagination

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-22 11:53:36 -03:00
Bec Scott 062279ffbf Tweak tag remove button style so it is properly centered (https://github.com/woocommerce/woocommerce-admin/pull/4651)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-22 16:02:35 +10:00
Paul Sealock c938b66ee7 Task List: Cleanup styles (https://github.com/woocommerce/woocommerce-admin/pull/4627) 2020-06-19 12:13:41 +12:00
Paul Sealock b5214e95d3 Stats Overview: Cleanup styles (https://github.com/woocommerce/woocommerce-admin/pull/4625) 2020-06-19 11:44:00 +12:00
Ron Rennick 8a22576a95 Count total unique customers instead of new/returning in order stats (https://github.com/woocommerce/woocommerce-admin/pull/4430)
* Count total unique customers instead of new/returning in order stats

* Add customer name to table instead of customer type

* Add customer total to segments

* Update tests for new stats

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-06-18 20:43:56 +03:00
Jeff Stieler 9794fed139 Disable task list on analytics dashboard when homepage is enabled. (https://github.com/woocommerce/woocommerce-admin/pull/4617)
Regression from 8a2750c973.
2020-06-18 10:56:30 -04:00
Bec Scott 76ce5d84f3 Fix logic error that was stopping dismiss link from appearing on the inbox cards (https://github.com/woocommerce/woocommerce-admin/pull/4624)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 14:00:27 +10:00
Bec Scott d36fdc01d7 Add Insight note (https://github.com/woocommerce/woocommerce-admin/pull/4516)
* Add Insight note

* Change actioned_label to actioned_text

* Move actioned text up a level

* Fix comment

* Rename insight class

* Add deny action to insight first sale and fix the button actions

* fix spacing

* Tweak conditions in the inbox card

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-18 11:28:27 +10:00
Paul Sealock 03db742cdd Currency package: make naming clearer (https://github.com/woocommerce/woocommerce-admin/pull/4560) 2020-06-18 11:33:40 +12:00
Jeff Stieler 6e85cf977a Style cleanup from components update (https://github.com/woocommerce/woocommerce-admin/pull/4606)
* Fix secondary button style in OBW.

* Center snackbar notices in OBW.

* Scope snackbar changes to just the OBW.

* Add busy treatment to Jetpack connect button when redirecting.

* Remove color override for form toggles in ellipsis menus.

* Fix styling of task list.

* Fix button styles in date range picker component.

* Use admin theme colors in calendar component selections.

* Fix datepicker styling on analytics settings page.
2020-06-17 08:58:35 -04:00
Jeff Stieler d591d77a53 Fix deleted products breaking Downloads Report (https://github.com/woocommerce/woocommerce-admin/pull/4582)
* Don't attempt order download information retrieval when the product has been deleted.

* Handle display of download names when product has been deleted.

* Add deleted product test case for download report endpoint.

* Fix date() usage in download report tests.
2020-06-16 09:47:27 -04:00
Bec Scott ad9cf27eaa Add a bottom border to the Install Jetpack CTA (https://github.com/woocommerce/woocommerce-admin/pull/4589)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-16 16:47:49 +10:00
Jason Conroy 4cf586c4f1 Add Coupon feature (https://github.com/woocommerce/woocommerce-admin/pull/4526)
* Handle new object for posts and recommendations

* Set breadcrumb parent for woocommerce-coupons to be woocommerce-marketing

* Add main coupon wrapping component

* Render coupon wrapper element below coupon table using wp-admin-scripts

* Finish off implementing category param for data store resolvers

* Create a helper trait for legacy coupons

* Add coupon related titles and descriptions

* Add note for the coupons being moved

* Allow for querying by note name in the notes Data Store

* Revamp coupon moved trait

* Add the new note only if we don't have an unactioned note and perform a redirect to ensure menu updates

* set_icon is deprecated

* Move coupon menu, adding a note for customers

* Translate title and descriptions

* Whitespace

* Account for coupon functionality being disabled

* Hide legacy menu before redirect

* Don’t keep adding the note if customer dismisses it from inbox

* Move behind feature flag

* Add note if feature enabled

* Add filter to override coupon feature

* Tweak option name to refer to wc_admin

To help with finding etc.

* use css variables

* Add the new note only if we don't have an unactioned note

* Switch the filter logic so `false` turns off the feature

This is a bit more intuitive when utilizing the filter

* Remove extraneous string and add trailing new lines

* Use correct posts object in tests

* Revert accidental removal of where_types

* Add coupons category to RecommendedExtensions

* Use 1.1 api to get categorized recommendations

* Add missing text domains

* Fix menu handling to point to woocommerce-marketing

* Only load coupon scripts on the coupon page

* Rework marketing menu logic to register pages more properly

* Use correct wc-admin path for marketing page

* Remove separate feature flag

WC Admin has existing feature flags to load enable/disable the feature

* Only set the coupon parent to marketing when the feature is enabled

* Only load coupon feature if marketing feature is enabled

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
Co-authored-by: Jeremy Pry <jeremy.pry@gmail.com>
2020-06-16 12:00:41 +09:30
Paul Sealock 77ce9448a3 Fix Task List styles (https://github.com/woocommerce/woocommerce-admin/pull/4573) 2020-06-16 14:07:06 +12:00
Bec Scott 21aa058a67 Clean up Jetpack CTA styles to use base component styles (https://github.com/woocommerce/woocommerce-admin/pull/4562)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 18:39:45 -07:00
Timmy Crawford 8dc7b4cbea G2: Remove pink/purple from ActivityPanels and Header (https://github.com/woocommerce/woocommerce-admin/pull/4586)
* G2: Remove pink/purple from ActivityPanels and Header

* Manage all orders purple.
2020-06-15 17:24:01 -07:00
Paul Sealock 91bd554637 Add overrides for OBW styles (https://github.com/woocommerce/woocommerce-admin/pull/4572) 2020-06-16 10:50:22 +12:00
Joshua T Flowers 701f90cc23 Only mark purchase task as complete when products exist (https://github.com/woocommerce/woocommerce-admin/pull/4574) 2020-06-15 15:38:36 -07:00
Fernando 16d9535700 Onboarding: Fixed choose a theme from the Live demo (https://github.com/woocommerce/woocommerce-admin/pull/4583)
* Bugfix: there was a problem with the method onChoose in onboarding

This commit fixes a problem with the method onChoose in the last onboarding step

* Small fix

This commit adds a small fix in the use of an element

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-15 15:32:36 -07:00
Joshua T Flowers 6baebd1e11 Check for enabled methods before payment task completion (https://github.com/woocommerce/woocommerce-admin/pull/4530) 2020-06-15 08:43:22 +03:00
Paul Sealock fea332b5b4 Change homepage to homesceen (https://github.com/woocommerce/woocommerce-admin/pull/4549) 2020-06-15 14:17:12 +12:00
Paul Sealock fd78bca347 Theme color: Use dynamic variable from user preferences (https://github.com/woocommerce/woocommerce-admin/pull/4558) 2020-06-15 14:00:25 +12:00
Bec Scott 07222c08ff Don't show store location in the tax and shipping tasks if it's already been provided (https://github.com/woocommerce/woocommerce-admin/pull/4507)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-15 09:20:52 +10:00
Fernando f8d7dc13a2 Dismiss dropdown styles fixed (https://github.com/woocommerce/woocommerce-admin/pull/4569)
* Dismiss dropdown styles fixed

This commit fixes the "Dismiss" dropdown styles

* Text color replaced in Dismiss dropdown

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-12 17:55:42 -07:00
Daniel Bitzer ca517af7c0 Make it possible (far easier) to add menu items under 'Marketing' (https://github.com/woocommerce/woocommerce-admin/pull/4561)
* Make it possible to add marketing submenu pages

* Always set the parent value for marketing pages

* phpcs

* Add ‘overview’ to breadcrumb and path

* Fix permission check conditional

* Add parent menu at priority of 9, before other items are usually added

* Revert to use `/marketing` as the page path
2020-06-13 07:25:15 +09:30
Joshua T Flowers 0cc93957a5 Try: WC Pay payment method with custom onClick handler (https://github.com/woocommerce/woocommerce-admin/pull/4552)
* Update recommended method on construct and update

* Update wcpay method requirements

* Add custom click handler to methods

* Add onClick handler to wcpay payment method

* Don't set busy state for default setup actions

* Handle PR feedback
2020-06-12 10:38:02 +01:00
Joshua T Flowers 960bc68dba Use label tag for toggleable shipping zones (https://github.com/woocommerce/woocommerce-admin/pull/4554) 2020-06-12 10:48:49 +03:00
Joshua T Flowers 0eb906f56d Use single dash for country/state dropdown options (https://github.com/woocommerce/woocommerce-admin/pull/4553) 2020-06-12 10:47:14 +03:00
Jason Conroy 8f291d2ec3 Refactor marketing components to make more reusable. (https://github.com/woocommerce/woocommerce-admin/pull/4524)
* refactor slider component to be functional

* Refactor RecommendedExtensions

* Refactor KnowledgeBase

* Refactor API to account for component location changes and categories

* Fix missing param description

* Remove unnessary use

* Pass down the category of the received plugins.

* Store the recommended plugins for the different categories separately.

* Pass down the category.

* Add new functions to get by category.

* set categories

* Handle new object for posts and recommendations

* Update tests

* Finish off implementing category param for data store resolvers

* Update js tests

* Fix incorrect reference to kb component

Co-authored-by: Dan Bitzer <danielbitzer@gmail.com>
2020-06-12 16:47:17 +09:30
Joshua T Flowers 046f6c8bd4 Create action for installing and activate plugins (https://github.com/woocommerce/woocommerce-admin/pull/4473)
* Add installAndActivatePlugins method to plugin store

* Use new install/actiate method in Plugins component

* Refactor benefits page to use await

* Refactor business details page to use new install method

* Replace Plugins component in Jetpack CTA

* Format and throw errors in plugin data store

* Add generic response handling function

* Add default error messages to plugin API
2020-06-12 09:38:33 +03:00
Paul Sealock 41481a7299 Button: Remove deprecated isDefault (https://github.com/woocommerce/woocommerce-admin/pull/4548) 2020-06-12 07:22:20 +12:00
Matt Sherman bea82c93cd QuickLinks: Prevent jsdom "Error: Not implemented: navigation" test output (https://github.com/woocommerce/woocommerce-admin/pull/4547) 2020-06-11 07:58:09 -04:00
Matt Sherman 227a499343 Mock QuickLinks and add tests to ensure that QuickLinks is rendered when it should be. (https://github.com/woocommerce/woocommerce-admin/pull/4546) 2020-06-11 07:55:53 -04:00
Paul Sealock d7aec170f1 Runtime feature config override (https://github.com/woocommerce/woocommerce-admin/pull/4523) 2020-06-11 12:26:20 +12:00
Paul Sealock 41eeb4f9f9 Options: Add data store (https://github.com/woocommerce/woocommerce-admin/pull/4144) 2020-06-11 11:49:27 +12:00
Goran Radosevic cabb4c136c Fixed null issue in wpNavMenuClassChange (https://github.com/woocommerce/woocommerce-admin/pull/4513) 2020-06-10 14:56:01 -07:00
Timmy Crawford 1fb8c3caad Tracks: Change isEmbedded prop to is_embedded (https://github.com/woocommerce/woocommerce-admin/pull/4533) 2020-06-10 10:06:13 -07:00
Jeff Stieler 8a2750c973 Migrate user store to wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4505)
* Initial user preferences custom hook (wc meta).

* Organize dependencies.

* Specify dependencies in useSelect() call.

* Remove specifying preference keys.

There's currently no performance benefit to be had.

* Add HoC for hydrating current user data.

* Add user prefs update method.

* Export user prefs hook and HoC in data package.

* Handle error condition when updating user preferences.

* Use closure to get user ID for prefs update.

* Refactor analytics dashboard to use new user hook.

* Refactor ReportTable component to use new user hook.

* Move prop access to top of function component.

* Add todo for potential manual resolution logic.

* Refactor DashboardCharts component to use new user preferences hook.

* Move code out of functional component where possible.

* Fix chart interval query property.

* Refactor Leaderboards component to use new user preferences hook.

* Move code out of functional component where possible.

* Refactor Inbox panel to use user prefs hook.

@todo - updating last read isn't working.

* Use user prefs hook in StatsOverview component.

* Export user preferences store name.

* Use new store for unread inbox indicator.

* Hydrate current user data higher up in the app.

* Update "last read" timestamp in inbox panel.

* Fix StatsOverview test.

* Remove unused dispatch method from StorePerformance component.

* Remove now defunct user methods from wc-api spec.

* Add tests for isRequesting.

* JSON decode WC meta on updated user object.

* Test user prefs retrieval and save.

* Remove todo comment.

* Use user prefs hook in Jetpack install CTA on homepage.
2020-06-10 11:46:46 -05:00
Fernando 289636abba Modified layout.js withSelect (https://github.com/woocommerce/woocommerce-admin/pull/4480)
* Changed some API responses

This commit adds changes to some API responses

* Changed "woocommerce_task_list_complete" loading in frontend

* Updated "$migrated_options" array

This commit updates "$migrated_options" array and adds a deletion control

* Changed "taskListComplete" in customizable.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:33:30 -03:00
Fernando 7d42d389b8 Inbox notification: fixed Dismiss dropdowns for IE 11 (https://github.com/woocommerce/woocommerce-admin/pull/4504)
* Added refactor in "handleBlur" for IE compatibility

This commit adds a refactor in the method "handleBlur" for IE compatibility

* Modified styles for IE compatibility

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-10 10:32:55 -03:00
Bec Scott df0c2823ff Use plugins store rather than getSettings (https://github.com/woocommerce/woocommerce-admin/pull/4470)
* Use plugins store rather than getSettings

* Show install Jetpack CTA if Jetpack is not connected

* Fix redirect URL

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-10 12:59:05 +10:00
Paul Sealock 134be1c08b Update/@wordpress components base styles (https://github.com/woocommerce/woocommerce-admin/pull/4427) 2020-06-10 13:55:06 +12:00
Jason Conroy 987b2bf5eb Refactor and add tests for the marketing WelcomeCard component (https://github.com/woocommerce/woocommerce-admin/pull/4495)
* Convert welcome card to functional component

* Add tests for the WelcomeCard
2020-06-10 11:00:25 +09:30
Jason Conroy 9e03657451 Correctly remove reference to debounced updateSliderHeight method (https://github.com/woocommerce/woocommerce-admin/pull/4522) 2020-06-09 11:39:43 +09:30
James Koster 69b11c30db Store setup -> Finish setup (https://github.com/woocommerce/woocommerce-admin/pull/4517) 2020-06-09 14:06:35 +12:00
Matt Sherman f922e5b430 Only show quick links if task list is not shown. (https://github.com/woocommerce/woocommerce-admin/pull/4511) 2020-06-08 14:35:37 -04:00
Fernando 621f568297 Inbox panel on the home screen (https://github.com/woocommerce/woocommerce-admin/pull/4496)
* Homepage InboxPanel integration

# Conflicts:
#	client/homepage/layout.js
#	client/homepage/test/index.js

* InboxPanel refactor

This commit removes "context" prop and adds "isPanelEmpty" method to InboxPanel.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:28:25 -03:00
Fernando d5b40ae01f Usage of URLSearchParams breaks in IE11 (https://github.com/woocommerce/woocommerce-admin/pull/4501)
* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Revert "Removed URLSearchParams method"

This reverts commit c2b24b34c93d16264c62b3bf522f4fbc94354d58.

* Removed URLSearchParams method

This commit removes the method URLSearchParams to use something compatible with IE

* Created folder utils with global utils

This commit moves the method "getUrlParams" to a utils file. Also some unit test were added

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-06-05 13:07:28 -03:00
Bec Scott b4c735f0de Jetpack stats on home page (https://github.com/woocommerce/woocommerce-admin/pull/4481)
* Get Jetpack stats appearing on the home page

* Update hidden stats in stats overview test

* Make jetpack stats appear by default

* Add reportUrlType to dashboard store performance area

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-06-05 09:14:55 +10:00
Daniel Rey López 479817cdad Fix the WCPay method not appearing as recommended sometimes (https://github.com/woocommerce/woocommerce-admin/pull/4345)
* Fix the WCPay method not appearing as recommended sometimes

* Recalculate the recommendedMethod variable only on componentDidUpdate
2020-06-04 10:36:57 +01:00
Paul Sealock 7f8149563b Homescreen: Add option to disable (https://github.com/woocommerce/woocommerce-admin/pull/4450)
* Add homescreen option

* change opt name to homescreen
2020-06-04 08:42:30 +12:00
Fernando aefbafea9b Inbox notification: layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4218)
* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

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

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

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

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Add undo snackbar button after deletion (https://github.com/woocommerce/woocommerce-admin/pull/4281)

* Added undo snakbar button for a single note

# Conflicts:
#	client/wc-api/notes/mutations.js
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Notes.php

* Added a button to undo the deletion of all notes

# Conflicts:
#	client/wc-api/notes/operations.js
#	src/API/Notes.php

* Code adapted to make code reviewing easier

There was some code that also was present in another PR, that code was removed to make code reviewing easier.

* UnitTest added

This commit adds some unit tests

* Added verification for API response

* Added casting to $note_id

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

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

* Inbox notification: Add dismiss functionality (https://github.com/woocommerce/woocommerce-admin/pull/4262)

* Added is_deleted param to soft delete

# Conflicts:
#	src/API/Notes.php
#	src/Install.php
#	src/Notes/DataStore.php
#	src/Notes/WC_Admin_Note.php
#	src/Notes/WC_Admin_Notes.php
#	tests/api/admin-notes.php

* Added the Dismiss functionality

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js

* Where clause repeared

* Added Snackbar after action.

* API modified to dismiss notes

* Small refactor in "get_item" method

This commit adds a small refactor in "get_item" method to use "prepare_note_data_for_response"

* Added missing logic to Dismiss note

This commit adds missing client logic to Dismiss note.

# Conflicts:
#	client/header/activity-panel/panels/inbox/action.js
#	client/header/activity-panel/panels/inbox/card.js

* Moved the delete action to WC_Admin_Notes.php

The delete action was moved to WC_Admin_Notes.php to follow the pattern.

* Added changes to dismiss messages

This commit addeds changes to the  messages soft delete.

* DataStore.php repaired

This commits adds some code that was deleted by mistake and the param "is_deleted" has been escaped.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* Repaired "get_notes_where_clauses" method

A problem with the deleted notes was repaired

* Added a comment to DataStore.php

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

* Bugfix: now the method get_notes_with_name also returns deleted notes

* Bugfix: repaired empty notification list

This commit repairs a bug that happens when there isn't anything in the inbox notification list

* Small refactor to not use "some" Lodash method anymore

* Small refactor in rednderNotes method

* Added check to set_layout

* Added small refactor to delete_all_notes method

* Fixed code comment error

* Bugfix: repaired the "delete_note" call

* Inbox notification: Added layout changes (https://github.com/woocommerce/woocommerce-admin/pull/4256)

* Added notes layout and image to the API

Added note layout and note image to the API and the DB

* Unit test modified

Unit test where modified to adapt them to the new elements

* Changed the frontend following the new designs.

The fronted was changed to follow the new inbox messages design.

* Changed default layout type in DB

* Added all the requested visual element

Changed the cards' js, css and actions to achieve the visual requirements

* Added "layout" and "image" to inboxQuery

* Modal confirmation buttons repaired

* Added "layout" and "image" to docs examples.

* Removed "updateNote" from action.js

Removed "updateNote" from action.js, I left it by mistake.

* Spelling error corrected

The button text "Dismiss all message" was corrected

* noteName removed and icon added to make code reviewing easier

This commit removes the "noteName" from card.js and adds the icon to make code reviewing easier

* Dismiss action button refactor

Refactor of the dismiss action button in the InboxNoteCard class

* Removed unnecessary control

* Destructured all the note properties

* Colors replaced by existing variable

* Removed setting of layout and image in the creation of the notes

* Removed blank lines added by mistake

* Close dismiss dropdown when clicking away from the  popover.

* Prevented the closing of the inbox panel with an action in the modal

* Added small design changes

* Removed unused "Gridicon" import

* Prevent showing the image tag when the layout is blank

* The method name getDismissButton was changed to getDismissConfirmationButton

* Removed unnecessary vendor-prefixed properties

* Improved note filtering in unreadNotes method

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Update client/header/activity-panel/panels/inbox/style.scss

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Inbox notification: Remove icons (https://github.com/woocommerce/woocommerce-admin/pull/4258)

* Info icon removed from inbox notifications

The info icon was removed from inbox notifications

# Conflicts:
#	src/Notes/DataStore.php

* Removed "icon" from inboxQuery

* Tests repeared

Some problems with the unit tests were repaired in this commit

# Conflicts:
#	docs/examples/activity-panel-inbox.md

# Conflicts:
#	tests/api/admin-notes.php

* Removed icon from card.js

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

* Improved error handling for the set_layout method

* Bugfix: fixed error handling clicks inside dropdowns

* Bugfix: repaired dropdown onBlur handler

This commit repairs a weird behavior that the dropdown onBlur handler method had sometimes.

* Text error changed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Stopped sending the "dismissType" to action.js

The "dismissType" is not sent to action.js anymore.

# Conflicts:
#	client/header/activity-panel/panels/inbox/card.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>

* Bugfix: solved problem when a note was undismissed

There was a problem with the undismiss functionality. When a note was undismissed, it always was recovered with "plain" layout. This commit solves this problem.

* Inbox notification: add event recording (https://github.com/woocommerce/woocommerce-admin/pull/4320)

* Added events recording

This commit adds events recording to the inbox notifications

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Added 'home_screen' verification

Changed recorded name, now when the client is in the WooCommerce 'home' page we record 'home_screen' instead of 'wc-admin'.

* Added a naming fix and a new prop to the recordEvent

* bugfix: added control before interaction with bodyNotificationRef

* Added more unit tests for new endpoints

This commit adds tests for deleting a single note and for deleting all the notes, both without permission.

* Modified variable name

* Refactor: prop rename and small logic change

* Screen name getter moved into the InboxNoteCard

This commit moves the screen name getter inside the InboxNoteCard.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Removed "screen" from state

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

* Refactor in admin-notes unit tests

Some unnecessary controls were removed from the admin-notes unit tests

* Indentation fixed in Install.php. Replaced spaces with tabs.

* Inbox notification: added new placeholder and empty card (https://github.com/woocommerce/woocommerce-admin/pull/4379)

* Added a new placeholder and an empty card

This commit adds a new placeholder and a new empty card to the inbox panel

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js
#	client/header/activity-panel/panels/inbox/style.scss

* Added border to read notes

* Improved note filtering in unreadNotes method and validNotes

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Actions render refactored

The actions render was refactored in InboxNoteCard component

* Refactor of InboxPanel component

The methods getUnreadNotesCount and hasValidNotes were separated from the InboxPanel component

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Refactor inbox panel subtitle classes

* Added changes for when a note is undismissed

This commit adds the requested changes in behavior and design for when a note is dismissed.

# Conflicts:
#	client/header/activity-panel/panels/inbox/index.js

* Bugfix: Added key to itemlist

The InboxNotePlaceholder is shown as an itemlist but it didn't have a key. This commit adds it.

* Removed unnecessary validation

* Refactored actionList map

This commit adds a refactor to the actionList map

* Changes to the getUndoDismissRequesting functionality

This commit adds a few changes to the getUndoDismissRequesting functionality

* Changed className prop

* Changed other className prop

* Modified InboxPanel rendering

* Removed unnecessary method in placeholder.js

* Simplified the card.js renderActions method

* Change renderActions return in card.js

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

* Inbox notification: add client unit tests (https://github.com/woocommerce/woocommerce-admin/pull/4386)

* Added client unit tests

* Added test cases for getUnreadNotesCount and hasValidNotes

* Corrected typo error

* Removed Enzyme and added React Testing Library

* Removed unnecessary param

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

* Resolved some conflicts with master

* Marketing note test repaired

This commit repairs the marketing note test

* Added note type 'marketing' to delete all functionality

* Removed set_icon method from some notes and docs

* Added set_icon method as deprecated to prevent errors.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2020-06-03 08:43:35 -03:00
Paul Sealock 7a62d36516 Filters: Fix static query parameters (https://github.com/woocommerce/woocommerce-admin/pull/4458)
* Fix Filters' staticParams

* Don't update report table page when chart type is changed or filter menu has been opened.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-06-02 11:03:26 +12:00
Paul Sealock 4cddf7f671 Remove old OBW wc-api method (https://github.com/woocommerce/woocommerce-admin/pull/4469) 2020-05-30 22:59:10 +12:00
Joshua T Flowers 19f209c8dc Await profile items update in skip (https://github.com/woocommerce/woocommerce-admin/pull/4471) 2020-05-29 18:18:15 +03:00
Jeff Stieler 396db4447a OBW: JP step - use the correct store name for updating profile items. (https://github.com/woocommerce/woocommerce-admin/pull/4468) 2020-05-29 13:01:14 +03:00
Paul Sealock 16cb332f28 IconButton: Replace with Button (https://github.com/woocommerce/woocommerce-admin/pull/4415) 2020-05-29 14:32:37 +12:00
Paul Sealock 54c00eecf9 Homepage: Add tracks events to Stats List period changes (https://github.com/woocommerce/woocommerce-admin/pull/4448) 2020-05-29 12:40:51 +12:00
Joshua T Flowers f132e35c7b Add EU VAT extension note (https://github.com/woocommerce/woocommerce-admin/pull/4452)
* Add EU VAT extension note

* Add note types to default notes query
2020-05-28 11:52:25 +03:00
Joshua T Flowers d14fd4dbe1 Migrate onboarding data store to wp data (https://github.com/woocommerce/woocommerce-admin/pull/4433)
* Migrate onboarding from wc-api to wp-data store

* Add tests for onboarding reducer

* Update references to onboarding data store

* Update tests for replacing profileItems

* Add onboarding hydration for profile items

* Prevent store from being registered twice

* Add requesting state to onboarding store

* Prevent duplicate registration on all wp data stores

* Update more components to use new wp data onboarding store

* Add tests for onboarding requesting state

* Update isRequesting to use isOnboardingRequesting
2020-05-28 11:51:40 +03:00
Jeff Stieler cd146b388e Update TaskList design (https://github.com/woocommerce/woocommerce-admin/pull/4434)
* Update task list to closer match new designs.

* Update TaskList placeholder to match the new design.

* Hook up store details task click.

* Don't show "skip" prompt for task list on new home screen.

* Update time estimates for tasks.

* Add progress indicator to TaskList.

* Use null container for store details task.

* Fix progress bar styling.

* Just use card menu for TaskList dismissal.

* Don't show TaskList on analytics overview if homepage feature is enabled.

* Initial refactor of TaskList to use WP card.

* Style TaskList items and card header.

* Style "hide" button for TaskList.

* Don't show TaskList after it's completion.

* Don't show TaskList placeholder when options are still loading.

Avoid a potential flash of the placeholder without showing the TaskList.

* Fix border radius on progress bar.

* Fix TaskList header style with homepage feature disabled.

* Remove defunct function.

* Remove unnecessary import.

* Some minor color tweaks (https://github.com/woocommerce/woocommerce-admin/pull/4436)

* Colors

* Only show time estimation for incomplete tasks

* Don't show chevron on completed tasks.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>

* Preload task list completed option, show placeholder when loading.

* Fix alignment of "hide this" button.

Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-05-27 10:08:39 -06:00
Bec Scott 925db4dfd6 Add install Jetpack CTA to stats on home page (https://github.com/woocommerce/woocommerce-admin/pull/4442)
* Add install Jetpack CTA to stats on home page

* Fix installed/activated logic and change the install text depending on the plugin state

* Hold user data properly so it works

* Fix hover and focus styles for the primary button

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-05-27 12:38:57 +10:00
Jason Conroy 308a14ff38 Bind onClick event handler for marketing kb article click (https://github.com/woocommerce/woocommerce-admin/pull/4437) 2020-05-26 08:33:58 +09:30
Paul Sealock 96a4856940 OBW: Get utils plugins data from wp.data (https://github.com/woocommerce/woocommerce-admin/pull/4362)
* OBW: utils, get plugins from dataStore

* better

* add installedPlugins argument
2020-05-25 12:26:08 +12:00
Joshua T Flowers 3a88b6f980 Add setting to see if WcPay is configured (https://github.com/woocommerce/woocommerce-admin/pull/4145) 2020-05-22 13:40:10 +03:00
Jeff Stieler 3c8490c26b Add existing TaskList component to new home screen (https://github.com/woocommerce/woocommerce-admin/pull/4378)
* Move TaskList component up in directory tree.

* Render the TaskList on the new home screen.

* Render single tasks in isolation on new home screen.

* Fix "is requesting" selection for options API.

* Add loading placeholder for TaskList.

* Add initial test for the task list on the home screen.

* Fix dynamic imports under test.

* Add test for inline TaskList on home screen.

* Test that single task view works on new home screen.

* Restore Jest mocks between tests.

* Fix linting errors.
2020-05-21 11:15:08 -06:00
Paul Sealock fbd41ceca7 Homepage: Style summary numbers (https://github.com/woocommerce/woocommerce-admin/pull/4370)
* Homwpage: add SummaryNumbers to display data

* fixup merge styles

* move style overrides to stats-list
2020-05-21 10:15:18 +12:00
Paul Dechov 0972cac0d0 Task List: Small fixes and adjustments to WCPay task (https://github.com/woocommerce/woocommerce-admin/pull/4373)
* Fix WCPay task Settings link

Fixes woocommerce/woocommerce-admin#4293 by setting link type for new pageload.

* Check for success query param to show notice

* Shrink WCPay task footnote so it fits in one line

* Remove unnecessary Fragment wrapper

* Omit option update from client side

The payment method is already enabled when the connection is finalized on redirect.
2020-05-20 14:25:28 -04:00
Ron Rennick 756dd8c1de make revenue total sales column optional (https://github.com/woocommerce/woocommerce-admin/pull/4397) 2020-05-20 13:03:30 -03:00
Matt Sherman 039626649b Home Screen: Switch to @wordpress/icons on Store Management (Quick Links) card (https://github.com/woocommerce/woocommerce-admin/pull/4400) 2020-05-20 09:34:49 -04:00
Joshua T Flowers 1f11358cfb Separate Jetpack connection logic in shipping task (https://github.com/woocommerce/woocommerce-admin/pull/4381)
* Separate Jetpack connection logic in shipping task

* Don't check for Jetpack activation on Connect step
2020-05-20 12:43:09 +03:00
Daniel Bitzer c6371c32db Fix in app purchase back link for recommend marketing extensions card (https://github.com/woocommerce/woocommerce-admin/pull/4301)
* Add getInAppPurchaseUrl lib function

* Implement getInAppPurchaseUrl for marketing tab

* Include the directory with the wccom-site param

* use getInAppPurchaseUrl helper function in onboarding CartModal component

* Fix 'addQueryArgs' is defined but never used

* Fix Missing JSDoc @return description

* Make connectNonce setting a global setting rather than a marketing once

Co-authored-by: Jason Conroy <jason@findingsimple.com>
2020-05-20 15:03:58 +09:30
Matt Sherman d1ec055035 Home Screen: Add Store Management (Quick Links) card (https://github.com/woocommerce/woocommerce-admin/pull/4350) 2020-05-19 09:16:19 -04:00
Paul Sealock f45fecfbed Advanced Filters: fix currency initialization (https://github.com/woocommerce/woocommerce-admin/pull/4356)
* Advanced Filters: fix currency initialization

* fix readme

* get formatCurrency method
2020-05-19 14:38:02 +12:00
Joshua T Flowers 65145bf92c Add Jetpack connection to plugin benefits step (https://github.com/woocommerce/woocommerce-admin/pull/4374)
* Allow updateActivePlugins to add new plugins instead of replace

* Add autoConnect prop to Jetpack Connect component

* Add connect component to plugin benefits screen

* Add onError and missing prop types for Connect

* Update redirect URL after Jetpack connection

* Add tests for added active plugins

* Skip install if plugin error exists

* Update active and installed plugins to use replace flag

* Update tests to handle replace flag

* Refactor plugin install flow pending state
2020-05-19 12:47:25 +12:00
Joshua T Flowers 35616d5f22 Enable tracking on the fly during onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4368)
* Enable the tracking scripts from client-side on opt-in

* Add more info to tracks debug

* Disable tracks if opted out
2020-05-18 13:35:50 -06:00
Paul Sealock 8430b1cba7 Homepage: Add stats numbers (https://github.com/woocommerce/woocommerce-admin/pull/4288) 2020-05-14 15:23:03 +12:00
Jeff Stieler 3e48eba385 Get installed plugins from new plugin settings object. (https://github.com/woocommerce/woocommerce-admin/pull/4357) 2020-05-12 18:29:41 -06:00
Paul Sealock 4beb28ce20 Homepage: Add layout with sticky columns (https://github.com/woocommerce/woocommerce-admin/pull/4347)
* Add homepage layout

* temp tests

* remove test placeholder

* functional component

* remove errant comment
2020-05-13 11:14:08 +12:00
Bec Scott 88a9f1c415 Guard against null themes (https://github.com/woocommerce/woocommerce-admin/pull/4244)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-05-08 17:12:37 +10:00
Paulo Iankoski 015fc89dbd Increase selector specificity (https://github.com/woocommerce/woocommerce-admin/pull/4289)
* Increase selector specificity

* Include exception for some WC pages

Co-authored-by: Paulo Iankoski <me@wpdev.com.br>
2020-05-07 09:17:50 +10:00
Jeff Stieler 4f48ae9fb7 Fix Dashboard flash before OBW chunk loads. (https://github.com/woocommerce/woocommerce-admin/pull/4259)
* Document the `woocommerce_admin_is_loading` filter.

* Prevent dashboard from being visible during ProfileWizard chunk load.

* Delay removing loading class rather than adding full screen class prematurely.
2020-05-06 06:56:23 -06:00
Paul Sealock 3fc69b9739 Homepage: Add stats overview selection (https://github.com/woocommerce/woocommerce-admin/pull/4264)
* Homwpage: add stats overview stat toggle

* toggle stats

* fix

* tests

* better hook name

* clean up

* add back in Fragment

* remove extra prop

* better test name
2020-05-05 10:58:39 +12:00
Joshua T Flowers 586760c561 Adds the onboarding payments note (https://github.com/woocommerce/woocommerce-admin/pull/4157)
* Save payment skipped and event timestamp to options

* Add payments note

* Convert payments task timestamp to seconds

* Skip payments note if skip timestamp is not set
2020-05-04 14:33:11 +03:00
David Stone 8ebd33fe6b Use Route based code splitting to optimize bundle size (https://github.com/woocommerce/woocommerce-admin/pull/4094)
* Use lazy loading to split up the size of the js downloaded

* Use lazy loading to split up the size of the js downloaded

* Add Moment Timezone plugin to reduce size of data file.

* Lazy load header panels and use Dashicons for faster loading

* Load assets from the correct publicPath

* Load assets from the correct publicPath

* PHP cs fixes

* Fix missing quotes on string literal.

* Fix PropType warning for lazy loaded component.

* Separate the task list and dashboard chunks.

* Lazy load dashboard sections.

* Restore original icons and reduce size by importing only the icons needed

* Lazy load alerts to save more Kb on initial load

* Minify built JS in production mode.

* Add preload tags for WC Admin assets. (https://github.com/woocommerce/woocommerce-admin/pull/4162)

* Fix linting errors.

* Add modified UnminifiedWebpackPlugin.

* Produce minified and unminified bundles for all builds.

* Remove unused variable from webpack config.

* Run unminify after sourcemap generation.

* Only hook after optimization if we're using a devtool.

* Add minification suffix in Loader::get_url().

* Lazy load OBW on new home screen.

* Move OBW style up a level to layout.

* Hydrate ProfileWizard independently of withSelect and withDispatch

* Fix order of composition and fallback function when using hydration.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-04-29 12:01:27 -06:00
Chris Shultz f401b852f1 Make button hover color match WCS modal button hover color. (https://github.com/woocommerce/woocommerce-admin/pull/4230) 2020-04-28 07:25:28 -07:00
Paul Sealock 612790227c Add React Testing Library (https://github.com/woocommerce/woocommerce-admin/pull/4221) 2020-04-28 10:15:40 +12:00
Jeff Stieler e893ce3c54 Fix OBW when new home screen is enabled. (https://github.com/woocommerce/woocommerce-admin/pull/4215)
* Move ProfileWizard component out of Dashboard.

* Don't trigger the OBW from the Analytics Dashboard (with new home screen).

* Trigger OBW from the new home screen.

* Fix duplicate import.
2020-04-27 08:56:15 -06:00
Jeff Stieler 6140e7994f New home screen pageview tracking (https://github.com/woocommerce/woocommerce-admin/pull/4189)
* Specify home screen in tracks event when enabled.

* Add Jetpack info to home page Tracks event.

* Use @wordpress/data's withSelect - no need for wc-api.

* Add plugins hydration to existing compose() call.

* Safer access of wcSettings object in plugins hydration.

* Remove redundant plugins hydration from TaskList and ProfileWizard.
2020-04-27 08:41:26 -06:00
Ron Rennick 5b201365dd POC store navigation (https://github.com/woocommerce/woocommerce-admin/pull/3202)
* Add base nav component

* Check if current screen is WC registered page

* Add core menu items

* Add param for menu items to migrate and hide old menu items

* Add body classes for wc navigation

* Check capability before adding menu items

* Add submenu items to frontend component

* Hide wc nav behind option

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2020-04-27 12:30:32 +03:00
Daniel Bitzer 16fdae3d06 Hide Marketing Tab Recomended Extensions card if marketing suggestions are disabled (https://github.com/woocommerce/woocommerce-admin/pull/4194)
* Add allowMarketplaceSuggestions to woocommerce_shared_settings

* Convert to functional component

* Hide ReccomendedExtensions card if opted out from marketing suggestions
2020-04-24 15:41:57 -07:00
Job 41f3859ad5 Change "Demo" to "Sample" products (https://github.com/woocommerce/woocommerce-admin/pull/4184)
* Change "Demo" to "Sample" products

A few years ago we had a discussion on the name of the files for test products and we choose "sample" data over "dummy" data. I think we should likely stick to that naming (which is also the name of the folder and the files in WC core: https://github.com/woocommerce/woocommerce/tree/master/sample-data)

This commit changes that wording

* Small update in caps of "Build a better WooCommerce"

All titles and questions in the new onboarding wizards only capitalise names and the first letter of the sentence. This seemed a tiny bit off.
2020-04-24 12:23:45 +02:00
Rasmy Nguyen 4fd6a17154 Remove auto connect functionality from Stripe payment task (https://github.com/woocommerce/woocommerce-admin/pull/4164)
* Remove auto connect steps from Stripe payment task

As of May 31 the API for stripe account auto creation will no longer be
supported. As a result, the Stripe payment on-boarding step will no
longer be able to auto create accounts for users.

This removes all auto connect functionality from this step, and instead
falls back to the oAuth setup flow.

See:
https://wcpay.wordpress.com/2020/02/06/stripe-ending-support-for-the-deferred-account-activation-api-on-may-31/#comment-2080

* Fix logic to decide which connect method to render

When the Stripe component renders for the first time, it
always returns the manual connect method. This is because there is
an additional call to requiresManualConfig() in getConnectStep which
looks for values in activePlugins that won't be present on the initial
component render.

This removes this check and instead relies on the isPending state to
help decide to render a connect method or wait for oAuth connectURL
to finish fetching.

* Remove redundant error modal render method

This removes the error modal render method as it is also no longer
needed with the removal of auto account creation.

This also removes errorMessage and errorTitle state along with any
references to these values.
2020-04-24 09:28:29 +09:00
Paul Sealock 2f8ba63ec0 Homepage: Add Hello World, routing, and feature flag (https://github.com/woocommerce/woocommerce-admin/pull/4169)
* Homepage: Add hello world

* check feature flag

* homepage folder

* whitespace
2020-04-23 09:32:44 +12:00
Jeff Stieler 267c95e8d5 Reduce queries in Inbox Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3977)
* Notes panel: only request fields needed for render.

* Avoid retrieving post meta for WC_Admin_Note objects.

It's an ID collision anyhow.
2020-04-22 10:05:11 -06:00
Fernando 9712f4259c OBW: "activated" success message upon continuing with existing theme (https://github.com/woocommerce/woocommerce-admin/pull/4148)
* Changed element that is compared after choosing a theme

Onboarding - There was a problem in the theme verification where at the end of the profiler it always went into the installation flow. This problem was solved in this commit.

* Added check to choose the right flow (install or activate plugin)

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-21 09:13:04 -03:00
Joshua T Flowers acd158057c Add profiler step view tracks (https://github.com/woocommerce/woocommerce-admin/pull/4141)
* Add profiler step view tracks

* Track plugins to install on benefits screen

* Use getCurrentStep method instead of prop query to check step
2020-04-21 12:19:32 +03:00
Paul Sealock 8e22e30228 OBW: respect Store Location async (https://github.com/woocommerce/woocommerce-admin/pull/4149)
* OBW: respect Store Location async

* Fix "Configure" button on "Configure tax rates" step

* Wait and check for settings errors when updating automated tax

* remove this.completeStep() froom async callback

* Revert "remove this.completeStep() froom async callback"

This reverts commit 51a43b31d779db6aa4587ee1dd0a8fb012728439.

* Check if update hasn't already put user on success screen

Co-authored-by: Matt Sherman <matt@jam123.com>
2020-04-21 12:12:38 +12:00
Paul Sealock 28c85668fb Plugins: Move API out of Onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4093)
* Plugins DataStore: decouple from onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4048)

* Plugins DataStore: Add client side store

* change active_plugins to public static function

* don't change shape of allowed plugins
2020-04-20 14:04:13 +12:00
Daniel Bitzer bceb25ba0f Improve layout of Installed Extensions marketing card for tablet and mobile screens (https://github.com/woocommerce/woocommerce-admin/pull/4063)
* Set a max word length for the installed extension descriptions

* Improve InstalledExtensions layout for tablet and mobile

Mobile still needs work…

* Align product icon to top

* Tweak WelcomeCard mobile appearance

* Fix alignment
2020-04-17 11:27:22 -07:00
Paul Sealock c500d3fa98 Plugins DataStore: decouple from onboarding (https://github.com/woocommerce/woocommerce-admin/pull/4048)
* Plugins DataStore: Add client side store
2020-04-17 11:58:36 +12:00
Daniel Bitzer ae526f7e1e Fix confusing UX when knowledge base card fails to retreive posts (https://github.com/woocommerce/woocommerce-admin/pull/4133)
* Use EmptyContent component when there are no knowledge base posts

* Reduce transient timeout to 15 mins when remote get fails

* Satisfy phpcs

* Satisfy jslint
2020-04-16 10:19:20 +09:30
Paul Sealock 67b417af03 Store details: check if industries exist before trimming (https://github.com/woocommerce/woocommerce-admin/pull/4120) 2020-04-14 11:46:41 -07:00
Paul Sealock 61f650a2a2 OBW: allow CBD only for US stores (https://github.com/woocommerce/woocommerce-admin/pull/4117)
* OBW: allow CBD only for US stores

* fix if user goes back

* industry.js feedback

* store-details feedback

* better naming
2020-04-14 13:41:51 +12:00
Fernando b96ee37992 Onboarding - business details step: increase max-height on competitors listbox (https://github.com/woocommerce/woocommerce-admin/pull/4111)
* Enlarged competitors' Listbox in the Onboarding

Onboarding - Added a new class to enlarge the competitors' Listbox in the Business details step.

* Replaced fixed height with unset

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-13 11:43:57 -03:00
Harris Wong 75522436f4 Overwrite button overflow css from Wordpress 5.4 defaults (https://github.com/woocommerce/woocommerce-admin/pull/4108) 2020-04-10 09:54:06 -06:00
Jeff Stieler 9973e7e36f Handle orphaned order statuses in analytics settings. (https://github.com/woocommerce/woocommerce-admin/pull/4090)
* Add method to retrieve all synced order statuses.

* Determine what unregistered order statuses we have and add to client-side settings object.

* Stop filtering out unregistered statuses from analytics settings.

* Add unregistered statuses to analytics settings fields.
2020-04-10 08:42:03 -06:00
Fernando 1e1daaa6bb Added check to show WC Pay option only when Jetpack is connected (https://github.com/woocommerce/woocommerce-admin/pull/4105)
* Added check to show WC Pay option only when Jetpack is connected

A verification was added to the Setup Checklist payment step, to show WC Pay option only when Jetpack is connected

* Changed the solution approach

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-10 11:10:47 +12:00
Fernando 866487ee27 Bugfix on payments step in CBD flow (https://github.com/woocommerce/woocommerce-admin/pull/4061)
* Bugfix on payments step in CBD flow

The `array_search` method was changed to `in_array`

* After pressing Connect a new tab opens with the Square webpage

* Updated behavior for non CBD Square payment connection

* Square option's name updated

* Replaced <p> tag with a <div> tag

Since there was a `validateDOMNesting` warning because we weren't adding only text inside a <p> tag, the `p` tag was changed to a `div`.

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-04-08 16:17:32 -07:00
Timmy Crawford acfae2c356 Setup Checklist: Remove Setup Menu Item and I'll Do This Later link (https://github.com/woocommerce/woocommerce-admin/pull/4085)
* Remove  menu item

* Remove 'do this later' link
2020-04-08 14:27:24 -07:00
Timmy Crawford 28a43f18c1 Setup Checklist: Fix exception in shipping. (https://github.com/woocommerce/woocommerce-admin/pull/4071) 2020-04-08 08:19:38 -07:00
Joshua T Flowers 94eec721c0 Fix double prefixed wcadmin events (https://github.com/woocommerce/woocommerce-admin/pull/4065) 2020-04-08 14:35:16 +03:00
Jeff Stieler ecd0568c8c OBW: fix use of unbound this in business details step. (https://github.com/woocommerce/woocommerce-admin/pull/4070) 2020-04-07 12:08:17 -06:00
Jeff Stieler 851d826634 Replace welcome image on marketing tab with svg. closes woocommerce/woocommerce-admin#4057 (https://github.com/woocommerce/woocommerce-admin/pull/4066)
Co-authored-by: James Koster <james@jameskoster.co.uk>
2020-04-06 16:39:18 -06:00
Matt Sherman b996b69b6f Fix RTL issues with `wc-admin` pages (https://github.com/woocommerce/woocommerce-admin/pull/4051)
* Flip summary item's delta 'right' arrow when RTL
* Prevent chart legend checkbox from flipping in RTL
* Flip store alerts pagination arrows in RTL
2020-04-03 07:26:24 -04:00
Paul Sealock cb4ba39e30 Dynamic Currency with Context API (https://github.com/woocommerce/woocommerce-admin/pull/4027)
* Make currency setting dynamic with context API

* reference Currency

* what is 'this'

* remove comment

* All report tables

* Customers report

* activity panel

* leaderboard test

* business details

* store details

* single source of truth

* shipping rates

* remove currency-format.js

* tidy up

* make Currency a factory function

* factory revenue table

* tables

* Chart y-axis labels

* customers table

* cleanup

* business details

* shipping

* number-format

* stock and downloads tables

* changelog

* cleanup

* SQL example: update to dynamic currencies (https://github.com/woocommerce/woocommerce-admin/pull/4033)
2020-04-03 10:54:38 +13:00
Matt Sherman ee0eec8a40 Support IE11 in `wc-admin` (https://github.com/woocommerce/woocommerce-admin/pull/4037)
* Include `marked` in node_modules run through babel
* Fix adding of `Setup` menu item in IE11
2020-04-01 12:03:13 -04:00
Brent Shepherd 7cf441038f Update WC Pay Dev Mode doc link (https://github.com/woocommerce/woocommerce-admin/pull/4026)
Updates placeholder doc link added in woocommerce/woocommerce-admin#3978
2020-04-01 08:26:50 -07:00
Joshua T Flowers 1f7ca63289 Onboarding: Remove plugins step from profiler (https://github.com/woocommerce/woocommerce-admin/pull/3974)
* Use plugin component with autoinstall in benefits step

* Cache plugins to install to prevent render changes on install

* Add busy state to button when installing

* Prevent multiple requests being fired when awaiting next step

* Disable buttons when actioned
2020-04-01 08:24:51 -07:00
Jeff Stieler 92a0f19058 Update default dashboard view. (https://github.com/woocommerce/woocommerce-admin/pull/4035)
* Hide some more performance indicators by default.

Don't show: AOV, Returns, Gross Sales.

* Fix default hidden dashboard chart identifiers.

They were missing the expected endpoint prefix.
2020-03-31 18:58:06 -06:00
Jeff Stieler 0fd403ea20 Fix aria-label attribute. (https://github.com/woocommerce/woocommerce-admin/pull/4034) 2020-03-31 18:57:40 -06:00
Jeff Stieler f8bc173cfb Only query requested stat totals in reports. (https://github.com/woocommerce/woocommerce-admin/pull/4009)
* Pass specified totals/intervals fields parameter to the Order Stats Query.

* Only request stats used in render for report summaries and charts.

Implement Orders as an example.

* Specify stats fields for all report requests.

* Add 'fields' parameter handling to all stats endpoint controllers.

* Reduce stats fields requested by dashboard charts.
2020-03-31 09:08:40 -06:00
Allen Snook a33a65222c Use a Recommended pill (not a ribbon) for WooCommerce Payments (https://github.com/woocommerce/woocommerce-admin/pull/4024)
* Use recommend pill not ribbon for wcpay

* Tweak CSS, dark purple too plz
2020-03-31 05:58:11 -07:00
Jason Conroy e5bd8f3184 Marketing Tab MVP (https://github.com/woocommerce/woocommerce-admin/pull/3953)
* Add Marketing feature flag

* Add marketing page and menu item

* Register marketing page with layout controller

* Add initial marketing cards

* Add max-width to marketing overview page

* Add initial marketing WelcomeCard component

* Make marketing welcome card permanently dismiss

* Add a readme for the marketing page components

* Record tracks event when marketing welcome dismissed

* Match design width

* Add welcome image and initial styles

* Use gridicon for close button

* Fix whitespace

* Add PluginsHelper::get_plugin_data()

* Add initial Marketing\InstalledExtensions class

* Preload installed marketing extensions data

* Tweak extension statuses

* Add InstalledExtensionRow component

* Add initial extension data to InstalledExtensions card

* Refactor PluginsHelper::get_plugin_data method

Using the new get_plugin_path_from_slug method

* Ensure get_plugins() function is available for PluginsHelper

* Simplify using PluginsHelper method

* Add MailChimp configured status logic

* Add links to InstalledExtensionRow component

* Add key prop to extensions list

* Setup styles for InstalledExtensions card

* Display nothing if no installed extensions

* Add InstalledExtensions::get_allowed_plugins()

* Setup Marketing Overview API controller

* Add /activate-plugin marketing endpoint

* Add more extensions URL props

* Add Facebook extension configured status logic

* Update Facebook extension URL props

* Fix extenion data logic

* Move component into it’s own directory

* Setup /marketing/overview/recommended endpoint

* Initial marketing page card header styles

* Add basic extension data to RecommendedExtensions

* Use color as variable

* Tweak card header padding for design

* Add basic styling to RecommendedExtensions card

* settingsUrl is not available if the plugin is not active

* Add /marketing/overview/installed-plugins REST endpoint

* Add basic activation functionality to InstalledExtensions component

* Don’t throw error on success

* Add MVP data store for installed extensions card

* Add core dark blue color variable

* Add styles for installed extensions card

* Move knowledge-base component to its own directory

* Pull recommended marketing plugins from remote test site

* Hide description when configured

As per design

* Tweak colors based on design

* Finish off styling for RecommendedExtensions

* Limit recommended extensions to 6 items

* Add error handling to RecommendedExtensions card

* Rename ‘copy’ extension prop

* Add marketing button component to match design

* Create ProductIcon component for marketing

* Add InstalledExtension icons

* Fix icon image paths

* Add ProductIcon to InstallExtensionRow

* Final styling to installed extensions card row

* Knowledge base card placeholders

* Fix missing icons when plugin not activated

* Remove logging

* Tweak array structure to ensure we have an array in JS

and not an object

* Refactor KnowledgeBase marketing component

- We don’t need loop through every post when rendering, just pick the posts we need
- Remove unused classes

* Move padding from each slide to the container

* Improve slider animations by absolute positioning the slides

* Reduce the slider animation timeout and add a note

* Add in-app purchase flow url params for recommended extensions

* Fix slider animation

* Reset slider height on window resize

* Short slider animation, fix double margin on smaller screens

* Add initial marketing/knowledge-base endpoint

* Pull knowledge base posts from API

* Rename welcome card dismiss tracks event

* Record event on recommended product click

* Recond onclick events for installed extensions card

* Record event when carousel navigation clicked

* img elements must have an alt prop

* Remove import that is never used

* use camelCase

* Decode HTML entities from API call

* Remove unused container div

* Add card loading state

* Add images to knowledge base card

* Link knowledge base posts

* Use the Pagination component rather than duplicate it’s functionality

* Clean up and rename knowledge base slider

* Clean knowledge base CSS and update responsive styles for single post slide

* Add a README for button component

* Add README for product icon component

* Add initial readme for Slider component

* Add correct image sizes to knowledge base slider, finalize styles

* Fix extension link urls

* Resolve some code formatting issue

* Bind class click methods to this

* Wrap nodes in Fragment

* Fix wccom-back path

* Add placeholder author and gravatar

Default avatar url size returned from the API is currently set to 96 so I’ve done a simple replace with 16

* Fix style-lint expected new line

* Add docblock for get_knowledge_base_posts()

* Setup data store for marketing to handle installedExtensions card

* Fix function names

“Activating” not “installing”

* Move welcome card component to its own dir

* IconButton component is going to be deprecated

ref: https://github.com/WordPress/gutenberg/pull/19299

* Support multiple activating plugins in the data store

* Rename extension to plugin for consistency

* Add propTypes to component

* Rename data-store/ to data/

* Fix import paths

* Extract isActivatingPlugin logic into datastore

* Move data store selectors into own file

* POST requests are not cached

* Export apiFetch action

* Don’t wrap API response in object

* Implement data store for recommended extensions

* Implement data store for marketing knowledge base

* Tidy getRecommendedPlugins resolver

* Try a cross browser cover/crop image effect to fit proposed design

And help fit longer titles in

* Add caught errors to handler

* Adjust positioning so watermater is displayed

* InstalledExtensions phpcs fixes

* Marketing phpcs fixes

* Alignment fix

* MarketingOverview phpcs fixes

* Missing full stop

* Update breadcrumbs to use new approach

* Fix style lint issues

* Record `marketing_knowledge_article` track event on knowledge base post click

* Import apiFetch and controls from @wordpress/data-controls

* Hex color to lowercase

* Remove duplicate method after rebase

* Use new showPageArrowsLabel rather than hide with CSS

* Fix blurry avatars on hidpi displays

* Hide avatar if URL is falsy

* Replace test author data with live data

* Combine conditionals into ternary

* Combine conditionals into ternary

* Simplify class column logic

* Only preload option and component settings in the admin

* Fix isActivatingPlugin not updating

Component was not re-rendeding.

* Use querySelector over getElementsByClassName

* Hide Marketing Welcome Card immediately on click

* Use create-a-ticket url for supportUrl and make that the default

* Add getInstalledPlugins resolver with preloaded data

* Revert "Add getInstalledPlugins resolver with preloaded data"

This reverts commit b8b127ec6411bef15616576b3bb189dc31777c13.

* Load plugin data in a separate request after activation

* Update welcome image

* Don’t return plugin data in the activation request.

* A space is required before closing bracket

* Update Jest config to gracefully handle static assets

Ref: https://jestjs.io/docs/en/webpack#handling-static-assets

* Remove unused onExit property

* Remove placeholder README

* Use prop directly

* yield createNotice

* Add note to indicate which Category

* Increase transient time to 3 days

* Use $gap-small

* Add proptype

* Add debounce to slider height resize listener

* Clean up isLoading logic

* Dont show image elements if image data is empty

* Open knowledge base posts in a new window

* Add “noreferrer”

* Turn the tab on in all env

Co-authored-by: Daniel Bitzer <danielbitzer@gmail.com>
2020-03-28 06:48:27 -07:00
Allen Snook 078de3e9c0 Merge add/wc-pay to master, enabled for development only (https://github.com/woocommerce/woocommerce-admin/pull/4022)
* Add feature flag for wcpay (https://github.com/woocommerce/woocommerce-admin/pull/3958)

* Add card to payments task for WooCommerce Payments (https://github.com/woocommerce/woocommerce-admin/pull/3978)

* Add card to payments task for WooCommerce Payments

* Add missing plugin and settings PHP constants for woocommerce payments

* Add endpoint to return url to kick off wcpay

* Fix incorrect option name

* I can haz purple with white text, plz

* Linkify TOS, settings

* Recommend wcpay when visible; move wcpay to list top

* Test for wcpay feature flag

* Improved handling of feature flag

* If the user is an agency, include wcpay docs link on card

* Reverse agency logic, LOL

* Camel case fillRule etc

* Turn off wcpay for core and plugin for now
2020-03-27 16:24:32 -07:00
Fernando Espinosa b71bc861fb WooCommerce Shipping order page prompt (https://github.com/woocommerce/woocommerce-admin/pull/3955)
Co-authored-by: David Stone <david@nnucomputerwhiz.com>
Co-authored-by: Chris Shultz <chris.shultz@automattic.com>
Co-authored-by: Harris Wong <harris.wong@a8c.com>
2020-03-27 13:42:58 -07:00
Jeff Stieler f13b9f334f Reduce queries in Orders Panel. (https://github.com/woocommerce/woocommerce-admin/pull/3969)
* Allow on-demand retrieval of order line items in REST API.

* Orders Panel: reduce response fields from orders endpoint.
2020-03-27 13:01:19 -06:00
Matt Sherman 0f18d6a326 Change "Google Shopping" to "Google Ads" and update Google Ads logo (https://github.com/woocommerce/woocommerce-admin/pull/4007) 2020-03-27 13:18:27 -04:00
Paul Dechov 0e5cfb23c0 Onboarding: only validate other platform name for 'other' selling venues (https://github.com/woocommerce/woocommerce-admin/pull/4011)
Omit validation error (and resulting disabled "Continue" button) on the other platform name text field, in an edge case where the field is first required but value is missing, and then no longer required.
2020-03-27 11:57:25 -04:00
Darren Ethier 783f613815 wp.data Settings refactor
add data store for settings using wp.data

add use-select-with-refresh example

replace fresh-data usage with new settings data store for settings page

Add data package

move to packages

Fix isDirty after save

Add isBusy to primary button when saving

update Readme

remove comment

readme to use useSelect

Revert "update Readme"

This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.

Data Layer: Settings page to use Settings store (https://github.com/woocommerce/woocommerce-admin/pull/3430)

* Data Layer: Settings store as source of truth for settings page

This reverts commit 7402fd49b8f384fde5878e0bee0616f0a87bb4f6.

* fixup

* save on reset

* non mutable constants

* add set/getSettings

* save using setSettings

* separate HOC

* cleanup

* remove settingsToData

* withHydration

* remove withSettings HOC

* renmove useSettins for now

* withSettingsHydration updates

* Revert "withSettingsHydration updates"

This reverts commit f2adf108fbe19b574978fea5925a1a18e7ed3007.

* rename withSettingsHydration

* redo withSettingsHydration simplification

* restore

* useSettings

* render using useSettings

* handleInputChange working

* get setIsDirty working

* saving works

* reset and cleanup

* cleanup

* use snake case on hook files

* use clearIsDirty

* Avoid mutation on setting update

* remove @todo

* persiting -> isPersisting

* better reducer ternaries

* add wcSettings as arg to withSettingsHydration

reset package-lock

Settings: split out mutable wcAdminSettings (https://github.com/woocommerce/woocommerce-admin/pull/3675)

Settings: handle async settings groups (https://github.com/woocommerce/woocommerce-admin/pull/3707)
2020-03-25 16:20:17 +13:00