Commit Graph

853 Commits

Author SHA1 Message Date
Renovate Bot b4015a2b79 Pin dependency @types/dompurify to 2.2.2 2021-05-19 01:41:34 +00:00
Joel Thiessen 9fda36439e Typescript conversion of DynamicForm Component (https://github.com/woocommerce/woocommerce-admin/pull/6981) 2021-05-18 12:46:21 -07:00
Hsing-yu Flowers 9cce902c84 Update Form's documentation (https://github.com/woocommerce/woocommerce-admin/pull/6708)
* Rename onChangeCallback to onChange

* Add onChange documentation

* Update prop `touched` documentation

* Removd unused onChnage in the example

* Add changelog

* Handle feedback

* Deprecate onSubmitCallback

* Handle feedback 2

* Update new onSubmitcallbacks

* Handle feedback 3

Co-authored-by: Bec Scott <me@becdetat.com>
2021-05-18 14:24:24 +10:00
louwie17 844f71486b Remove `woocommerce/experimental` dependency from `woocommerce/components` (https://github.com/woocommerce/woocommerce-admin/pull/6986)
* Removed the experimental dependency from the components package, and moved stories to experimental package

* Add changelog

* Fix typo
2021-05-14 12:23:01 -03:00
Jeff Stieler 5e51901e6a Update package versions for publishing. (https://github.com/woocommerce/woocommerce-admin/pull/6985) 2021-05-13 09:42:04 -06:00
Jeff Stieler eb4d60c4fd Fix styling of task item content. (https://github.com/woocommerce/woocommerce-admin/pull/6983) 2021-05-13 09:20:26 -06:00
Tomek Wytrębowicz 7cc1d724de Forward `autocompleter` prop from `CompareFilter` to `Search` (https://github.com/woocommerce/woocommerce-admin/pull/6911)
- Forward `autocompleter` prop from `CompareFilter` to `Search`.
	Allow, to use the `custom` type of search, 
	previously it was complaining about lack of `autocompleter`,
	even though it was provided.

- Move `path` in Storybooks example to a parameter, to allow setting it in unit tests.
- Add few tests for FilterPicker. 
	- it renders the basic storybook example without throwing an error
	- it forwards `autocompleter` & `type` props

Fixes: woocommerce/woocommerce-admin#6890
2021-05-13 17:20:07 +02:00
Jeff Stieler bdd91b3337 Move TaskItem component to experimental package for reuse. (https://github.com/woocommerce/woocommerce-admin/pull/6978)
* Move TaskItem component to experimental package for reuse.

* Bump package version.

* Add dompurify types.
2021-05-13 08:05:30 -06:00
Joel Thiessen 073a220b59 Adding Slotfill extension components for remote payments (https://github.com/woocommerce/woocommerce-admin/pull/6932) 2021-05-11 09:36:56 -07:00
Jeff Stieler c904690cac Fix storybook example for the experimental list components. (https://github.com/woocommerce/woocommerce-admin/pull/6963) 2021-05-11 07:00:49 -06:00
Jeff Stieler 278a92f52d Bump @woocommerce/experimental version. (https://github.com/woocommerce/woocommerce-admin/pull/6960) 2021-05-10 12:18:36 -06:00
louwie17 812743d3ff Move experimental list components to experimental package (https://github.com/woocommerce/woocommerce-admin/pull/6950)
* Move experimental list components to experimental package

* Update changelogs

* Fix lint errors

* Fix lint error

* Update css lint

* Fix test

* Update package lock
2021-05-10 11:40:49 -03:00
Mik 820bf30e29 Replace marketing extension - Google Listings and Ads (https://github.com/woocommerce/woocommerce-admin/pull/6939)
* Replace google icon

* Remove note for Google Ads extension

* Replace extension in API OnboardingProfile

* Record event for new extension

* Replace extension in onboarding flow

* Replace extension benefits

* Change background colour of Google icon

* Fix svg warnings

* Add changelog entry

* Fix prettier error

* Add old note to obsolete list for removal
2021-05-10 10:56:47 +01:00
renovate[bot] 47d0bebea3 Update babel monorepo (https://github.com/woocommerce/woocommerce-admin/pull/6929)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-10 13:34:20 +12:00
Ilyas Foo de9cfb210d Try add payment method selector to onboarding store (https://github.com/woocommerce/woocommerce-admin/pull/6921)
* Added payment method to onboarding data store

* Add reducer test

* Address feedback on reducer naming convention, isResolving, enabledMethods

* Move out types to live in its own island

* Add a comment to remind ourselves for utilizing payments data store for enabled payment gateways

* Update changelog
2021-05-07 18:06:35 +08:00
Ilyas Foo 81573c2b68 Fix SelectControl focus and de-focus bug (https://github.com/woocommerce/woocommerce-admin/pull/6906)
* Fix select-control component to preserve currently selected item on focus and de-focus

* No longer auto select option on initial render, pressing tab would only select if selection exists

* Fix to reflect the proper suggested changes

* Attempt to fix unnecessary search reset on pressing tab

* Fix for keyboard interactions and added accompanying tests
2021-05-06 15:07:45 +08:00
renovate[bot] a802e8fb64 Pin dependencies (https://github.com/woocommerce/woocommerce-admin/pull/6796)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-03 16:18:45 -03:00
Tomek Wytrębowicz 6aa78cbdb9 Make `Search` accept sync `autocompleter.options.` (https://github.com/woocommerce/woocommerce-admin/pull/6884)
Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>

Make `Search` component accept `autocompleter.options` that meet the requirements stated in [the docs](https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/autocomplete#options): 
> May be an array, a function that returns an array, or a function that returns a promise for an array.


Fixes https://github.com/woocommerce/woocommerce-admin/issues/6061.
2021-05-03 19:18:07 +02:00
Fernando 0645c2b30a Add disabled prop to SelectControl (https://github.com/woocommerce/woocommerce-admin/pull/6902)
* Add disabled props to SelectControl

This commit adds "disabled" props to SelectControl

* Added changelog

* Fixed prop name

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2021-04-30 09:11:59 -03:00
Sam Seay b84799d470 Expand / collapse list items component (https://github.com/woocommerce/woocommerce-admin/pull/6869)
* Prototype the basic functionality of the list collapse component.

* Further work on the component.

* Add icons and some basic styling. Fix exports to include 'Experimental'

* Add CSSTransition to collapsible list item

* Add tests for collapsible component

* Add changelog

* Add collapse/expand callbacks

* Add tests for callbacks

* Replaced collapsible list item with a collapsible list instead

* Updated to use calculated height versus absolute height

* Removed fallback and removed animation from collapse footer

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2021-04-29 14:52:51 -03:00
Christos Lilitsas 1edb849c67 Remove allowed keys list for adding woocommerce_meta data (https://github.com/woocommerce/woocommerce-admin/pull/6889)
* introduce filter for wc meta preferences

* package changelog

* added PR number

* Remove allow list for woocommerce_meta keys

* Remove hooks dep

* Lint js fixes

* Update readme.txt

* Update readme.txt

* Fix test.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2021-04-28 18:18:29 -04:00
renovate[bot] d75b07267e Update babel monorepo (https://github.com/woocommerce/woocommerce-admin/pull/6839)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-27 16:55:14 -04:00
Tomek Wytrębowicz 07e534cd9e Forward `autocompleter` prop from `FilterPicker` to `Search` (https://github.com/woocommerce/woocommerce-admin/pull/6880)
* Add a Basic test for FilterPicker.

Test that it renders the basic storybook example without throwing an error.
Move `path` in Storybooks example to a parameter, to allow setting it in unit tests.

* Forward `autocompleter` prop from `FilterPicker` to `Search`.

Allow, to use the `custom` type of search, previously it was complaining about lack of `autocompleter`, even though it was provided.

Fixes: https://github.com/woocommerce/woocommerce-admin/issues/6062.

* Add changelog entry.

* Move `FilterPicker` config creation closer to tests that use it.

* Remove unused type prop from `FilterPicker` tests.

Addresses https://github.com/woocommerce/woocommerce-admin/pull/6880/files#r620285400.

* Add changelog note also to `CHANGELOG.md`.

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2021-04-27 14:10:33 -04:00
louwie17 071a68b950 Update task list component to make use of new experimental list (https://github.com/woocommerce/woocommerce-admin/pull/6849)
* Add initial task item component with the new task list

* Switch components to functional components

* Some minor updates from the last rebase

* Fix missing variables.

* Fix tests

* Add animation for the experimental list

* Fix lint error

* Add changelog

* Fix E2E tests

* Update PR suggestions and export list from experimental package

* Fix dismiss styling issue

Co-authored-by: Jeff Stieler <jeff.m.stieler@gmail.com>
2021-04-27 12:23:34 -03:00
Jeff Stieler 9724b5d9d9 SelectControl: fix display of multiple selections without inline tags. (https://github.com/woocommerce/woocommerce-admin/pull/6862)
* SelectControl: fix display of multiple selections without inline tags.

* Add changelog entries.
2021-04-27 10:03:29 -04:00
Albert Juhé Lluveras ffaadf9190 Make ids unique in SearchListControlItem (https://github.com/woocommerce/woocommerce-admin/pull/6871)
* Make ids unique in SearchListControlItem

* Set storybook default loading state to false

* Small CSS fixes

* Add changelog entry
2021-04-27 07:59:38 +02:00
Sam Seay ed483ab43d Refactor <List> to support custom markup (https://github.com/woocommerce/woocommerce-admin/pull/6787)
* Create the new experimental list, default to rendering it when items are not supplied.

* Remove typings from the List, ListItem.

* Add react-transition-group as dependency.

* Fix warnings by wrapping with CSS transition, pass down props from List.

* Remove type annotations left in list-item.

* Duplicate some styles in the higher level woocommerce-list-item element, to make them work in the new list.

* Fix accessibility issues, adjust the role logic

* Add more testing of the roles logic.

* Mark the old list stories as deprecated, add a basic story for the new style.

* Expose ListItem without Experimental in the name.

* Remove some redundant code changes.

* Fix linting issues

* Add types package.

* Cast the type of children to TransitionGroup.

* Adjust the list to assume a purpose of being a list of links.

* Adjust the tests for the new behaviour.

* Fix css mangled by prettier.

* Fix types that are optional.

* Rework the list item.

* Export new list as experimental, fix accessibility styles and deprecation notice.

* Make the basic transition opt-in.

* Update classnames to get types.

* Add tests, adjust behaviour for css disable.

* Fix css lint, remove types/classnames, update tetsing-library/user-event.

* Fix the basic story for ExperimentalList.

* Conditionally add keyDown and role based on onClick handler. Adjust tests to new behaviour.

* tabIndex only on hasAction

* Update the package-lock

* Add changelog

* Fix transition styling

Co-authored-by: Paul Sealock <psealock@gmail.com>
Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2021-04-23 15:47:43 -03:00
Paul Sealock 562af3eedc SlotFill: Remove Navigation's context (https://github.com/woocommerce/woocommerce-admin/pull/6832)
* Use same wc-admin slotFill context

* changelog
2021-04-23 15:44:54 +12:00
louwie17 be7dd2dd5e Add recommended payment methods (https://github.com/woocommerce/woocommerce-admin/pull/6760)
* Add initial payment recommendations code for the payments settings

* Added request data for the recommended payments

* Some styling updates and make sure it does not show when marketplace suggestions is disabled

* Update url

* Update comment in php class

* Add tests

* Fix lint errors

* Remove unnecessary type

* Fix lint error

* Fix broken test

* Convert plugin package to typescript

* Fix lint errors

* Add changelog

* Add support for locale-data

* Fix track name

* Fix up the tests

* Fix lint errors

* Address PR feedback

* Add tests for option hydration

* Make types more robust in plugins reducer

* Made use of SlotFill component instead of page registry and router

* Removed console log, and fixed types

* Add newer version of i18n to data package, for newer types

* Make the request to WooCommerce.com more restrictive

* Fix path of import

* Update PHP with suggested changes

* Remove SlotFill with applyFilters

* Update copy and PR feedback

* Update package lock

* Updated package lock

* Fix the package lock

* Added dot, and some minor styling changes

* Add test instructions
2021-04-20 14:17:19 -03:00
louwie17 28d4c03ae0 Add try catch around JSON parse of users meta values (https://github.com/woocommerce/woocommerce-admin/pull/6819)
* Add try catch around JSON parse of users meta values

* Add changelog
2021-04-16 17:31:59 -03:00
Joshua T Flowers 89c19a4d20 Try: Use the store timezone to make time data requests (https://github.com/woocommerce/woocommerce-admin/pull/6632)
* Add store timezone string to preloaded settings

* Get current timezone periods based on store timezone

* Use current moment object to append timestamps

* Add changelog and testing instructions

* Consolidate timezone logic into getStoreCurrentTime

* Use const for default datetime format

* Use store moment converted via tz

* Make testing instructions more clear

* Add information to date readme about timezones

* Add tests around getStoreTimeZoneMoment
2021-04-16 16:13:39 -04:00
louwie17 7859e37221 Making experimental package public and updating its dependency versions (https://github.com/woocommerce/woocommerce-admin/pull/6810)
* Making experimental package public, and updating the dependency versions

* add experimental to webpack and make explat public

* bump DEWP package version

* use filepath for inter package dependencies

* load experimental script

* remove check for experimental

Co-authored-by: Sam Seay <samueljseay@gmail.com>
Co-authored-by: Paul Sealock <psealock@gmail.com>
2021-04-16 15:34:15 +12:00
louwie17 68161836a5 Update experimental package path, and bump patch version (https://github.com/woocommerce/woocommerce-admin/pull/6808)
* Update experimental package path, and bump patch version

* Revert package-lock changes
2021-04-15 15:34:12 -03:00
louwie17 c0cb48f217 Bumped version and changelog of component package to 6.1.0 (https://github.com/woocommerce/woocommerce-admin/pull/6806)
* Bumped version and changelog to 6.1.0

* Remove the unreleased header
2021-04-15 13:54:32 -03:00
Albert Juhé Lluveras f3b097c3d3 Add dompurify and md5 to @woocommerce/components dependencies list (https://github.com/woocommerce/woocommerce-admin/pull/6804)
* Add dompurify and md5 to @woocommerce/components dependencies list

* Add changelog entry

* Add @woocommerce/experimental to @woocommerce/components dependencies list

* Update changelog entry
2021-04-15 13:29:44 -03:00
Ismael Martín Alabarce 664694e165 Render optional children in summary number component (https://github.com/woocommerce/woocommerce-admin/pull/6748)
* WIP add details prop to summary number component. New optional prop to add additional information at the bottom.

* Update component readme and stories to include new prop

* Revert commits to use children instead of a new prop

* Render optional summary number component children

* Typo fix, doc improvement and add entry to changelog

* Add readme.txt entry
2021-04-15 08:49:35 +02:00
Paul Sealock 7ab756b76c Try ExPlat: Add A/A test (https://github.com/woocommerce/woocommerce-admin/pull/6669)
* Add basic ExPlat initialization

* add tsx support
2021-04-15 13:32:46 +12:00
Hsing-yu Flowers 3d0e00ed0b Make pagination buttons height and width consistent (https://github.com/woocommerce/woocommerce-admin/pull/6725)
* Make pagination buttons height and width consistent

* Add changelog
2021-04-13 10:30:56 -04:00
Paul Sealock 253cb67544 make notices private (https://github.com/woocommerce/woocommerce-admin/pull/6784) 2021-04-13 08:58:19 +12:00
Paul Sealock 8c135e31c5 bump package versions (https://github.com/woocommerce/woocommerce-admin/pull/6767) 2021-04-13 08:32:27 +12:00
Renovate Bot e8e04d2e2a Update dependency @testing-library/react to v11.2.6 2021-04-07 03:07:07 +00:00
Bec Scott 4a595b3a87 Add readme instructions on how to use CustomerEffortScore (https://github.com/woocommerce/woocommerce-admin/pull/6746)
* Add readme instructions on how to use CustomerEffortScore

* Use fancy JS formatting
2021-04-07 10:58:01 +10:00
Joel Thiessen 588776deb3 Fix persisted queries being lost when navigating to excluded page (such as Homescreen) (https://github.com/woocommerce/woocommerce-admin/pull/6614) 2021-04-02 14:35:31 -07:00
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
Renovate Bot 64dc45d438 Pin dependency @types/wordpress__components to 9.8.6 2021-03-31 01:55:12 +00:00
Adrian Duffell a5e14e9fb2 Add TypeScript to CustomerFeedbackModal (https://github.com/woocommerce/woocommerce-admin/pull/6498)
* Add types

* Add type definitions for @wordpress/components

* Fix formatting

* Fix JSX return type

* Fix incorect type for rows

* Add null to return type for react component

* Add type definitions for @wordpress/components to main package

* Add changelog entry

* Remove TS filename from import

* Re-add @types/wordpress__components
2021-03-30 20:04:08 +08:00
Adrian Duffell 46a5cab581 Update Customer Effort Score Changelog (https://github.com/woocommerce/woocommerce-admin/pull/6672) 2021-03-26 21:53:18 +08:00