Commit Graph

1531 Commits

Author SHA1 Message Date
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
James Koster fa9a4d8314 style and icon updates (https://github.com/woocommerce/woocommerce-admin/pull/3965) 2020-03-24 11:21:20 -07:00
Bec Scott dd279a5cc1 Make WooCommerce breadcrumbs use WooCommerce branding if it is installed (https://github.com/woocommerce/woocommerce-admin/pull/3798)
* Make WooCommerce breadcrumbs use WooCommerce branding if it is installed

* Undo everything

* Whoops, add missing reverted code

* Push 'WooCommerce' out to breadcrumbs from the server except for where it is built up on the client

* Pass translated 'WooCommerce' down from the server to the front end

* Fix comment

* Use `admin_url` to build up the URL

Co-Authored-By: Ron Rennick <ron@ronandandrea.com>

* Use admin_url()

Co-Authored-By: Ron Rennick <ron@ronandandrea.com>

* Show WooCommerce breadcrumb on analytics pages

* Stop double appending the admin URL to the root WooCommerce breadcrumb url

Co-authored-by: Rebecca Scott <me@becdetat.com>
Co-authored-by: Ron Rennick <ron@ronandandrea.com>
2020-03-24 08:57:16 +10:00
Joshua T Flowers 1088a0ce8c Onboarding: Add task completion and task list completion tracks (https://github.com/woocommerce/woocommerce-admin/pull/3967)
* Refactor logic for showing dashboard reports and tasklist

* Check for complete option status instead of visible tasks in dashboard

* Update task list status on task list completion

* Track task completion event server-side on option add

* Add option to track previousdly completed events

* Track previously untracked tasks on option update
2020-03-23 13:47:12 -07:00
Joshua T Flowers 1db98a78d9 Onboarding: Create flat rate and free shipping methods from task list (https://github.com/woocommerce/woocommerce-admin/pull/3927)
* Get flat rate and free shipping methods in Rates component

* Update shipping methods by type

* Disable all shipping methods except the one being updated

* Update toggleEnabled to be toggleable for readability

* Check if shipping method has cost before getting value
2020-03-23 17:25:02 +02:00
Fernando cbf0405b95 Onboarding - payments task: filter payment gateways if the user selects CBD (https://github.com/woocommerce/woocommerce-admin/pull/3745)
* Added redirect for the specified conditions

Added redirect to "https://squareup.com/t/f_partnerships/d_referrals/p_woocommerce/c_general/o_none/l_us/dt_alldevice/pr_payments/?route=/solutions/cbd" for the specified conditions

* Added control for CBD payments gateways

Added control for CBD payments gateways. Now only Square is available for CBD

* Changed CBD industry control

* Added 'hasCbdIndustry' declaration in methods.js

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-20 15:33:18 -03:00
Fernando 675591a593 Onboarding: Modified the recorded data in profile wizard (https://github.com/woocommerce/woocommerce-admin/pull/3929)
* Onboarding: Modified the recorded data in profile wizard

In the second step of the profile wizard, now 'industries_with_detail' is a 'string' instead of an 'object'.

* Selected industries converted to a string

Selected industries are converted to a string to send to recordEvent

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-19 09:13:14 -03:00
Jeff Stieler 0343ef2b78 Rename Google Shopping image asset. (https://github.com/woocommerce/woocommerce-admin/pull/3931)
* Rename Google Shopping image asset.

Attempt to avoid overly-aggressive ad blockers.

* Rename Facebook image asset.
2020-03-19 15:11:25 +13:00
Jeff Stieler b8e1874cd9 Task List: verify Stripe key patterns before continuing. (https://github.com/woocommerce/woocommerce-admin/pull/3910) 2020-03-17 11:22:42 -06:00
Joshua T Flowers 8b667d2169 Onboarding: Add offline payment methods (https://github.com/woocommerce/woocommerce-admin/pull/3832)
* Add on Cash on Delivery method to payment methods

* Add direct bank transfer method

* Update enabled paymet methods in markConfigured

* Add missing bacs property

* Add bacs styling
2020-03-16 12:57:23 +01:00
Joshua T Flowers 6c4c8fb7c1 Onboarding: Add toggles to configured payments in task list (https://github.com/woocommerce/woocommerce-admin/pull/3801)
* Add isConfigured property to all payment methods

* Remove payment configuration checks from server side

* Add isEnabled flags to all payment methods

* Add payment method toggle methods

* Extract payment methods

* Fix update options selectors

* Add error handling for payment method updates

* Remove configured from saved option

* Add event when payment is toggled

* Check if payment option exists before checking config

* Only fetch PayPal connection URL when plugin is active

* Only fetch Stripe connection URL when plugin is active
2020-03-16 12:09:29 +01:00
Bec Scott b8aee0f93b Onboarding: business step: add Google Ads extension install (https://github.com/woocommerce/woocommerce-admin/pull/3725)
* Onboarding: business step: add Google Ads extension install

* Updated extension slug etc to match the extension

* Fix a couple of slugs that were missed

* Remove extra div that was breaking because of an unrelated change (reused class name)

Co-authored-by: Bec Scott <me@becdetat.com>
2020-03-16 16:12:30 +10:00
Joshua T Flowers da6f113d18 Onboarding: Update payments task flow (https://github.com/woocommerce/woocommerce-admin/pull/3782)
* Add new payment method cards

* Refactor payment methods

* Track payment configuration and completion client-side

* Record tasklist_payment_connect_method event in markConfigured

* Record event on payment setup

* Add recommended payment method ribbon

* Return to payments task even when previously configured
2020-03-15 22:45:19 +01:00
Bec Scott 43d5214218 Delete an .orig file accidentally added during rebase (https://github.com/woocommerce/woocommerce-admin/pull/3891)
Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-03-13 10:20:36 -07:00
Bec Scott 893aecfa4b Improve focus on task list (https://github.com/woocommerce/woocommerce-admin/pull/3796)
* Script that hides or shows menu items

* Hook up buttons to task list, hook up options to onboarding-experience to set up the menu

* Fix some little code style issues

* Remove LinkButton in favour of the existing Button in @wordpress/components

* Remove reference to removed style file

* Move menu experience script to /client/wp-admin-scripts to match current style

* Only load the onboarding menu experience script if onboarding is enabled

* Localise some strings

* Separate the "Setup" link from the existing items to avoid conflicts with extensions that modify the menu

* Use the item key instead of title to report back completed tasks

* Change from skip_option to reason to make this easier to grok

* Use existing woocommerce_task_list_hidden option instead of creating a new one

* Tweak options to get menu experience working again

* Simplify skip actions logic

* Preload woocommerce_task_list_do_this_later option

* Nicer event key names

* Clean  up the styling

* Remove wcSettings.onboarding check from the task items list in `customizable`

* Remove spinner from customizable

* Fix translated string for WooCommerce menu setup anchor

* Use predef color instead of a hard-coded hex code

* Remove superfluous ={ true } from markup

Co-authored-by: Rebecca Scott <me@becdetat.com>
2020-03-13 14:34:53 +10:00
Job c2a39265d1 Fix/inconsistent wording downloads report (https://github.com/woocommerce/woocommerce-admin/pull/3844)
* Consistency with wording in Downloads tab

* User Name or username --> used Username consistently
* Ditto for "Order #"
* Only exception: Didn't add "Address" after IP in the table header to save space

* Updated the fixed title as well

* Removed "Title" again after comments
2020-03-10 10:53:01 +02: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 ad3b7cdb3f Onboarding: Redesign plugin benefits screen (https://github.com/woocommerce/woocommerce-admin/pull/3764)
* Remove header and header logo for non-stepper pages

* Add new WCS and Jetpack logo svg

* Update benefits card layout

* Update benefits list descriptions and images

* Add benefit card styling

* Update plugin actions and notice styling

* Remove TOS notice

* Fix styling for benefits on mobile

* Update plugin name strings

* Fix grid columns and alignment

* Update button text to start plugin installation
2020-03-10 00:16:21 +01:00
Joshua T Flowers 54d948cb2a Track selling venue response in business details step (https://github.com/woocommerce/woocommerce-admin/pull/3847) 2020-03-09 12:39:38 +01:00
Fernando 5946e8c855 Onboarding - business step: add more options in the competitors list and other fixes (https://github.com/woocommerce/woocommerce-admin/pull/3812)
* Modified question in the business step of the onboarding

* Added more options in the competitors list

Onboarding - Business step -> Add more options in the competitors list.

* Added an option input field to Onboarding, business step

To the Onboarding's business step added an input field when the user selects "Other".

* Added suggested improvements

* Added new param to "test_schema" test

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2020-03-06 16:20:54 -03: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
Ron Rennick 54d58ed13e Version/1.0 master merge (https://github.com/woocommerce/woocommerce-admin/pull/3797)
* 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

* fix linting issues

* fix mis-merged changes

* Update jsdoc

Co-Authored-By: Paul Sealock <psealock@gmail.com>

Co-authored-by: Timmy Crawford <timmyc@users.noreply.github.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.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-03 11:22:32 +13:00
Paul Sealock 35462eab0d Coding standards: fix errors (https://github.com/woocommerce/woocommerce-admin/pull/3763) 2020-02-25 14:18:52 +13:00
Bec Scott 1cc7e0288f Add PayFast payment gateway option for sites in South Africa (https://github.com/woocommerce/woocommerce-admin/pull/3738)
* Add PayFast payment gateway option for sites in South Africa

* Fix PayFast extension in the whitelist

* Configure PayFast from within the task list

* Triggering hook

* Show PayFast payment method at the bottom of the options

* When configuring the PayFast extension set the store currency to ZAR

* Remove withSelect from compose function

* Only do one call to update the settings
2020-02-24 13:54:46 +10:00
renovate[bot] d724d5fa68 Update dependency raw-loader to v4 (https://github.com/woocommerce/woocommerce-admin/pull/3735)
* Update dependency raw-loader to v4

* Fix markdown require to use default export.

Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-02-20 11:38:28 -08:00
Ron Rennick 952b70774f Merge Version/1.0 to master (https://github.com/woocommerce/woocommerce-admin/pull/3740)
* 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)

Co-authored-by: Timmy Crawford <timmyc@users.noreply.github.com>
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
Co-authored-by: Fernando <ultimoround@gmail.com>
Co-authored-by: edmundcwm <edmundcwm@gmail.com>
2020-02-20 07:59:02 -04:00
edmundcwm f4710a7356 Fix select text alignment (https://github.com/woocommerce/woocommerce-admin/pull/3723) 2020-02-18 13:57:53 -04:00
Bec Scott 2a7e4f0c97 Make analytics tables use the site's date format setting (https://github.com/woocommerce/woocommerce-admin/pull/3715)
* Make analytics tables use the site's date format setting

* Use getSetting instead of the wcSettings global

* Use configured date format in coupons analytics table

* Use default date format as fallback in analytics

* Rename downloads table class name
2020-02-17 11:12:35 +10:00
Paul Sealock 43274b9fa8 Coding Standards: Fix getReportItems function call order (https://github.com/woocommerce/woocommerce-admin/pull/3724) 2020-02-17 14:02:32 +13: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
Fernando 387bf188a4 Decode breadcrumb correctly (https://github.com/woocommerce/woocommerce-admin/pull/3653)
When viewing the Accounts & Privacy tab in WooCommerce Settings, the page title in the breadcrumbs includes an "&amp;".
Now "decodeEntities" method is used to correct the breadcrumb.
2020-02-05 11:35:50 -08:00
Vasily Belolapotkov 06dce7a558 Add outline styling to focused textarea element (https://github.com/woocommerce/woocommerce-admin/pull/3655)
Textearea and input look different because ouline styling is not
applied to text area element.
2020-02-03 15:16:32 +13:00
Joshua T Flowers 761a67f18b Onboarding: Mark payments task complete when payment configured (https://github.com/woocommerce/woocommerce-admin/pull/3576)
* Mark payments task complete when payment configured

* Only mark complete when all payments configured

* Only mark payments complete if all payments configured
2020-01-28 09:12:04 -08:00
Joshua T Flowers d22774aa66 Onboarding: Fix shipping rates overlapping currency prefix (https://github.com/woocommerce/woocommerce-admin/pull/3623)
* Add various input states classes to the text control with affixes component

* Replace TextControl with TextControlWithAffixes in shipping rates

* Style TextControlWithAffixes for shipping rates in task list

* Always provide a formatted currency string

* Always display shipping rate labels and affixes

* Add components changelog entry.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-01-28 08:54:39 -08:00
Joshua T Flowers d1ef0eb029 Hide other elements in wpcontent while in full screen mode (https://github.com/woocommerce/woocommerce-admin/pull/3621) 2020-01-28 07:37:33 -08:00
Joshua T Flowers fcd2d517cd Onboarding: Allow any uploaded theme to be activated (https://github.com/woocommerce/woocommerce-admin/pull/3620)
* Allow installed themes to be installed and activated

* Filter themes on client-side by WC support and currently active

* Run transient deletion hook during REST requests

* Delete transient on theme switch for non-admin requests
2020-01-24 10:11:36 +08:00
Joshua T Flowers 2438885f09 Onboarding: Add missing space between manual tax info and link (https://github.com/woocommerce/woocommerce-admin/pull/3612) 2020-01-24 10:10:32 +08:00
Joshua T Flowers cc0a054fe3 Onboarding: Vertically align button text (https://github.com/woocommerce/woocommerce-admin/pull/3622) 2020-01-24 10:09:39 +08:00
Jeff Stieler 9f5826ee61 Fix Search component token display in ReportTable (https://github.com/woocommerce/woocommerce-admin/pull/3618)
* Fix parsing of report table search terms.

* Fix styling of Search component "clear all" button.

* Add components changelog entry.
2020-01-23 08:32:28 -07:00
Joshua T Flowers f8195a7b13 Onboarding: Center button to continue without installation (https://github.com/woocommerce/woocommerce-admin/pull/3588)
* Center button to continue without installation

* Remove margin on last benefit p tag
2020-01-23 15:11:40 +08:00
Jeff Stieler 5c37dd0374 Fix styling of search control in report table header and filters. (https://github.com/woocommerce/woocommerce-admin/pull/3603) 2020-01-22 08:33:44 -07:00
Joshua T Flowers 4b02e0850d Onboarding: Allow Jetpack connection to be skipped in tax task (https://github.com/woocommerce/woocommerce-admin/pull/3589)
* Add skip action to Connect component

* Add skip button to tax connect step

* Record event when tax Jetpack connection is skipped
2020-01-22 16:37:05 +08:00
Albert Juhé Lluveras c4b1d552d4 Remove unnecessary use of lodash get (https://github.com/woocommerce/woocommerce-admin/pull/3598) 2020-01-21 15:17:39 +01:00
Joshua T Flowers a6c0d8f063 Use existing store country if address line 1 is set (https://github.com/woocommerce/woocommerce-admin/pull/3595) 2020-01-21 20:57:16 +08:00
Joshua T Flowers bade1da7f9 Onboarding: Fix gap on plugins step (https://github.com/woocommerce/woocommerce-admin/pull/3594)
* Remove min height on plugin actions

* Move margin from wrapper to buttons
2020-01-21 20:05:37 +08:00
Jeff Stieler 25c09563a1 Don't modify the document title on existing WooCommerce pages. (https://github.com/woocommerce/woocommerce-admin/pull/3585) 2020-01-20 10:34:24 -07:00
Joshua T Flowers e1bb3255c9 Onboarding: Hide plugin install step when already installed (https://github.com/woocommerce/woocommerce-admin/pull/3575)
* Remove already active plugins from install list

* Update global with newly activated and installed plugins

* Cache activated plugins to prevent step removal
2020-01-17 09:46:11 +08:00
Joshua T Flowers 5e8f3bc378 Onboarding: Update homepage publish message (https://github.com/woocommerce/woocommerce-admin/pull/3577) 2020-01-17 09:11:36 +08: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 d5444f6351 Updating unread stock indicator on stock update (https://github.com/woocommerce/woocommerce-admin/pull/3550)
* Force refetch of low product query after updating stock

* Continue showing unread indicator while fetching
2020-01-14 18:19:35 +08:00
Joshua T Flowers 7164e021fc Onboarding: Update profiler theme action buttons (https://github.com/woocommerce/woocommerce-admin/pull/3548)
* Center align theme action buttons

* Add separate button for current theme

* Make live demo button tertiary

* Update styles for default and tertiary buttons in theme actions
2020-01-14 18:19:09 +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 83f1bf8db9 Fix mobile table header styling (https://github.com/woocommerce/woocommerce-admin/pull/3547)
* Move search comparison beneath table header title

* Fix search label positioning
2020-01-13 10:58:43 +08:00
Timmy Crawford adfd48d444 Onboarding: Prevent retry and activate and continue button from appearing at the same time. (https://github.com/woocommerce/woocommerce-admin/pull/3545) 2020-01-10 09:24:38 -08:00
Joshua T Flowers d29d674768 Onboarding: Add reminder to complete profiler (https://github.com/woocommerce/woocommerce-admin/pull/3524)
* Add note to complete profiler

* Add note actions

* Update note to actioned when profiler is marked complete

* Update note to actioned client-side when completing profiler
2020-01-10 09:36:30 +08:00
Joshua T Flowers 90112354b1 Update historical data notice to actioned on import (https://github.com/woocommerce/woocommerce-admin/pull/3539)
* Add hook for regenerating data init

* Set note to actioned on data import

* Update note status on client-side import start
2020-01-09 10:11:39 +08:00
Joshua T Flowers da9421692f Onboarding: Add option to track appearance completion (https://github.com/woocommerce/woocommerce-admin/pull/3503)
* Add option to track appearance completion

* Disable proceed button if no logo and not dirty state
2020-01-09 10:05:03 +08:00
Jeff Stieler 8a976c28bb Add initial Activity Panel documentation. (https://github.com/woocommerce/woocommerce-admin/pull/3525)
* Add initial Activity Panel documentation.

* Fix orders panel documentation.

* Additionally remove use of "ship" in messaging - not all stores sell physical products.
2020-01-08 12:25:13 -05:00
Joshua T Flowers 35b05d316f Update date format for import status (https://github.com/woocommerce/woocommerce-admin/pull/3516)
* Update date format for import status

* Update success message for all historical data
2020-01-07 20:25:11 +08:00
Timmy Crawford 070f8eb3c0 Fix exception when task list is not shown. (https://github.com/woocommerce/woocommerce-admin/pull/3513) 2020-01-06 15:10:37 -08:00
Joshua T Flowers 07388aa5f1 Onboarding: Update task list success notices (https://github.com/woocommerce/woocommerce-admin/pull/3508) 2020-01-06 23:27:09 +08:00
Albert Juhé Lluveras 7d9aaf6afa Add singular/plural distinction to onboarding plugins installation (https://github.com/woocommerce/woocommerce-admin/pull/3517) 2020-01-06 16:16:38 +01:00
Timmy Crawford 41986bd8f0 Analytics: Change Refunds to Returns (https://github.com/woocommerce/woocommerce-admin/pull/3514)
* Change Refunds to Returns

* Also rename the chart

* Rename dashboard chart
2020-01-03 15:12:53 -08:00
Joshua T Flowers af5022c3d1 Reports sync refactor (https://github.com/woocommerce/woocommerce-admin/pull/3285) 2020-01-03 00:00:37 +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
Timmy Crawford da0844c53e Onboarding: Add Skip Step link on Themes Step (https://github.com/woocommerce/woocommerce-admin/pull/3490)
* Onboarding: Add Skip Step link on Themes Step.

* Updates per feedback.
2019-12-31 11:55:00 -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 1a83c50e19 Onboarding: Fix disabled button hover state (https://github.com/woocommerce/woocommerce-admin/pull/3492)
* Fix hover color for disabled buttons

* Add not-allowed state to cursor on disabled buttons
2019-12-31 10:47:41 +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
Timmy Crawford 7cc0611902 Fix button color when no demo present. (https://github.com/woocommerce/woocommerce-admin/pull/3489) 2019-12-30 12:18:09 -08:00
Joshua T Flowers 52c81230c3 Onboarding: Install free themes during profiler (https://github.com/woocommerce/woocommerce-admin/pull/3484)
* Add theme name to theme activation response

* Install and activate theme on choose in profiler

* Only auto install free themes and not currently active themes

* Move getPriceValue to dashboard utils

* Don't add free themes to the cart
2019-12-30 18:11:50 +08:00
Timmy Crawford 44748bb16e Onboarding: Add another option to platforms. (https://github.com/woocommerce/woocommerce-admin/pull/3471)
* Onboarding: Add another option to platforms.

* Add revenue question for other woo store.

* Add new option value to REST enum.
2019-12-27 08:30:59 -08:00
Joshua T Flowers 2df87c674d Onboarding: Skip Shipping connect step if Jetpack is already connected (https://github.com/woocommerce/woocommerce-admin/pull/3486) 2019-12-27 17:16:39 +08:00
Joshua T Flowers 8b02019c1c Onboarding: Don't show skip link if no plugins exist to skip (https://github.com/woocommerce/woocommerce-admin/pull/3485)
* Don't show skip link if no plugins exist to skip

* Update skip link to check against plugins array length
2019-12-27 08:17:27 +08:00
Jeff Stieler a5c4e13fbb Show pending review regardless of comment moderation settings (https://github.com/woocommerce/woocommerce-admin/pull/3459)
* Show pending reviews regardless of comment moderation settings.

* Filter "view reviews" link to show only product review comments.
2019-12-20 13:16:48 -05:00
Justin Shreve 5068282b7b Add purchase modal at the end of the profile wizard (https://github.com/woocommerce/woocommerce-admin/pull/3444)
* Add purchase modal to confirm intent before cart redirect

* Handle PR feedback: Fix comment on getProductIdsForCart, move cart modal to open on theme page (which rewrites the mark completed functionality), fix CSS display, Add busy stsate to redirect to cart button

* Fix some minor naming issues and add a busy state on thee later link
2019-12-20 07:58:38 -05:00
Jeff Stieler 1c51cf94e0 Add filters to WP notice collapsing behavior. (https://github.com/woocommerce/woocommerce-admin/pull/3391)
* Add filters to WP notice collapsing behavior.

* Avoid modifying the WP notices NodeList inline.

* Add example showing WP notices filter usage.

* Keep hidden/shown notice widths consistent.
2019-12-18 08:12:32 -05:00
Ron Rennick dd5929ea46 scroll to notices when made visible while scrolled down (https://github.com/woocommerce/woocommerce-admin/pull/3390)
* scroll to notices when made visible while scrolled down

* use window.scrollY for calculating scroll
2019-12-17 16:24:58 -04:00
Justin Shreve 013aa443b8 Fix the "is this card useful" prompt display (https://github.com/woocommerce/woocommerce-admin/pull/3427)
* Fix the "is this card useful" prompt display

* Fix stylelint / format issue
2019-12-17 07:49:57 -05:00
Jeff Stieler 6a826600c2 Fix WC-Admin component styles for WP 5.3 (https://github.com/woocommerce/woocommerce-admin/pull/3357)
* Style Search component for 5.3.

* Reset native select control styles.

* Fix styling of selected radio options.

* Fix bottom margin on select inputs in filters and pagination.

* Update DropdownButton styles for WP 5.3.

* Style DropdownButton arrow as a chevron.

* Fix tooltip arrow styling.

* Style TextControlWithAffixes for WP 5.3.

* Flatten pagination button style.

* Use SelectControl for StoreAlert snooze action.

* Remove 3D look and use chevron on SplitButton.

* Add changelog entry.

* Fix stylelint issues.

* Update test snapshots.

* Add TextControlWithAffixes disabled prop to documentation and proptypes.

* Use WP checkboxes in ReportTable columns.

* Fix TableCard header background colors.

* Add padding to EllipsisMenu toggle controls.

* Remove version-specific styles.

We require WP 5.3 as a minimum now.
2019-12-13 12:35:29 -05: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
Joshua T Flowers 529cab809e Onboarding: Fix error if product types are missing (https://github.com/woocommerce/woocommerce-admin/pull/3340)
* Get product types from profile items or set to empty array

* Remove duplicate cart redirect methods

* Add missing cart redirect params

* Use path for wccom-back instead of full url
2019-12-10 15:08:16 -05:00
Joshua T Flowers 3cec6e7be6 Onboarding: Update shipping task button text (https://github.com/woocommerce/woocommerce-admin/pull/3400)
* Add buttonText prop and default text to shipping rates component

* Make button text dependent on remaining task visibility

* Determine task step visibility by plugins
2019-12-10 14:54:51 -05:00
Justin Shreve a0e47e8dfd Add a button to continue setup after importing products (https://github.com/woocommerce/woocommerce-admin/pull/3402) 2019-12-10 14:28:19 -05:00
Justin Shreve 34a0fdb6a5 Fix revenue question translation with currency conversion (https://github.com/woocommerce/woocommerce-admin/pull/3358)
* Do a rough conversion of the currency ranges on the revenue question

* add a zero for every additional digit beyond the first digit to round currencies with larger differences in exchange rates
2019-12-10 14:01:21 -05:00
Joshua T Flowers 08f38ace89 Update the tracking usage modal copy (https://github.com/woocommerce/woocommerce-admin/pull/3398) 2019-12-10 11:08:54 +07:00
Joshua T Flowers df172f4592 Onboarding: Reduce number of queries needed to update logo (https://github.com/woocommerce/woocommerce-admin/pull/3397)
* Add stylesheet and themeMods to settings and remove customLogo

* Remove queries to get current stylesheet and thememods
2019-12-10 11:08:44 +07:00
Joshua T Flowers 2fe5f99977 Update check for TOS accepted in tax step (https://github.com/woocommerce/woocommerce-admin/pull/3245) 2019-12-09 11:50:54 +07:00
Paul Sealock 8205112732 Add currency extension (https://github.com/woocommerce/woocommerce-admin/pull/3328)
* Add currency extension

* use wcSettings

* save

* get revenue working

* all reports

* remove error log

* better rename

* add column

* persist queries

* go back to individual hooks

* comments

* address feedback
2019-12-06 11:38:26 +13:00
Jeff Stieler 6a8124ffd0 Remove unnecessary locale update call. (https://github.com/woocommerce/woocommerce-admin/pull/3362)
Let the @wordpress/date module handle it.
2019-12-06 11:38:07 +13:00
Justin Shreve 5e6e3e98db Fix button margin on plugins screen (https://github.com/woocommerce/woocommerce-admin/pull/3337) 2019-12-04 08:05:01 -05:00
Joshua T Flowers 2fccd709c0 Onboarding: Update global currency settings on address change (https://github.com/woocommerce/woocommerce-admin/pull/3324)
* Update currency data to match currency format used in wcSettings

* Revert currency ranges to sprintf

* Allow currency to be changed after the class has been initialized

* Update currency settings when store address is changed

* Get default prices formats from positioning

* Set currency defaults if not set

* Handle PR feedback

* Add translator comment to 'more than' revenue option
2019-12-04 07:32:13 +08:00
Joshua T Flowers 7c9ba29fa2 Onboarding: Redirect to task list after shipping step connection (https://github.com/woocommerce/woocommerce-admin/pull/3331)
* Add redirectUrl prop to connect step

* Add propTypes to connect component
2019-12-04 07:16:17 +08:00
Joshua T Flowers 7e2aa85235 Onboarding: Format product count ranges numbers without decimals (https://github.com/woocommerce/woocommerce-admin/pull/3316)
* Format product count ranges numbers without decimals

* Don't pass format method as argument to getNumberRangeString
2019-12-04 07:13:42 +08:00
Joshua T Flowers fa2ab220c9 Onboarding: Allow logo to be removed via customize appearance task (https://github.com/woocommerce/woocommerce-admin/pull/3323)
* Remove pending state when no custom logo ID exists

* Update logo to null in theme mods if removed
2019-12-03 12:42:57 +08:00
Joshua T Flowers 09f2a03284 Onboarding: Update appearance task completion criteria (https://github.com/woocommerce/woocommerce-admin/pull/3321)
* Update appearance task completion criteria

* Don't update wcSettings after logo change
2019-12-03 12:18:56 +08:00
Joshua T Flowers 485cb2c193 Update getCurrencyFormatString import to use wc-admin lib (https://github.com/woocommerce/woocommerce-admin/pull/3332) 2019-12-03 09:12:53 +08:00
Justin Shreve 448e1f3e11 Remove Newspack Dependency (https://github.com/woocommerce/woocommerce-admin/pull/3302)
* Switch to @wordpress/component's Button

* Finish button conversion

* Move to @wp/component's CheckboxControl

* Add  ImageUpload component

* Remove Newspack package

* CSS Cleanup

* Handle PR feedback: Fix tests, add ImageUploader basic test, fix FireFox/Safari Display issues, and  currency input bug
2019-12-02 12:39:22 -05:00
Paul Sealock a5a67b107e Settings: Persist date range selection (https://github.com/woocommerce/woocommerce-admin/pull/3293)
* Settings: fix date range persistance

* set undefined on persisted on save

* add comment
2019-11-29 09:54:15 +13:00
Paul Sealock 49060372aa Use report filters with tracking (https://github.com/woocommerce/woocommerce-admin/pull/3309) 2019-11-28 12:12:33 +13:00
Joshua T Flowers a55830ac8c Onboarding: Hide ImageIUploader before custom logo is fetched (https://github.com/woocommerce/woocommerce-admin/pull/3304)
* Check if themeMods is set before showing logo step

* Set state to pending while fetching media
2019-11-27 10:59:40 +08:00
Jeff Stieler 9469663379 Decouple date package from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3278)
* Decouple date package from wcSettings.

* Update missed documentation and example.

* Expect simpler prop values for date filter.

* Remove unused props from primary/secondary dates.

* Avoid introducing moment dependency for type checking.

* Handle null moment/date values in DateRangeFilterPicker.

* Fix missing ISO date format.

* Fix moment instance detection.
2019-11-26 14:39:40 -05:00
Ron Rennick baeaa94f5f make store revenue range amounts translatable (https://github.com/woocommerce/woocommerce-admin/pull/3251)
* make store revenue range amounts translatable

* update business details to USD amounts
2019-11-26 09:01:47 -04:00
Justin Shreve 50cc3edaed Update onboarding filters with a consistent prefix (https://github.com/woocommerce/woocommerce-admin/pull/3295)
* Update onboarding filters with a consistent prefix

* Rename woocommerce_onboarding_payments to match the other task list options
2019-11-25 11:15:22 -05:00
Justin Shreve c8f9d7673c Fix notices and display issues that can occur when a WCCOM product api request fails (https://github.com/woocommerce/woocommerce-admin/pull/3291) 2019-11-25 10:35:35 -05:00
Darren Ethier b57b52ff0c fix error due to fallback not loading when needed for getAdminLink (https://github.com/woocommerce/woocommerce-admin/pull/3297) 2019-11-22 19:30:46 -05:00
Jeff Stieler c2020507e3 Decouple Navigation from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3294)
* Move getAdminLink to wc-admin-settings.

* Add changelog entries.

* Look for `getAdminLink()` in @woocommerce/settings first.
2019-11-22 12:07:26 -05:00
David Levin 52cb35f4de Correcting and clarifying analytics terms and calculations (https://github.com/woocommerce/woocommerce-admin/pull/3104)
* Relabel Net Revenue to Net Sales, revert previous refund work on Gross revenue and rename to total sales. Update the orer of all the things

* Add gross sales calculation to revenue stats endpoint.

* Restore coupon_total when updating order stats.

* Wire up gross sales to revenue report.

* Fix revenue report refunds calculation when there are no refunds.

* update net sales labels and cases in order, product and category tables

* Subtract refunded shipping and taxes from gross sales.

* pluses to minuses to fix the gross revenue and refund totals when refunding

* Add gross_sales to revenue stats orderby enum.

* Change refund labels to Returns

* Remove usage of defunct coupon_total column.

* Store refunded amount in stats table.

* Rename "gross_total" column to "total_sales".

* Net total for refund orders can be used instead of a new column.

* Rename gross_revenue to total_sales.

* Coalesce coupons total in order stats query.

SUM()ing all nulls gives null, not zero.

* Use segmentation selections to backfill missing data.

Fo when report columns and segmentation columns don't match.

* Remove errant gross_sales from expected interval test data.

* Fix gross sales tests for revenue/stats.

* Move missing segment fills back to their original locations.

* Fix remaining tests failing because of gross sales.

* Fix db upgrade function rename of gross_total column.

* Fix linter errors.
2019-11-22 10:06:14 -05:00
Paul Sealock 0db5cbb6a0 Component styles: Explicitly import from Gutenberg (https://github.com/woocommerce/woocommerce-admin/pull/3292)
* Fix Gutenberg style imports

* remove duplicate variables

* remove extra variables

* remove duplicate imports

* move base style imports to webpack
2019-11-22 13:19:37 +13:00
Jeff Stieler 17514872ad Decouple currency and numbers packages from `wcSettings`. (https://github.com/woocommerce/woocommerce-admin/pull/3277)
* Remove wcSettings dependency from currency and number packages.

Either take a configuration object in function calls or in a new class constructor.

* Use new Currency class and number format methods in client/.

Compose with store settings to keep the same API.

* Don't reintroduce lodash dependency to currency package.

* Add changelog entries to currency and number packages.

* Update docs, example, and changelog for AdvancedFilters component.

* Use precision-less formatValue() for integer report values.

* Make Currency instance immutable.
2019-11-21 16:51:52 -05:00
Joshua T Flowers 940716d7f5 Add wc admin card classes to leaderboards (https://github.com/woocommerce/woocommerce-admin/pull/3267) 2019-11-21 20:10:37 +08:00
Jeff Stieler f8fa7b6bc7 Fetch autocomplete countries from the API rather than wcSettings object. (https://github.com/woocommerce/woocommerce-admin/pull/3262) 2019-11-19 14:17:15 -05:00
Joshua T Flowers 1e792b7e86 Onboarding: Stretch theme image to fit card container (https://github.com/woocommerce/woocommerce-admin/pull/3266) 2019-11-19 09:18:22 +08:00
Justin Shreve f87176873b Onboarding - Fix payment CSS on mobile (https://github.com/woocommerce/woocommerce-admin/pull/3236) 2019-11-15 08:33:40 -05:00
Justin Shreve a27c178ef6 Fix default country on new stores (https://github.com/woocommerce/woocommerce-admin/pull/3252) 2019-11-15 08:32:54 -05:00
Justin Shreve 03c3251a2a Onboarding - Add tracks queue and fix busted tracks events/add missing event (https://github.com/woocommerce/woocommerce-admin/pull/3220)
* Fix busted tracks events and add missing continue setup event

* Move appearance check to next page load to avoid the event not firing

* Add a tracks queue to delay event recording & log embed page views (https://github.com/woocommerce/woocommerce-admin/pull/3250)

* Add a tracks queue to delay event recording

* Add emebedded page view tracking, and queue the tax skip event
2019-11-15 08:32:02 -05:00
Joshua T Flowers ee747d2869 Onboarding: Skip homepage step when classic editor is in use (https://github.com/woocommerce/woocommerce-admin/pull/3244) 2019-11-15 08:17:48 +08:00
Joshua T Flowers 08ea4648ca Onboarding: Update homepage options call to use in-house namespace (https://github.com/woocommerce/woocommerce-admin/pull/3243) 2019-11-15 08:17:18 +08:00
Albert Juhé Lluveras 319cc65d22 Make WooCommerce brand localizable (https://github.com/woocommerce/woocommerce-admin/pull/3247)
* Make WooCommerce brand localizable

* Make HeaderLogo aria-label localizable
2019-11-14 16:24:42 +01: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
Ron Rennick c716b8c399 capitalize WooCommerce Services (https://github.com/woocommerce/woocommerce-admin/pull/3249) 2019-11-14 10:35:28 -04:00
Justin Shreve 7fb1d33e22 Show the "activate & continue" button as busy during Jetpack redirect (https://github.com/woocommerce/woocommerce-admin/pull/3234) 2019-11-14 09:14:53 -05:00
Joshua T Flowers 000d666096 Add tax filtering to orders data (https://github.com/woocommerce/woocommerce-admin/pull/3197)
* Add tax rates filter to orders report

* Add tax rate filters to orders data store

* Add tax rate query filters to order stats data store

* Add tax rate orders link to taxes table
2019-11-13 11:22:06 +08:00
Joshua T Flowers 9e52bae51c Update ShipStation 'Learn more' link (https://github.com/woocommerce/woocommerce-admin/pull/3212) 2019-11-12 13:23:52 -05:00
Ron Rennick f78c143f3b Move in-house rest endpoints to private namespace (https://github.com/woocommerce/woocommerce-admin/pull/3204)
* move in-house rest endpoints to private namespace

* PHPCS sniff fixes
2019-11-12 14:15:55 -04:00
Justin Shreve 4b7263df14 Onboarding - Fix homepage notice on Gutenberg save (https://github.com/woocommerce/woocommerce-admin/pull/3206)
* Fix homepage notice

* Update class name used to check for publish success
2019-11-12 10:31:44 -05:00
Joshua T Flowers 4fb1945917 Onboarding: Use ShipStation for AU, GB, and CA (https://github.com/woocommerce/woocommerce-admin/pull/3200)
* Add shipstation to allowed plugins list

* Use shipstation for qualifying countries

* Add default value for onError prop in Plugins component
2019-11-12 10:44:39 +08:00
Joshua T Flowers 642b17c1aa Onboarding: Update return to task list notices (https://github.com/woocommerce/woocommerce-admin/pull/3192)
* Use core/notices for product creation notices

* Only show task list return notice on first save of taxes

* Update tax completion notice

* Check if tax task is complete before loading script
2019-11-12 09:17:36 +08:00
Justin Shreve 473ba88c59 Select the stripe checkbox by default (https://github.com/woocommerce/woocommerce-admin/pull/3189) 2019-11-11 14:57:08 -05:00
Justin Shreve 5b80e321ba Enable onboarding in the plugin build for those who have opted-in (https://github.com/woocommerce/woocommerce-admin/pull/3184)
* Enable onboarding in the plugin build for those who have opted-in

* Update constant andd option value
2019-11-07 13:31:02 -05:00
Jeff Stieler 810cef19f3 Show "add a product" notice to stores without published products (https://github.com/woocommerce/woocommerce-admin/pull/3119)
* Show "add a product" notice to stores without products.

* Fix primary inbox card action button style.
2019-11-07 09:00:38 -07:00
Joshua T Flowers c25c91126c Check if official TaxJar plugin exists before enabling WCS integration (https://github.com/woocommerce/woocommerce-admin/pull/3183) 2019-11-07 15:37:17 +08:00
Joshua T Flowers 73b11a1338 Onboarding: Add return to task list after saving taxes (https://github.com/woocommerce/woocommerce-admin/pull/3170) 2019-11-07 08:17:46 +08:00
Justin Shreve 2af8e7c656 Onboarding: Pass connection parameters to install extensions (https://github.com/woocommerce/woocommerce-admin/pull/3173)
* Generate the WooCommerce cart URL with connection params so installing extensions work

* Build cart URL client side

* Fix alignment
2019-11-06 09:41:38 -05:00
Joshua T Flowers 1da248a9cb Onboarding: Automatically enable tax calculations for manual configuration (https://github.com/woocommerce/woocommerce-admin/pull/3168)
* Enable tax calculations when manually configured

* Add manual configuration description

* Only show manual configuration description if calc tax option disabled
2019-11-06 11:18:02 +08:00
Joshua T Flowers 4f79cdea93 Onboarding: Allow users to navigate backwards in steps (https://github.com/woocommerce/woocommerce-admin/pull/3154)
* Add label wrapper to stepper and style for both orientations

* Add onClick event to steps

* Add onClick to stepper examples

* Allow returning to previous steps on step click

* Allow navigating to previously completed steps

* Mark previous steps complete
2019-11-06 08:26:08 +08:00
Joshua T Flowers 6520493738 Onboarding: Pre-fill profiler fields with data (https://github.com/woocommerce/woocommerce-admin/pull/3165) 2019-11-05 08:05:20 +08:00
Joshua T Flowers ba889113e8 Fix checkbox group gap (https://github.com/woocommerce/woocommerce-admin/pull/3166) 2019-11-05 07:45:21 +08:00
Justin Shreve 20be659cef Only show the Jetpack logo in the header if we need to setup Jetpack (https://github.com/woocommerce/woocommerce-admin/pull/3160)
* Only show the Jetpack logo in the header if we need to setup Jetpack

* Adjust woo logo position
2019-11-04 11:34:44 -05:00
Justin Shreve 4a59cb9b09 Create store pages during onboarding (https://github.com/woocommerce/woocommerce-admin/pull/3159) 2019-11-04 10:50:37 -05:00
Joshua T Flowers 011b92af40 Onboarding: Fix mobile styling issues in profiler (https://github.com/woocommerce/woocommerce-admin/pull/3156) 2019-11-04 08:23:26 +08:00
Ron Rennick e1fc69ad8f restrict admin page wrap padding to page wrap (https://github.com/woocommerce/woocommerce-admin/pull/3145) 2019-11-01 16:52:02 -03:00
Joshua T Flowers a3224ce65a Onboarding: Add task list welcome modal (https://github.com/woocommerce/woocommerce-admin/pull/3142) 2019-11-01 12:00:57 +08:00
Joshua T Flowers dcea8db86a Onboarding: Add setup theme step to profiler (https://github.com/woocommerce/woocommerce-admin/pull/3124)
* Add wccom redirect if purchasable products exist

* Update path to remove query when profiler is complete

* Fix lastReceived time for profile items update

* Add busy state to theme choose buttons
2019-11-01 10:04:54 +08: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 993934606f Onboarding: Redirect to wccom cart if purchases required (https://github.com/woocommerce/woocommerce-admin/pull/3121) 2019-10-30 09:49:27 +08:00
Justin Shreve 2c81932702 Add currency defaults based on country (https://github.com/woocommerce/woocommerce-admin/pull/3110)
* Base currency defaults on selected country

* Save currency settings

* Move getCurrencyInfo to the currency package
2019-10-29 14:34:04 -04:00
Joshua T Flowers 9d04b15c7a Onboarding: Scroll to top when navigating between pages (https://github.com/woocommerce/woocommerce-admin/pull/3122)
* Scroll to top when navigating between tasks

* Scroll to top when navigating between steps
2019-10-29 14:24:24 -04:00
Justin Shreve af10516b8f Make minor text fixes to onboarding (https://github.com/woocommerce/woocommerce-admin/pull/3116)
* Make minor text fixes to onboarding

* Fix it typo and use oxford commas
2019-10-29 14:15:36 -04:00
Justin Shreve 1aea9d7bd7 Update payments task based on feebback (https://github.com/woocommerce/woocommerce-admin/pull/3099)
* Mark stripe as enabled by default in supported countries, and link completed task to payment settings

* Update stripe supported code to pull from server side list

* Remove dependence on core method
2019-10-29 14:03:07 -04:00
Justin Shreve c70143ccf8 Fix missing product tutorial and activity panels (https://github.com/woocommerce/woocommerce-admin/pull/3117) 2019-10-29 13:44:45 -04:00
Joshua T Flowers bfc1721c69 Onboarding: Add task view and product import track events (https://github.com/woocommerce/woocommerce-admin/pull/3115) 2019-10-29 10:08:39 +08:00
Joshua T Flowers 1582cb1bf1 Add color to button text to pages with class woocommerce-page (https://github.com/woocommerce/woocommerce-admin/pull/3107) 2019-10-28 09:47:29 +08:00
Justin Shreve 051fd5d934 Update styles to work with WP 5.3 (https://github.com/woocommerce/woocommerce-admin/pull/3086)
* Update onboarding styles to work with WP 5.3

* Fix design on 5.3 as well as older versions

* Adjust styling and remove 5.3 class name
2019-10-25 09:05:44 -04:00
Ron Rennick c3c790591f Address revenue discrepancies (https://github.com/woocommerce/woocommerce-admin/pull/3095)
* exclude wc-auto-draft orders from import

* round amounts for tax inclusive pricing

* differentiate between product and overall revenue

* use correct total when importing product line item

* update product revenue labels to "net sales"
2019-10-25 09:29:09 -03:00
Jeff Stieler 26f23def50 Add Inbox note action indication (https://github.com/woocommerce/woocommerce-admin/pull/3039)
* Move inbox note actions to a bespoke component.

* Set busy state on action buttons on click.

* Allow for Note actions to be deleted.

* Update FB extension note after installation is complete.

* Link actions don't get busy treatment.

* Re-fetch note actions after updating.

Get new action IDs from the database.

* Add tracking to inbox note views. (https://github.com/woocommerce/woocommerce-admin/pull/3096)

* Move inbox note content to its own component.

* Send a tracks event when inbox notes are in the viewport.

Uses react-visibility-sensor.

* Match event data to `inbox_action_click`.
2019-10-24 10:13:05 -07:00
Jeff Stieler 1ac8577fc2 Match server-side CSV export format to client-side (https://github.com/woocommerce/woocommerce-admin/pull/2987)
* Add "exportable" report interface for defining CSV export values.

* Define export values for Orders Report.

* Define export values for Products Report.

* Define export values for Categories Report.

* Define export values for Coupons Report.

* Allow commas and double quotes in CSV exported values.

* Fix in-browser export formatting of orders report products.

* Align server-side orders report export formatting with in-browser.

* Cover comma and double quote escaping in CSV export package tests.

* Define export values for Customers Report.

* Embed response links when requesting data for CSV exports.

* Define export values for Downloads Report.

* Move reusable report export functions to a trait.

* Define export values for Stock Report.

* Define export values for Taxes Report.

* Define export values for Variations Report.

* Define export values for Revenue Report.

* Always pass export row data through the filter.

* Fix formatting in test case for CSV coupon export.

* Quote escape CSV headers in client-side export.

Escape values with spaces as well.

* Check if inventory is managed at the product level before using the stock status/quantity.

* Prevent CSV injection in csv-export package.
2019-10-24 09:41:16 -07:00
Justin Shreve dd77d25a34 Handle Jetpack being disconnected on the start page (https://github.com/woocommerce/woocommerce-admin/pull/3087)
* Handle Jetpack being disconnected on the start page

* Handle PR feedback, fix up pluginName logic
2019-10-24 12:20:32 -04:00
Joshua T Flowers 38c9e38e28 Add no product option to product count dropdown (https://github.com/woocommerce/woocommerce-admin/pull/3092) 2019-10-24 07:33:10 +08:00
renovate[bot] 5797f2b82e Update wordpress monorepo (https://github.com/woocommerce/woocommerce-admin/pull/2929)
* Update wordpress monorepo

* Add missing Gutenberg grid variables

* Fix button styling

* Fix snapshots (new classes and events are passed through from WP components update)

* Adjust button overwrites

* Update package-lock.json

* Fix focus issues/conflicts with react-dates and Dropdown

* Maintain DateRange focus without impacting expected "click outside" behavior.

* Resolve multiple React versions, update testing dependencies.

* blow away package-lock.json and refresh

- this fixed tests after an npm install on my end

* Allow tabbing to month nav and calendar grid.

* Fix keyboard navigation of DayPicker elements.

Add prop for specifying an element that's allowed to take focus from DateRange.

* refresh package-lock
2019-10-23 11:18:32 -07:00
Justin Shreve e9f4d45274 Install business extensions on the business details page (https://github.com/woocommerce/woocommerce-admin/pull/3084)
* Install Facebook & MailChimp plugins on the business details page

* Handle PR feedback: Add missing plugin name constants, and improve plugin component error handling
2019-10-23 11:17:38 -04:00
Joshua T Flowers 13f775eb98 Onboarding: Don't skip start step if TOS not accepted (https://github.com/woocommerce/woocommerce-admin/pull/3068)
* Don't skip start step if TOS not accepted

* Show WCS benefits even when installed
2019-10-23 07:55:57 +08:00
Justin Shreve f888079fe7 Add notices to return to task list on product and homepage tasks. (https://github.com/woocommerce/woocommerce-admin/pull/3061)
* Add notices to return to task list on product and homepage tasks.

* Handle PR feedback, simplifiy check.
2019-10-21 14:13:25 -04:00
Justin Shreve 973acde227 Fix asset image URL (https://github.com/woocommerce/woocommerce-admin/pull/3062) 2019-10-21 11:07:45 -04:00
Joshua T Flowers 8b1e263709 Onboarding: Add task list extensibility and example plugin (https://github.com/woocommerce/woocommerce-admin/pull/3060)
* Add task list filter

* Add task example plugin
2019-10-21 11:11:21 +08:00
Joshua T Flowers 0c490d430f Onboarding: Fix RTL translation in revenue ranges and translation notes (https://github.com/woocommerce/woocommerce-admin/pull/3059) 2019-10-21 08:48:30 +08:00