Commit Graph

25 Commits

Author SHA1 Message Date
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
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
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
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
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
Timmy Crawford f5d0da0b19 Merge final `version/1.0` branch with `master` (https://github.com/woocommerce/woocommerce-admin/pull/3848)
* Try: Moving Customers to main Woo Menu (https://github.com/woocommerce/woocommerce-admin/pull/3632)

* Only add onboarding settings on wc-admin pages when task list should be shown. (https://github.com/woocommerce/woocommerce-admin/pull/3722)

* Use cron for unsnoozing admin notes (https://github.com/woocommerce/woocommerce-admin/pull/3662)

* Use wp-cron for admin note snoozing.

* Remove "unsnooze" scheduled action.

* Use correct version.

* Avoid using deprecated method for unscheduling actions.

* Onboarding: Fix toggle tracking events (https://github.com/woocommerce/woocommerce-admin/pull/3645)

* Fix errant wcadmin prefix on event name

* Track the onboarding toggle on the option in case enable_onboarding isn't used

* Move toggle actions to separate function

* Move onboarding actions

* Move onboarding filters

* Move help tab updates to add_toggle_actions

* Only run onboarding actions when enabled

* Onboarding: Add tracks events when profiler steps are completed (https://github.com/woocommerce/woocommerce-admin/pull/3726)

* Add tracks for store profiler step completion

* Record event when profiler is completed

* Ensure continue setup loads the onboarding profiler (https://github.com/woocommerce/woocommerce-admin/pull/3646)

* 'All that include' option removed when input field is empty (https://github.com/woocommerce/woocommerce-admin/pull/3700)

* 'All that include' option removed when input field is empty

Added a control to check that when the input field 'Search by customer name' is empty, the 'All that include' option is not appearing.

* Const name improved

The constant name hasValues was changed to optionsHaveValues (more descriptive)

* Fix select text alignment (https://github.com/woocommerce/woocommerce-admin/pull/3723)

* Stock panel indicator - cache and use lookup tables. (https://github.com/woocommerce/woocommerce-admin/pull/3729)

* Stock panel indicator - cache and use lookup tables.

* Revise query, clear transient on product update.

* Fix error, ht Josh.

* Checklist: Remove sideloaded images to reduce build size, take 2 (https://github.com/woocommerce/woocommerce-admin/pull/3731)

* Remove homepage template images.

* Use other-small on all industries, adjust text color.

* Remove background dim and opacity set to 0

* Fix/3631 (https://github.com/woocommerce/woocommerce-admin/pull/3730)

* Added CBD as an industry type

CBD was added as an industry type in API

* Industries options modified

Modified the industries options. Now we are able to choose if we will use an input or not in the option.

* API control changed for industries.

API control changed for industries. Now it accepts the data type we need.

* Added input in Industries list for the option "Other"

Added an input for the option "Other" in the industries list

* Added suggested changes in review comments.

* Added data preparation for recordEvent

* Changed variable to snake_case

The variable "industriesWithDetail" was changed to "industries_with_detail" (snake_case)

* Onboarding: Create homepage without redirect (https://github.com/woocommerce/woocommerce-admin/pull/3727)

* Add link to edit homepage instead of redirect

* Add busy state to homepage creation button

* Publish homepage on create via API

* Update homepage notice to show on first post update

* Update homepage creation notice per design

* Record event on customize homepage

* Set homepage to frontpage on creation

* Add deactivation note for feature plugin (https://github.com/woocommerce/woocommerce-admin/pull/3687)

* Add version deactivation note

* Add the note to deactivate if the version is older than the current WC version

* Deactivate wc admin feature plugin on action click

* Add notes version hooks

* change the Package class namespace to exclude from standalone autoloader

* add use statement for FeaturePlugin

* add note explaining namespace

* use wc-admin-deactivate-plugin note name

* Rename file and class to WC_Admin_Notes_Deactivate_Plugin

Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>

* Add Travis tests on GH for release branch (https://github.com/woocommerce/woocommerce-admin/pull/3751)

* Add Travis tests on GH for release branch

* fix linter errors

* ActivityPanels.php -> use public static functions

* Remove free text Search option when no query exists (https://github.com/woocommerce/woocommerce-admin/pull/3755)

* Revert changes in woocommerce/woocommerce-admin#3700

* Don't add free text search if no query exists

* Add tests for Search without query

* Add test for showing free text search option

* Fix image sideloading for store industries. (https://github.com/woocommerce/woocommerce-admin/pull/3743)

* Fix image sideloading for store industries.

Data format changed in https://github.com/woocommerce/woocommerce-admin/pull/3730

* Fix industry image sideload in cases where the count is less than requested.

* Be backwards compatible with the old industry data format.

* Added event props to identify stores with WCS and Jetpack installed (https://github.com/woocommerce/woocommerce-admin/pull/3750)

* Added event props to identify stores with WCS and Jetpack installed

Also, added Jeckpack connected status

* Improved variable name

* Simplified method

Simplified method. "intersection" check was removed

* Tests errors repeared

The method "clear_low_out_of_stock_count_transient" now is static.

* OBW: fix sideloading image test error (https://github.com/woocommerce/woocommerce-admin/pull/3762)

* Release 0.26.0 changes (https://github.com/woocommerce/woocommerce-admin/pull/3753)

* add deactivation hook to Package.php (https://github.com/woocommerce/woocommerce-admin/pull/3770)

* Add active version functions (https://github.com/woocommerce/woocommerce-admin/pull/3772)

* add active version functions to Package.php

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

* 0.26.1 changes (https://github.com/woocommerce/woocommerce-admin/pull/3773)

* Customers Report: fix missing report param in search (https://github.com/woocommerce/woocommerce-admin/pull/3778)

* Product titles include encoded entities (https://github.com/woocommerce/woocommerce-admin/pull/3765)

* Stripped HTML from product titles and decoded before displaying them

Stripped html from product titles and entities are decoded before displaying them

* Stripped HTML from product titles and decoded in Stock report

Stripped html from product titles and entities are decoded before displaying them. Now in Stock report

* Added support for HTML tags and encoded entities on product titles

Added support for HTML tags and encoded entities on filtered product list, dropdown menus and tag names.
Also, strip_tags() function was replaced with wp_strip_all_tags() instead.

* strip_tags() function was replaced with wp_strip_all_tags() instead.

* Added control for a variable

Added control for "item->data" before applying wp_strip_all_tags method.

* pre-commit changes

* Test text corrected

* Enable taxes on automatic tax setup (https://github.com/woocommerce/woocommerce-admin/pull/3795)

* Update Country Labeling to Match Core (https://github.com/woocommerce/woocommerce-admin/pull/3790)

* Updated country labeling

Country labeling on Customer Report was updated

* Updated country labeling in other files

* remove .jitm-card notice padding (https://github.com/woocommerce/woocommerce-admin/pull/3814)

* OBW Connect: Fix requesting state (https://github.com/woocommerce/woocommerce-admin/pull/3786)

* OBW Connect: Fix requesting state

* pass down setIsPending

* setIspending propType

* defaultProps

* test

* Revert "test"

This reverts commit e921092b19401931cc1aec8ee84fa53c53b67f36.

* better comparison for redirect

* Fixes Taxes Report search bug and adds initial documentation. (https://github.com/woocommerce/woocommerce-admin/pull/3816)

* Initial Taxes Report documentation.

* Fix taxes endpoint search parameter.

* OBW: Fix retry plugin install button disappearing (https://github.com/woocommerce/woocommerce-admin/pull/3787)

* OBW: Fix retry plugin install btn disappearing

* try suggestion

* Revert "try suggestion"

This reverts commit 5b9386957a501ac3e729e5f16b0ee71c9d792859.

* Fix special character escaping in search. (https://github.com/woocommerce/woocommerce-admin/pull/3826)

* Properly prepare/escape special characters in Product search.

* Properly prepare/escape special characters in Coupon search.

* Properly prepare/escape special characters in Tax code search.

* Fix tracking on migrated options (https://github.com/woocommerce/woocommerce-admin/pull/3828)

* Don't track onboarding toggle if migrating options

* Prevent WC_Tracks from recording event post types not yet registered

* Activity Panels: Remove W Panel (https://github.com/woocommerce/woocommerce-admin/pull/3827)

* Remove W Notif Panel.

* Add back in trapping logic, and hide on non-embed pages.

* add npm run test:zip command (https://github.com/woocommerce/woocommerce-admin/pull/3823)

* add npm run test:zip command

* 1.0.0 release changes🎉 (https://github.com/woocommerce/woocommerce-admin/pull/3831)

* 1.0.0 release changes🎉

* changelog

* 0.26.1 changelog

* Add Report Extension Example: Add default props to ReportFilters (https://github.com/woocommerce/woocommerce-admin/pull/3830)

* ReportFilters component: Add sane defaults

* styles

* add required column

* add left join to sku ordering (https://github.com/woocommerce/woocommerce-admin/pull/3845)

* Deal with lint errors, and improperly merged files

* regenerate package-lock.json

* attempting to resolve package lock conflict.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
Co-authored-by: Fernando <ultimoround@gmail.com>
Co-authored-by: edmundcwm <edmundcwm@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-03-10 15:47:39 +13:00
Joshua T Flowers 8fa301d4b7 Onboarding: Update screen order and remove Jetpack connection in profiler (https://github.com/woocommerce/woocommerce-admin/pull/3739)
* Show usage modal every time on store details step

* Move plugin steps to end of profiler

* Rename Start step to Benefits

* Remove usage modal from benefits step

* Only show plugins step when plugins need to be installed

* Go to next step after profile item plugin data is updated

* Rename skip and start methods in benefits

* Add busy state to buttons

* Fix pending state on completion

* Cache active plugins to prevent removing active steps

* Use goToNextStep to complete plugin step and show cart modal

* Fix purchase_install event prop in cart modal

* Remove Jetpack connect step from plugins step of profiler

* Update welcome_clicked event name and props

* Remove cart modal from profiler

* Update benefits to show based on jetpack activation instead of connection

* Fix empty plugin data in profile items

* Only track previously installed plugins in componentDidMount

* Update benefits heading copy

* Use constants for checking Jetpack and WCS status
2020-03-03 10:44:26 +01:00
Darren Ethier 33c5b41e3f Align WooCommerce javascript code standards/linting/styles with WordPress core. (https://github.com/woocommerce/woocommerce-admin/pull/3674)
* align code styles with the same configuration as Woo-Blocks

* initial pass of reformat-files

* applies manual fixes to various new linting errors surfaced by the configuration change.

* Fix state mutation in image-upload

* remove unused pre-commit-hook.js

* requestAnimationFrame -> window.requestAnimationFrame

* wc-api eslint changes

* eslint fixes on client/lib and client/settings

* client/header eslint changes

* fixes for client/dashboard part 1

* fixes client/dashboard part 2 of 2

* client/analytics part 1

* client/analytics continued

* client/analytics, last batch

* rename __mock__ directory

* pass in useEffect, useState from React component or function

* remove '+' from sprintf string argument

* use ref instead of findDOMNode

* reformat and repaply package.json changes

* install deps before running linter in Travis

* useGetCountryStateAutofill

* counryStateAutofill

* countryStateAutofill

Co-authored-by: Paul Sealock <psealock@gmail.com>
2020-02-14 15:23:21 +13:00
Joshua T Flowers 45659dbb3e SelectControl: Add an option to show all options on refocus (https://github.com/woocommerce/woocommerce-admin/pull/3551)
* Add prop to show all options on focus

* Add example to devdocs for refocus option

* Highlight search query on refocus

* Make country/state dropdown show all options on refocus
2020-01-14 18:19:59 +08:00
Joshua T Flowers a87e7966fe Don't exclude selected option from options list in countrystate dropdown (https://github.com/woocommerce/woocommerce-admin/pull/3540) 2020-01-13 11:21:06 +08:00
Joshua T Flowers ec2bdb10aa Onboarding: Add tracks to extension purchase task and modal (https://github.com/woocommerce/woocommerce-admin/pull/3493)
* Add purchase task and modal to task list

* Track when cart modal is opened from task list

* Track when extensions are purchased or skipped

* Track checkout proceed on modal close
2020-01-02 10:36:25 +08:00
Joshua T Flowers 700cf7bb2d Onboarding: Add purchase products task list item (https://github.com/woocommerce/woocommerce-admin/pull/3472)
* Add an array of installed plugins to wcSettings

* Don't include already installed plugins in cart items

* Move cart modal component

* Add purchase task and modal to task list

* Rename ambiguous task getter method

* Remove modal purchase later prop

* Show completed product purchase task item after purchase

* Don't show cart modal if all items previously purchased
2019-12-31 16:50:45 +08:00
Joshua T Flowers 8707c5c13a Onboarding: Add error styling and text to country state dropdown (https://github.com/woocommerce/woocommerce-admin/pull/3494)
* Add onBlur prop to select control input

* Add controlCLassName prop to SelectControl

* Set left position for control help text explicitly
2019-12-31 10:31:59 +08:00
Justin Shreve 8b15bb441e Add autocomplete props to address fields in onboarding and adjust country/state matching (https://github.com/woocommerce/woocommerce-admin/pull/3338)
* Add autocomplete props to adress fields in onboarding

* Adjust state/country autocomplete logic

* Refactor state and country check
2019-12-11 12:10:05 -05:00
Ron Rennick 931172ff89 fix typos in JS docs (https://github.com/woocommerce/woocommerce-admin/pull/3248) 2019-11-14 10:35:55 -04:00
Joshua T Flowers a946d474ce Add an autofill option to SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/3105)
* Add autofill method for countryState

* Add isFocused state to SelectControl

* Allow children prop for SelectControl components
2019-10-31 07:44:57 +08:00
Joshua T Flowers b92500b35f Onboarding: Replace TextControl component (https://github.com/woocommerce/woocommerce-admin/pull/3020)
* Add TextControl component

* Replace instances of newspack TextControl
2019-10-10 07:00:33 +08:00
Joshua T Flowers 1563971836 Replace select controls with new SelectControl (Autocomplete) component (https://github.com/woocommerce/woocommerce-admin/pull/2997)
* Rename Autocomplete component to SelectControl

* Add isSearchable prop to SelectControl

* Remove SimpleSelectControl component

* Refactor list expansion and key behavior

* Bump changelog and version
2019-10-08 06:42:32 +08:00
Paul Sealock 029e514c75 wcSettings: fix countries getSettings (https://github.com/woocommerce/woocommerce-admin/pull/2974)
* wcSettings: fix countries getSettings

* Revert "wcSettings: fix countries getSettings"

This reverts commit cdccfa95cded4b1d7e8908102e8814a0281b027e.

* fix incorrect countries usage

* apply countries fix to Customers Report
2019-10-01 10:43:26 +13:00
Darren Ethier d728d38219 Refactor: Alternative approach to implementing extendable settings from the server (https://github.com/woocommerce/woocommerce-admin/pull/2917)
* integrate with new asset data registration (php side)

- includes back-compatibility.

* update js configuration and implement settings alias

- this aliases `@woocommerce/wc-admin-settings` to the settings api exposed via blocks (either the blocks plugin or core) and all the settings provided via the server.
- Adds fallback for back-compat if `wc.wcSettings` is not available in the environment (fallsback to `wcSettings`).

* initial pass to update all wcSettings direct usage to the new api

- this is just an initial pass, more can be done in separate pulls.

* missed one spot for adding new filter implementation

* fix incorrect jest config

* Avoid unnecessary assignment and directly return.

* Remove unnecessary defaults

* Fix inline comment text case.

Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>

* Remove unnecessary inline comment.

* use @todo instead of TODO

Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>

* fix incorrect reference in webpack config.

* add missing import and slightly delay dependency injection for scripts

* update get-setting and set-setting callbacks

* disable lint rule for console.error on dev doc builds
2019-09-23 17:47:08 -04:00
Joshua T Flowers f4d7936b17 Onboarding: Add shipping rate base task (https://github.com/woocommerce/woocommerce-admin/pull/2760) 2019-08-21 13:58:47 +08:00
Paul Sealock c9f738dec8 Dashboard: Fix index and extension issues 2019-05-13 07:20:14 +12:00
Timmy Crawford d51845930a Dashboard: Rename class/feature to remove conflict with legacy dashboard widget (https://github.com/woocommerce/woocommerce-admin/pull/2138)
* Dashboard: Rename class/feature to remove conflict with legacy dashboard class

* Updates per feedback, and fixes.
2019-05-08 09:10:05 -07:00
Albert Juhé Lluveras cab0e38c30 Save section/block preferences in user data (https://github.com/woocommerce/woocommerce-admin/pull/2148)
* Save section/block preferences in user data

* Optimize updateSection code

* Remove no longer used prop

* Refactor dashboard blocks to make them extendable

* Check that defaultSection exists before merging

* Rename 'sectionsDefinion' to 'defaultSections'

* Add Dashboard README

* Update README with new props

* Update settings when moving/removing dashboard sections

* Add missing props to README example

* Move 'section.js' inside 'components' folder

* Fix README sentence
2019-05-07 09:21:34 +02:00
Paul Sealock 9f7497fa12 Dashboard: add section toggle 2019-05-03 09:26:55 +12:00