Commit Graph

654 Commits

Author SHA1 Message Date
Paul Sealock 3dcb7697e5 Bump components version and add single publish instructions (https://github.com/woocommerce/woocommerce-admin/pull/6736) 2021-04-02 12:28:03 +13:00
Moon 762663cb4e Escape label value 2021-04-02 12:10:44 +13:00
Albert Juhé Lluveras 9c1a728f60 Add escaping to components 2021-04-02 10:51:20 +13:00
louwie17 e6f55019a6 Update select control logic so value type stays consistent (https://github.com/woocommerce/woocommerce-admin/pull/6594)
* Update select control logic so value type stays consistent

* Added test cases for updated changes

* Add changelog

* Removed the use of lodash 'findIndex' using the native one instead

* Added onChange update to readme
2021-04-01 09:34:56 -03:00
David Levin 2b95eea771 Update contrast and hover / active colors for analytics dropdown buttons (https://github.com/woocommerce/woocommerce-admin/pull/6504)
* Update contrast and hover / active colors

* Update hover and active state of chevron using mask

* add test instructions and changelog entries

* Update readme.txt

Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
Co-authored-by: Dan Hauk <dan@danhauk.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-03-22 20:56:15 +13:00
Adrian Duffell 828a2cb038 Move Lodash to a Peer Dependency in Packages (https://github.com/woocommerce/woocommerce-admin/pull/6399)
* Update old versions of lodash in packages

* Add changelog entries

* Move lodash to peerDependencies in components package

* Fix broken JSON

* Fix lodash defined twice in components package

* Move lodash to peer dependency in date package

* Move lodash to peer dependency in navigation package

* Move lodash to peer dependency in notices package

* Relax lodash version constraint in components package

* Update  package changelogs
2021-03-12 11:58:51 +08:00
renovate[bot] 19a13ae09c Update dependency core-js to v3.9.1 (https://github.com/woocommerce/woocommerce-admin/pull/6497)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-03-05 16:19:30 +13:00
Fernando 09d6bd9164 Fixed a few console errors in JS tests (https://github.com/woocommerce/woocommerce-admin/pull/6472)
* Fixed connect test

* Fixed plugins test

* Fixed stock panel tests

* Added changelog

# Conflicts:
#	readme.txt

* Removed blank line

* Changelog line removed

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-03-04 09:15:03 -03:00
David Levin f00721fa3e Fix summary number style regression on analytics reports (https://github.com/woocommerce/woocommerce-admin/pull/5913)
* Update summary number styles

* Add changelog

* Add testing instructions

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

* Update filteredOptions to searchOptions

* Check if options then setState after searchOptions is updated

* Show all options under business details select controls
2021-03-02 09:06:29 +08:00
Sam Seay 630f31ae9d Clean up unused deps and add TS to the build. (https://github.com/woocommerce/woocommerce-admin/pull/6441) 2021-03-01 16:01:22 +13:00
renovate[bot] 1a67c4098b Update dependency @woocommerce/csv-export to v1.3.0 (https://github.com/woocommerce/woocommerce-admin/pull/6438)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-25 16:38:02 +13:00
Sam Seay 5354e4e856 Remove googlefonts/material icons. Migrate to @wordpress/icons and gridicons (https://github.com/woocommerce/woocommerce-admin/pull/6343) 2021-02-18 11:54:02 +13:00
renovate[bot] 8c9235096c Update wordpress monorepo (https://github.com/woocommerce/woocommerce-admin/pull/6013)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
Co-authored-by: Sam Seay <samueljseay@gmail.com>
2021-02-11 10:52:39 +13:00
renovate[bot] 999549da3c Update dependency core-js to v3.8.3 (https://github.com/woocommerce/woocommerce-admin/pull/6105)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-02-09 13:56:20 +13:00
Hsing-Yu Flowers db0552e714 Change from MenuGroup to label (https://github.com/woocommerce/woocommerce-admin/pull/6090)
* Change from MenuGroup to label

* Remove icon

* Remove icon folder

* Update input style

* Remove list message

* Run test snapshots

* Add single knob

* Add changelog

* Change to wrap list with ul

* Run snapshots test

* Add styling on li

* Move renderList outside of li to prevent nesting

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

* Improve error messages for failed plugin installs.

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

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

* Move the whitelist of mollie to Onboarding.php.

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

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

* Add some tests for the mollie payment method.

* Remove redundant change to handler.

* Add a changelog entry for the feature.

* fix name of option

* Add testing instructions

Co-authored-by: Rebecca Scott <me@becdetat.com>
2021-02-05 13:41:55 +10:00
Joel Thiessen 68f06ccde8 Fixing certain screenreaders (NVDA) not recognizing chart data points correctly, and saying "blank" (https://github.com/woocommerce/woocommerce-admin/pull/6227) 2021-02-02 15:27:23 -08:00
Joel Thiessen 2e3f23f653 Fix 'sort by undefined' issue with screen readers in reports table (https://github.com/woocommerce/woocommerce-admin/pull/6232) 2021-02-02 15:02:57 -08:00
Joel Thiessen 969af77ced Changing heading on report tables to use semantic header tag (https://github.com/woocommerce/woocommerce-admin/pull/6234) 2021-02-01 13:59:21 -08:00
Joel Thiessen cd9b2f8715 Adding checkbox role to chart legend component to make it compatible with screen readers (https://github.com/woocommerce/woocommerce-admin/pull/6226) 2021-02-01 13:26:00 -08:00
Darren Ethier 4210b6f0a8 Update @wordpress/eslint-plugin dependency to latest version. (https://github.com/woocommerce/woocommerce-admin/pull/5856)
* update @wordpress/eslint-plugin dependency to latest version

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

* add jsdoc config to use typescript format for jsdocs

* update changelog

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

* add docs

* minor prettier fix in test file

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

* updated changelog

* fix package-lock.json

* prettier auto-fixes

* add prettier dependency at root

* sigh prettier is being finicky

* version bump

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

* Add custom product template for the new-post route

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

* Added ProductTemplates Datastore to create template with REST api

* Add back variation method, deleted by accident

* Move product from template endpoint to OnboardingTasks class

* Fix lint errors

* Added tracks and template hooks

* Rename product create permission check function, for less confusion

* Remove duplicate recommended option

* Fix stylelint errors

* PHP tests for the product_from_template endpoint

* Fix onboarding php unit tests

* Write tests for client product template options

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

* Fix lint errors

* REmove assertion as it fails on the ci

* Add changelog

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

* Add more specific assertions for importing sample products test

* Update the sample products test

* Deconstruct item object, from PR suggestion

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

Co-authored-by: Rebecca Scott <me@becdetat.com>
2021-01-21 19:06:07 +01:00
Sam Seay 35a448a8f3 Allow for larger result sets of attribute terms (https://github.com/woocommerce/woocommerce-admin/pull/6077) 2021-01-18 09:49:32 +13:00
Joshua T Flowers 0b3f4d8e92 Try: Replace Accordion with Panel component (https://github.com/woocommerce/woocommerce-admin/pull/5970)
* Use Panel for Activity Panels

* Update styling for panels in activity panels

* Remove Accordion component

* Add collapsible param to activity panel tests

* Fix errant comma

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

* Update empty activity card styles

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

* Possibly use safe navigation components

* Add experimental package

* Update components to import from woocommerce/experimental

* Make experimental package private

* Reference experimental package relatively

* Update packages/experimental/README.md

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

* Update packages/experimental/CHANGELOG.md

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

* Update history state instead of mocking getQuery in tests

* Handle PR feedback

* Create excluded externals array and return early

Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-01-07 18:57:09 -05:00
renovate[bot] 1b2f20b6bb Update dependency react-transition-group to v4.4.1 (https://github.com/woocommerce/woocommerce-admin/pull/5950)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-07 12:57:50 +13:00
Sam Seay a2c4a6a306 A/B test creating a business features step for free extensions (https://github.com/woocommerce/woocommerce-admin/pull/5786)
This fixes woocommerce/woocommerce-admin#5287 

Major changes:

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

2. Introduces a new flow for choosing business extensions that was specified in woocommerce/woocommerce-admin#5287 issue description. Please check the issue for reviewing the designs. The simplest way to implement this, ended up being keeping the existing flow intact and where necessary copy pasting code from those components into the new flow. This new flow is only shown if your segmentation matches the following: `Stores that selected the US as the country and Other or Food & Drinks as the industry
2021-01-07 11:08:57 +13:00
renovate[bot] e3d38e3d31 Update dependency react-router-dom to v5.2.0 (https://github.com/woocommerce/woocommerce-admin/pull/5949)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-01-05 13:42:18 +13:00
Joshua T Flowers ab9038d329 Update table component to use wp card (https://github.com/woocommerce/woocommerce-admin/pull/5904)
* Use wp card in table components

* Migrate report styles to report stylesheet

* Fix table scroll shadow

* Fix pagination styling

* Handle PR feedback

* Move search and action styles to table

* Add margin between table actions

* Remove vertical dividers

* Update chart table border colors (https://github.com/woocommerce/woocommerce-admin/pull/5932)
2021-01-04 15:56:57 -05:00
Joshua T Flowers 0bc842f7c3 Allow default link behavior when cmd or ctrl are used (https://github.com/woocommerce/woocommerce-admin/pull/5966)
* Allow default link behavior when cmd or ctrl are used

* Convert Link to functional component

* Add alt and shift keys
2020-12-29 11:13:20 -05:00
David Levin 36c9454e90 update woocommerce dropdown button (https://github.com/woocommerce/woocommerce-admin/pull/5906)
Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
2020-12-22 09:14:11 -08:00
Albert Juhé Lluveras 080271fb27 Add SearchListControl isCompact prop (https://github.com/woocommerce/woocommerce-admin/pull/5901)
* Add isCompact prop to SearchListControl

* Add left and right borders to search list

* Remove box-shadow when search list items are focused/active

* Add Changelog notice

* Update snapshots
2020-12-22 15:32:24 +01:00
Joshua T Flowers 2db701b5f3 Add deprecation notice to wc card component (https://github.com/woocommerce/woocommerce-admin/pull/5911)
* Add deprecation notice to wc card component

* Add changelog note
2020-12-21 18:12:05 -05:00
Joshua T Flowers da239f6bb7 Update filters to use wp card component (https://github.com/woocommerce/woocommerce-admin/pull/5903)
* Use cards in advanced filters

* Use wp card for compare filters

* Fix scss lint errors
2020-12-21 14:43:39 -05:00
Paul Sealock 80f641b849 Unbundle wp.components (https://github.com/woocommerce/woocommerce-admin/pull/5753)
* enqueue wp-components

* conditional check of Navigation?

* nav version checks, first pass

* better nav checking

* bump min requirments

* min versions

* Use WP 5.6 instead of 5.6.0

* add wp.date and wp.compose

* Handle missing FlexItem

* enqueue styles

* fix date range mobile dropdown
2020-12-21 14:57:55 +13:00
David Levin 4822afe5fb update section header component styles to match typography in @wordpress/components (https://github.com/woocommerce/woocommerce-admin/pull/5891)
* update card header styles to match typography in @wordpress/components

* revert analytics card headers

Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
2020-12-17 13:49:03 -08:00
Jeff Stieler c8c544f70c Support custom product attributes in advanced filter (https://github.com/woocommerce/woocommerce-admin/pull/5848)
* Add product attributes autocomplete for Search control.

* Support single selection in Search component.

* Fix SelectControl input after selection in single mode.

* Remove label from Search component's inner SelectControl.

Placeholder is the behavior we want to avoid label and selection collision.

* Match Search component selected prop to SelectControl.

It's passed through anyhow.

* Rework attribute filter to use new endpoints for custom terms.

* Hook up custom attribute filter to report queries.

* Fix errant space in filter name.

* Fix SelectControl active status when control is disabled.

* Fix SelectControl "has tags" logic for non-multiple use cases.

* Fix attribute filter screen reader text.

* Update changelogs.

* Move custom attribute test to it's own function.

* Remove SelectControl input disabling.

This was supposed to improve keyboard behavior for non-multiple controls, but it was questionable.

* Fix backspace in attribute term field.
2020-12-17 09:59:01 -05:00
Albert Juhé Lluveras e44193cb1d Fix count bubble alignment in SearchListItem with latest @wordpress/components (https://github.com/woocommerce/woocommerce-admin/pull/5809)
* Remove showCount prop from SearchListControlItem

* Add option to show counts in ShowListControl story

* Fix count alignment in SearchListItem with latest Gutenberg

* Add new changelog entry

* Update dated prop description
2020-12-10 11:44:31 +01:00
Elizabeth Pizzuti 93cca16404 Style updates to tax task (https://github.com/woocommerce/woocommerce-admin/pull/5709)
* style changes to tax task

* Fix undefined variable use.

* Set plugin install dismissal actions as tertiary.

* change back to variable

* add margin to primary

* text-button-styles-homescreen

* Add specificity to the task caption selector.

We need to beat out the styles from Gutenberg.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2020-12-02 09:27:50 -05:00
louwie17 98a55aaeb9 Migrate reviews panel to home screen (https://github.com/woocommerce/woocommerce-admin/pull/5706)
* Create initial reviews panel and displaying it on the home screen

* Update reviews package to support updating and deleting reviews

* Allow custom icons to be defined for rating component

* Add approve, spam, and delete actions to home screen review panel

* Show entire list as updating when items are still in the store

* Update rating to only import the required icons, and allow icons to be passed in instead of strings

* Prune out reviews header panel, as we are not using it anymore

* Showing just a header if collapsible is false for activity panel

* Add tests for reviews panel and accordion changes

* Fix undoing a deleted item by using status - untrash

* Several styling changes to match wireframe as mentioned in PR review

* Moved review rating into the subtitle in relation to new design

* Update clear cache logic for last item

* Remove activity panel unused css

* Use invalideResolution instead of invalidateResolutionForStoreSelector
2020-12-02 09:30:39 -04:00
Jeff Stieler 4ad17adf36 Generate MD5 hashes without bundling all of Node crypto. (https://github.com/woocommerce/woocommerce-admin/pull/5768)
Reduces the build by 1.2MB.
2020-12-01 20:17:02 -05:00
Jeff Stieler 2a302603c6 Migrate Stock Panel to Homescreen (https://github.com/woocommerce/woocommerce-admin/pull/5729)
* Refactor low stock variable to be the count instead of a boolean.

* Add initial render of the Stock panel on the homescreen.

* Move existing Stock panel to homescreen accordion.

* Ensure int value for low stock product count.

* Update ProductImage styling.

* Update stock activity car styles.

* Only show 5 low stock products.

* Add "undo" action to the stock updated snackbar.

* Fix check for explicit notice dismissal when taking actions.

* Hide now-in-stock products after updating.

By cllearing "edited" flag on successful update.

* Fetch more products after updating stock.

* Fix the number of product placeholders shown.

* Only show products placeholders on the initial fetch.

* Fix placeholder style.

* Fetch low stock count dynamically.

* Let initialOpen prop toggle Accordion panels if they haven't been toggled by the user.

* Refactor item total count state.

Allows for auto-updating item totals whenever identical queries (from a totals perspective) are issued.

* Add last order date to low stock products API response.

* Allow non-date strings in ActivityCard date prop.

* Add last order date to stock panel cards.

* Remove empty stock panel view.

* Add test file for StockPanel.

* Only request necessary fields from products endpoint.

* Add test for products fetch after stock update.

* Fix field name.

* Add test for last order date in low stock products API response.

* Stock panel should be initially closed.

* Skip updating a product if the quantity is unchanged.
2020-11-25 13:51:15 -05:00
Moon eb7a779e1f Add/5349 trigger ces on filtering analytics (https://github.com/woocommerce/woocommerce-admin/pull/5649)
* Use a store to render CES tracks

* Use the CES store to trigger CES survey when users change date range or single product filters.

* Support onClick event for the Compare button

* Trigger CES survey when a user clicks the Compare button on products, variations, categories, coupon, and taxes pages

* Set default text for onSubmitLabel in js and remove its requirement

* Add addCesSurveyTrackForAnalytics action so that it can be shared in other components in analytics pages -- remove duplicates

* Call addCesSurveyTrack from addCesSurveyTrackForAnalytics to avoid duplicate

* Remove 'tracks' from the method name
2020-11-24 15:18:50 -08:00
renovate[bot] 0718343d11 Update dependency core-js to v3.7.0 (https://github.com/woocommerce/woocommerce-admin/pull/5667)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-11-25 08:48:14 +13:00
Sam Seay be47d9d795 Only import the Gridicons we need, to reduce package size. (https://github.com/woocommerce/woocommerce-admin/pull/5668) 2020-11-19 09:52:24 +13:00
Paul Sealock 947c6a4c32 update package dependencies 2020-11-18 13:33:41 +13:00