Commit Graph

771 Commits

Author SHA1 Message Date
Albert Juhé Lluveras 0b45200d36 Exclude bundlesize and composer files from being deployed ZIP (https://github.com/woocommerce/woocommerce-blocks/pull/937)
* Add bundlesize to .gitattributes ignores

* Typo

* Add composer files to .gitattributes ignores
2019-09-03 14:33:25 +02:00
Albert Juhé Lluveras f8086a4926 Update version to 2.4.1 and changelog 2019-09-02 15:20:41 +02:00
Albert Juhé Lluveras 5c3421d71f Always print shared settings (https://github.com/woocommerce/woocommerce-blocks/pull/934) 2019-09-02 15:19:15 +02:00
Albert Juhé Lluveras 501fec72b4 Fix misleading comment in src/Assets.php (https://github.com/woocommerce/woocommerce-blocks/pull/933) 2019-09-02 11:10:47 +01:00
Albert Juhé Lluveras 3829707bf9 Add error states to all components/blocks which use HOCs (https://github.com/woocommerce/woocommerce-blocks/pull/928)
* Show errors in Products Control component

* Export error formatting logic into a util
2019-08-30 11:36:06 +02:00
Mike Jolley ab58dfb16e Merge branch 'master' of https://github.com/woocommerce/woocommerce-gutenberg-products-block 2019-08-29 16:04:14 +01:00
Albert Juhé Lluveras aafda6bd21 Add description to blocks added in 2.4 2019-08-29 16:04:07 +01:00
Albert Juhé Lluveras 3da6fd1063 Add reminder to update list of blocks on every release (https://github.com/woocommerce/woocommerce-blocks/pull/930) 2019-08-29 16:02:56 +01:00
Mike Jolley 2c64ff0e98 Master is now 2.5.0-dev 2019-08-29 10:46:11 +01:00
Mike Jolley 0d0474f1e7 Rolling 2.4 release changelog (https://github.com/woocommerce/woocommerce-blocks/pull/720)
* 2.4 placeholder

* Add error handling for API requests to the featured product block.

* changelog

* Update changelog

* Changelog and versions
2019-08-29 10:39:51 +01:00
renovate[bot] 0e0bc749d2 Update dependency rimraf to v3 (https://github.com/woocommerce/woocommerce-blocks/pull/868) 2019-08-28 11:17:07 +01:00
renovate[bot] 8e020311eb Update dependency eslint to v6.2.2 (https://github.com/woocommerce/woocommerce-blocks/pull/922) 2019-08-28 11:07:00 +01:00
renovate[bot] 26671c37de Update dependency yargs to v14 (https://github.com/woocommerce/woocommerce-blocks/pull/887) 2019-08-28 11:06:44 +01:00
renovate[bot] dd06a34d72 Update dependency sass-loader to v7.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/892) 2019-08-28 11:06:26 +01:00
renovate[bot] 313fd1942f Update npm to v6.11.2 (https://github.com/woocommerce/woocommerce-blocks/pull/894) 2019-08-28 11:06:15 +01:00
renovate[bot] e80cca3890 Update dependency eslint-plugin-jest to v22.15.2 (https://github.com/woocommerce/woocommerce-blocks/pull/923) 2019-08-28 11:05:20 +01:00
renovate[bot] b8fa8710d6 Update dependency lint-staged to v9.2.5 (https://github.com/woocommerce/woocommerce-blocks/pull/924) 2019-08-28 11:05:10 +01:00
renovate[bot] 207023db3a Update dependency babel-eslint to v10.0.3 (https://github.com/woocommerce/woocommerce-blocks/pull/921) 2019-08-28 11:05:01 +01:00
renovate[bot] b1db72ba7e Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/920) 2019-08-28 11:02:10 +01:00
renovate[bot] 82a4107ee7 Update dependency webpack to v4.39.3 (https://github.com/woocommerce/woocommerce-blocks/pull/925) 2019-08-28 11:02:01 +01:00
Albert Juhé Lluveras 05ef21861d Fix color of All Reviews block icon (https://github.com/woocommerce/woocommerce-blocks/pull/919)
* Fix color of All Reviews block icon

* Fix lint notice
2019-08-28 11:29:43 +02:00
Mike Jolley ea0ce0e915 Fix wcSettings conflicts with wc-admin (https://github.com/woocommerce/woocommerce-blocks/pull/916)
* Add inline settings script later than init

* Rename to shared-settings for clarity - other extensions filter these

* Implement block settings

* tweak used hooks

* update comment

* Shared settings should be dependency

* Make Webpack output shared and block settings (https://github.com/woocommerce/woocommerce-blocks/pull/918)
2019-08-27 16:25:32 +01:00
Mike Jolley 01c6cdec93 Fix best seller query (https://github.com/woocommerce/woocommerce-blocks/pull/917) 2019-08-27 16:05:18 +01:00
Albert Juhé Lluveras 67cfa47b30 Fix order by and load more buttons not hidden in frontend review blocks (https://github.com/woocommerce/woocommerce-blocks/pull/914) 2019-08-27 15:56:07 +02:00
Albert Juhé Lluveras d1db64362a Cleanup withComponentId from base components (https://github.com/woocommerce/woocommerce-blocks/pull/907) 2019-08-27 12:24:50 +02:00
Albert Juhé Lluveras a6bf6d7fc0 Update review block icons (https://github.com/woocommerce/woocommerce-blocks/pull/913) 2019-08-27 12:01:35 +02:00
Albert Juhé Lluveras 20e3052d1c Show API errors in reviews editor block (https://github.com/woocommerce/woocommerce-blocks/pull/909)
* Show API errors in reviews editor block

* Update tests
2019-08-27 11:38:41 +02:00
Albert Juhé Lluveras ce30a9f1ff Reviews blocks: Fix warnings with components state (https://github.com/woocommerce/woocommerce-blocks/pull/908) 2019-08-27 11:38:28 +02:00
dependabot[bot] 3605ae580c Bump eslint-utils from 1.3.1 to 1.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/912)
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-27 11:12:08 +02:00
Albert Juhé Lluveras 32a86498cc Exclude bundlesize config file from ZIP (https://github.com/woocommerce/woocommerce-blocks/pull/910) 2019-08-27 09:56:59 +01:00
Albert Juhé Lluveras e19cd56c7f Remove RawHTML used for notice translations (https://github.com/woocommerce/woocommerce-blocks/pull/889)
* Remove RawHTML used for notice translations

* Revert "Remove RawHTML used for notice translations"

This reverts commit e28e082c2eefd8c29e982ee34ac27f99267171c3.

* Escape translation strings before using them

* Add translator notices
2019-08-26 12:11:50 +02:00
Albert Juhé Lluveras 4a1171364d Create OrderSelect and Label components (https://github.com/woocommerce/woocommerce-blocks/pull/905)
* Create Label and OrderSelect components

* Update review list item so it uses 'classnames'

* Split review order select styles from generic component

* Update snapshots

* Refactor Label so we don't need to check Symbol

* Add description to Label and OrderSelect components

* Use prop-types instead of prop-types-elementtype

* Simplify Label propTypes

* Update package-lock
2019-08-23 18:35:34 +02:00
Albert Juhé Lluveras 5eb588b50a Add babel-loader to webpack CoreConfig (https://github.com/woocommerce/woocommerce-blocks/pull/906) 2019-08-23 18:07:39 +02:00
Albert Juhé Lluveras 9d8d083363 All Reviews block (https://github.com/woocommerce/woocommerce-blocks/pull/902)
* Make all reviews block share the same frontend script

* Create 'All Reviews' block

* Create All Reviews no reviews placeholder

* Create EditorContainerBlock and move some shared logic there

* Update icon

* Address PR feedback
2019-08-23 16:48:48 +02:00
Darren Ethier 72f0ed470f Refactor: Introduce `wc-block-settings` bundle serving as `@woocommerce/settings` external. (https://github.com/woocommerce/woocommerce-blocks/pull/903)
* export new @woocommerce/settings external on `wc.blockSettings` global

- This handles reading data from the dom and assigning it to the global used in all packages dependent on `@woocommerce/settings` which is registered as an external pointing to the global.
- ensures that server data is only loaded on a route if needed.

* switch all direct imports of constants to use new `@woocommerce/settings` external

* enqueu new `wc-block-settings` script and attach inline data to it.

* fix test configuration and adjust test to use new external

* fix bad merge resolution after rebase

* switch constants import to `@woocommerce/settings` external after rebase

* reorder imports for convention

* improve method name
2019-08-22 16:56:47 -04:00
renovate[bot] 046e69e46c Update dependency @woocommerce/navigation to v3 (https://github.com/woocommerce/woocommerce-blocks/pull/876) 2019-08-22 21:01:10 +02:00
Albert Juhé Lluveras 46934d2946 Create withReviews base HOC (https://github.com/woocommerce/woocommerce-blocks/pull/877)
* Create withReviews base HOC

* Add tests

* Make Reviews by Category use withReviews HOC

* Move componentDidUpdate and debounce dependency to decouple HOC from components

* Spaces

* Rename 'delayMethod' to 'delayFunction'

* Refactor withReviews HOC

* Update tests

* Minor fixes

* Undo fix being handled in woocommerce/woocommerce-blocks#884

* Remove hardcoded from withReviews

* Update delay comment

* Use callbacks instead of announceUpdates prop

* Move props check to a 'shouldReplaceReviews' method

* Fix productId propType

* Move per_page and offset args to 'getArgs'

* Update withReviews displayName

* Fix tests

* Add callback propsTypes

* Use is-shallow-equal
2019-08-22 13:36:20 +02:00
Darren Ethier 0b9559e2db Install @babel/plugin-proposal-class-properties. (https://github.com/woocommerce/woocommerce-blocks/pull/856)
* add @babel/plugin-proposal-class-properties plugin

* refactor ProductByCategoryBlock to use class properties
2019-08-21 09:05:17 -04:00
Albert Juhé Lluveras 3a4c3229fb Add schedule to renovate bot config (https://github.com/woocommerce/woocommerce-blocks/pull/598) 2019-08-21 14:39:54 +02:00
Albert Juhé Lluveras eb6b584bc3 Set eslint version back to 6.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/896) 2019-08-21 12:52:10 +01:00
Albert Juhé Lluveras df9840a108 Review blocks: fix attribute notices not appearing (https://github.com/woocommerce/woocommerce-blocks/pull/888)
* Review blocks: fix attribute notices not appearing

* Classes and CSS cleanup
2019-08-21 12:48:22 +02:00
Albert Juhé Lluveras 9250d31227 Fix error appearing on Reviews by Product when there were no reviews (https://github.com/woocommerce/woocommerce-blocks/pull/884)
* Fix error appearing on Reviews by Product when there were no reviews

* Revert "Fix error appearing on Reviews by Product when there were no reviews"

This reverts commit 73e95b39aa9a318888d08bb51faeff8bb51259d7.

* Move withProduct() HOC to editor-block.js

* Revert "Move withProduct() HOC to editor-block.js"

This reverts commit ae9515792d4870cc5cf1d92a2d6acc91198b5f62.

* Move renderNoReviews back to edit.js

* Move no reviews placeholder to its own component

* Remove usage of 'RawHTML'

* Fix propTypes

* Remove unnecessary escapeHTML
2019-08-21 09:48:22 +02:00
renovate[bot] 0a709aa133 Update dependency eslint to v6.2.1 (https://github.com/woocommerce/woocommerce-blocks/pull/890) 2019-08-20 14:35:08 +01:00
Mike Jolley 3a9c5ba1cd Reviews by category block (https://github.com/woocommerce/woocommerce-blocks/pull/804)
* Create Reviews by Product block

* Honor Content settings

* Fix wrong className

* Load new wc-packages file

* Add reviews-by-product JS files to webpack config

* Cleanup

* Remove error messages

* Add Reviews by Product icon

* Update sort options

* Allow additional CSS classes attribute

* Refactor block styles

* Fix wrong default for reviews_orderby

* Don't enforce CSS chunks

* Add reviews count to Reviews by Product controls (https://github.com/woocommerce/woocommerce-blocks/pull/671)

* Add label to Reviews by Product controls count (https://github.com/woocommerce/woocommerce-blocks/pull/677)

* Add reviews count to Reviews by Product controls

* Add label to Reviews by Product controls count

* Add label to Reviews by Product controls count

* Update components package

* Review ordering and placeholders (https://github.com/woocommerce/woocommerce-blocks/pull/688)

* Add support for comment_count ordering and add to productcontrol

* Add a placeholder if rating count is 0

* Update assets/js/components/utils/index.js

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

* Update assets/js/blocks/reviews-by-product/block.js

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

* grammar

* Fix some linting errors and warnings (https://github.com/woocommerce/woocommerce-blocks/pull/693)

* Create Reviews by Product block placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/691)

* Create Reviews by Product block placeholder

* Reviews by Product: load and render reviews with JS (https://github.com/woocommerce/woocommerce-blocks/pull/696)

* Reviews by Product: load and render reviews with JS

* Add dangerouslySetInnerHTML explanatory comment

* Fix wrong dependency source

* Debounce getReviews call when creating the Reviews by Product block

* Rename 'Reviewer Picture' with 'Avatar' (https://github.com/woocommerce/woocommerce-blocks/pull/702)

* Lint errors

* Replace stringify query with addQueryArgs (https://github.com/woocommerce/woocommerce-blocks/pull/707)

* Add reviews endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/705)

* Prevent state updates on unmounted components (https://github.com/woocommerce/woocommerce-blocks/pull/715)

* Add Order by and Load more controls in Reviews by Product frontend (https://github.com/woocommerce/woocommerce-blocks/pull/716)

* Export IconReviewsByProduct (https://github.com/woocommerce/woocommerce-blocks/pull/721)

* Fix Reviews by Product layout in IE11 (https://github.com/woocommerce/woocommerce-blocks/pull/723)

* Set minimum to per page input field (https://github.com/woocommerce/woocommerce-blocks/pull/731)

* Hide avatars in Reviews by Products if 'show_avatars' settings is false (https://github.com/woocommerce/woocommerce-blocks/pull/730)

* Blocks API - Reviews endpoint with rating sort and category filtering (https://github.com/woocommerce/woocommerce-blocks/pull/726)

* Move file to correct location

* We are only using the reviews endpoint not revioews/id

* Remove sensistive data and make endpoint public

* Allow guest access to approved reviews

* Add support for rating sorting

* category filtering

* update arg name

* fix category query

* Reviews by Product: add placeholders when loading reviews (https://github.com/woocommerce/woocommerce-blocks/pull/732)

* Add placeholder animation (https://github.com/woocommerce/woocommerce-blocks/pull/733)

* Hook up Reviews by Product 'Order by' with endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/736)

* Hook up Reviews by Product 'Order by' with endpoint

* Use onChange instead of onBlur in select control

* Reviews by Product: Hide ratings if they are disabled in settings (https://github.com/woocommerce/woocommerce-blocks/pull/740)

* Hide ratings in Reviews by Product if disabled in settings

* Hide order by select if ratings are disabled

* Reviews by Product cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/773)

* Fix wrong method name

* Reduce the number of dependencies used in Reviews by Product (https://github.com/woocommerce/woocommerce-blocks/pull/774)

* Reduce the number of dependencies used in Reviews by Product

* Use 'withComponentId' HOC

* Remove debounce

* Fix wrong proptype

* Get rid of JS warning

* Load render from react-dom

* Add formatted_date_created item schema (https://github.com/woocommerce/woocommerce-blocks/pull/788)

* Inital block setup

* Fix import of WithComponentID

* Render the category reviews

* Add new settings to Reviews by Product block (https://github.com/woocommerce/woocommerce-blocks/pull/787)

* Add new settings to Reviews by Product block

* Remove helpText and add notices

* Use RangeControl for numeric settings

* Prevent fetching new reviews if all were already fetched

* Enable product image in reviews

* Remove unnecessary catch

* Refactor getReviews

* Move getReviews back to block's code

* Cleanup

* Fix wrong order in editor

* Hide 'Load More Reviews' if showLoadMore is false

* Move getReviews to utils.js

* Add @woocommerce/navigation to package.json

* Make notices non-dismissable

* Reviews by Product: prevent importing all HOCs and import only withComponentId (https://github.com/woocommerce/woocommerce-blocks/pull/811)

* Reviews by product: Update review styling and content (https://github.com/woocommerce/woocommerce-blocks/pull/806)

* Add new settings to Reviews by Product block

* Remove helpText and add notices

* Use RangeControl for numeric settings

* Prevent fetching new reviews if all were already fetched

* Enable product image in reviews

* Remove unnecessary catch

* Refactor getReviews

* Move getReviews back to block's code

* Cleanup

* Fix wrong order in editor

* Hide 'Load More Reviews' if showLoadMore is false

* Move getReviews to utils.js

* Add @woocommerce/navigation to package.json

* Make notices non-dismissable

* Review design/layout

* verified icons

* Read more component

* remove comment

* expanded -> isExpanded

* Localise and change default elipses

* Simplify ReadMore

* Support children rather than passing content

* remove outside

* remove list style

* Update assets/js/components/read-more/index.js

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

* Update assets/js/components/read-more/index.js

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

* merge set state

* Add missing parameter doc in renderReview (https://github.com/woocommerce/woocommerce-blocks/pull/820)

* Fix Reviews by Product order by select not honoring default setting (https://github.com/woocommerce/woocommerce-blocks/pull/818)

* Read more component - change how clamped content is shown (https://github.com/woocommerce/woocommerce-blocks/pull/821)

* Pass review as components

* Build summary from content and track both

* Toggle display after inital load

* remove unused variable

* remove componentDidUpdate

* Simplify clampLines

* Put back componentDidUpdate, but store final summary in state

* clampEnabled

* Call clampLines from componentDidMount (https://github.com/woocommerce/woocommerce-blocks/pull/826)

* truncate html tests

* implement trimHTML and pass test

* Feedback

* test short content

* Use withProduct HOC in ReviewsByProductEditor (https://github.com/woocommerce/woocommerce-blocks/pull/828)

* Use withProduct HOC

* Convert ReviewsByProductEditor to a functional component

* Add loading and error states

* Prevent loading screen appearing when changing products

* Reviews: only save wrapper element to post (https://github.com/woocommerce/woocommerce-blocks/pull/830)

* Update based on product reviews

* Cleanup after master merge

* Implement content hiding and placeholder states for reviews blocks

* Output product names and adjust css

* Review permalink

* Remove old read-more component which was moved

* showProductName is already part of passed attributes

* CSS tweaks for missing elements

* Move dir

* Move product reviews block

* Move shared uitils

* update paths

* frontend paths

* Update paths

* shared attributes

* switch to constants

* Shared review block code

* Replace constants

* Fix hidden content bug

* star alignment
2019-08-19 15:13:07 +01:00
renovate[bot] 1b12758093 Update dependency eslint to v6.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/881) 2019-08-19 14:29:28 +01:00
renovate[bot] a050dff437 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/883) 2019-08-19 14:29:06 +01:00
renovate[bot] 8540838ec8 Update dependency lint-staged to v9.2.3 (https://github.com/woocommerce/woocommerce-blocks/pull/879) 2019-08-19 13:16:36 +02:00
Albert Juhé Lluveras 2122d694e7 Add changelog script (https://github.com/woocommerce/woocommerce-blocks/pull/878)
* Add changelog script

* Adapt changelog script to WooCommerce Blocks

* Minor improvements
2019-08-19 12:46:32 +02:00
renovate[bot] f70d9021fe Update dependency webpack-cli to v3.3.7 (https://github.com/woocommerce/woocommerce-blocks/pull/880) 2019-08-19 11:28:58 +02:00
Albert Juhé Lluveras a6a131f8fd Move wc_product_block_data variables to constants file (https://github.com/woocommerce/woocommerce-blocks/pull/870) 2019-08-17 11:14:11 +02:00
renovate[bot] 05b1777b83 Update Node.js to v10.16.3 (https://github.com/woocommerce/woocommerce-blocks/pull/874) 2019-08-16 16:29:08 +01:00
Albert Juhé Lluveras fb842d2596 Update Reviews styles so it looks the same in the editor and the frontend (https://github.com/woocommerce/woocommerce-blocks/pull/871) 2019-08-16 16:12:06 +01:00
renovate[bot] 5027fa2c6f Update dependency @woocommerce/components to v3.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/875) 2019-08-16 08:50:48 +02:00
renovate[bot] 5dded757ba Update dependency webpack to v4.39.2 (https://github.com/woocommerce/woocommerce-blocks/pull/855) 2019-08-15 16:07:22 +01:00
renovate[bot] de9f8b14ea Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/872) 2019-08-15 17:05:26 +02:00
Albert Juhé Lluveras ad38f9d327 Create Reviews by Product block (https://github.com/woocommerce/woocommerce-blocks/pull/658)
* Create Reviews by Product block

* Honor Content settings

* Fix wrong className

* Load new wc-packages file

* Add reviews-by-product JS files to webpack config

* Cleanup

* Remove error messages

* Add Reviews by Product icon

* Update sort options

* Allow additional CSS classes attribute

* Refactor block styles

* Fix wrong default for reviews_orderby

* Don't enforce CSS chunks

* Add reviews count to Reviews by Product controls (https://github.com/woocommerce/woocommerce-blocks/pull/671)

* Add label to Reviews by Product controls count (https://github.com/woocommerce/woocommerce-blocks/pull/677)

* Add reviews count to Reviews by Product controls

* Add label to Reviews by Product controls count

* Add label to Reviews by Product controls count

* Update components package

* Review ordering and placeholders (https://github.com/woocommerce/woocommerce-blocks/pull/688)

* Add support for comment_count ordering and add to productcontrol

* Add a placeholder if rating count is 0

* Update assets/js/components/utils/index.js

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

* Update assets/js/blocks/reviews-by-product/block.js

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

* grammar

* Fix some linting errors and warnings (https://github.com/woocommerce/woocommerce-blocks/pull/693)

* Create Reviews by Product block placeholder (https://github.com/woocommerce/woocommerce-blocks/pull/691)

* Create Reviews by Product block placeholder

* Reviews by Product: load and render reviews with JS (https://github.com/woocommerce/woocommerce-blocks/pull/696)

* Reviews by Product: load and render reviews with JS

* Add dangerouslySetInnerHTML explanatory comment

* Fix wrong dependency source

* Debounce getReviews call when creating the Reviews by Product block

* Rename 'Reviewer Picture' with 'Avatar' (https://github.com/woocommerce/woocommerce-blocks/pull/702)

* Lint errors

* Replace stringify query with addQueryArgs (https://github.com/woocommerce/woocommerce-blocks/pull/707)

* Add reviews endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/705)

* Prevent state updates on unmounted components (https://github.com/woocommerce/woocommerce-blocks/pull/715)

* Add Order by and Load more controls in Reviews by Product frontend (https://github.com/woocommerce/woocommerce-blocks/pull/716)

* Export IconReviewsByProduct (https://github.com/woocommerce/woocommerce-blocks/pull/721)

* Fix Reviews by Product layout in IE11 (https://github.com/woocommerce/woocommerce-blocks/pull/723)

* Set minimum to per page input field (https://github.com/woocommerce/woocommerce-blocks/pull/731)

* Hide avatars in Reviews by Products if 'show_avatars' settings is false (https://github.com/woocommerce/woocommerce-blocks/pull/730)

* Blocks API - Reviews endpoint with rating sort and category filtering (https://github.com/woocommerce/woocommerce-blocks/pull/726)

* Move file to correct location

* We are only using the reviews endpoint not revioews/id

* Remove sensistive data and make endpoint public

* Allow guest access to approved reviews

* Add support for rating sorting

* category filtering

* update arg name

* fix category query

* Reviews by Product: add placeholders when loading reviews (https://github.com/woocommerce/woocommerce-blocks/pull/732)

* Add placeholder animation (https://github.com/woocommerce/woocommerce-blocks/pull/733)

* Hook up Reviews by Product 'Order by' with endpoint (https://github.com/woocommerce/woocommerce-blocks/pull/736)

* Hook up Reviews by Product 'Order by' with endpoint

* Use onChange instead of onBlur in select control

* Reviews by Product: Hide ratings if they are disabled in settings (https://github.com/woocommerce/woocommerce-blocks/pull/740)

* Hide ratings in Reviews by Product if disabled in settings

* Hide order by select if ratings are disabled

* Reviews by Product cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/773)

* Fix wrong method name

* Reduce the number of dependencies used in Reviews by Product (https://github.com/woocommerce/woocommerce-blocks/pull/774)

* Reduce the number of dependencies used in Reviews by Product

* Use 'withComponentId' HOC

* Remove debounce

* Fix wrong proptype

* Get rid of JS warning

* Load render from react-dom

* Add formatted_date_created item schema (https://github.com/woocommerce/woocommerce-blocks/pull/788)

* Fix import of WithComponentID

* Add new settings to Reviews by Product block (https://github.com/woocommerce/woocommerce-blocks/pull/787)

* Add new settings to Reviews by Product block

* Remove helpText and add notices

* Use RangeControl for numeric settings

* Prevent fetching new reviews if all were already fetched

* Enable product image in reviews

* Remove unnecessary catch

* Refactor getReviews

* Move getReviews back to block's code

* Cleanup

* Fix wrong order in editor

* Hide 'Load More Reviews' if showLoadMore is false

* Move getReviews to utils.js

* Add @woocommerce/navigation to package.json

* Make notices non-dismissable

* Reviews by Product: prevent importing all HOCs and import only withComponentId (https://github.com/woocommerce/woocommerce-blocks/pull/811)

* Reviews by product: Update review styling and content (https://github.com/woocommerce/woocommerce-blocks/pull/806)

* Add new settings to Reviews by Product block

* Remove helpText and add notices

* Use RangeControl for numeric settings

* Prevent fetching new reviews if all were already fetched

* Enable product image in reviews

* Remove unnecessary catch

* Refactor getReviews

* Move getReviews back to block's code

* Cleanup

* Fix wrong order in editor

* Hide 'Load More Reviews' if showLoadMore is false

* Move getReviews to utils.js

* Add @woocommerce/navigation to package.json

* Make notices non-dismissable

* Review design/layout

* verified icons

* Read more component

* remove comment

* expanded -> isExpanded

* Localise and change default elipses

* Simplify ReadMore

* Support children rather than passing content

* remove outside

* remove list style

* Update assets/js/components/read-more/index.js

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

* Update assets/js/components/read-more/index.js

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

* merge set state

* Add missing parameter doc in renderReview (https://github.com/woocommerce/woocommerce-blocks/pull/820)

* Fix Reviews by Product order by select not honoring default setting (https://github.com/woocommerce/woocommerce-blocks/pull/818)

* Read more component - change how clamped content is shown (https://github.com/woocommerce/woocommerce-blocks/pull/821)

* Pass review as components

* Build summary from content and track both

* Toggle display after inital load

* remove unused variable

* remove componentDidUpdate

* Simplify clampLines

* Put back componentDidUpdate, but store final summary in state

* clampEnabled

* Call clampLines from componentDidMount (https://github.com/woocommerce/woocommerce-blocks/pull/826)

* truncate html tests

* implement trimHTML and pass test

* Feedback

* test short content

* Use withProduct HOC in ReviewsByProductEditor (https://github.com/woocommerce/woocommerce-blocks/pull/828)

* Use withProduct HOC

* Convert ReviewsByProductEditor to a functional component

* Add loading and error states

* Prevent loading screen appearing when changing products

* Reviews: only save wrapper element to post (https://github.com/woocommerce/woocommerce-blocks/pull/830)

* Fix bundlesize config not picking frontend files (https://github.com/woocommerce/woocommerce-blocks/pull/840)

* Reviews by Product: split 'block.js' into smaller chunks (https://github.com/woocommerce/woocommerce-blocks/pull/841)

* Split 'block.js' into smaller chunks

* Move frontend blocks to their specific folder

* Order imports

* Typo

* Add frontend components proptypes

* Fix indentation

* Call 'this.getDefaultArgs' directly inside 'getReviews'

* Move access to wc_product_block_data to the top of the file

* Rename 'frontend' folder to 'base'

* Rename base components and move styles to their folder

* Fix Reviews by Product using rating count instead of review count (https://github.com/woocommerce/woocommerce-blocks/pull/860)

* Improve Reviews by Product accessibility (https://github.com/woocommerce/woocommerce-blocks/pull/861)

* Improve Reviews by Product accessibility

* Make 'onClick' prop not required in <LoadMoreButton>

* Wrap Reviews by Product editor block with <Disabled>

* Reviews: fix reviews without rating not appearing when sorting by rating (https://github.com/woocommerce/woocommerce-blocks/pull/863)
2019-08-15 16:55:57 +02:00
Mike Jolley d9c2b4d4c6 Align stars left (https://github.com/woocommerce/woocommerce-blocks/pull/866) 2019-08-15 13:20:06 +01:00
Mike Jolley aa65f19a46 Remove screen-reader-text css rules (https://github.com/woocommerce/woocommerce-blocks/pull/849) 2019-08-15 13:19:09 +01:00
Albert Juhé Lluveras a7221fd5ce Add README note for PHP deprecation notices 2019-08-15 13:03:41 +02:00
Mike Jolley 1ed14cdc01 Introduce withCategory HOC for featured category block (https://github.com/woocommerce/woocommerce-blocks/pull/846)
* Introduce withCategory hoc

* Refactor featured category to use new hoc

* Update docblocks
2019-08-15 10:36:24 +01:00
Albert Juhé Lluveras 6ad05724c8 Add description to blocks added in last releases (https://github.com/woocommerce/woocommerce-blocks/pull/869) 2019-08-15 11:16:32 +02:00
David Stone a4de62ba83 Use correct parameter order for implode. Solves deprecation notice in PHP 7.4 (https://github.com/woocommerce/woocommerce-blocks/pull/857) 2019-08-15 11:16:04 +02:00
renovate[bot] 2078e81bc8 Update dependency rimraf to v2.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/867) 2019-08-15 11:11:18 +02:00
Darren Ethier 64b476303a remove unnecessary config (https://github.com/woocommerce/woocommerce-blocks/pull/862) 2019-08-14 07:23:09 -04:00
renovate[bot] 7b07bb015a Update dependency rimraf to v2.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/858) 2019-08-14 11:39:38 +02:00
renovate[bot] a618bb7dd0 Pin dependency babel-plugin-transform-react-remove-prop-types to 0.4.24 (https://github.com/woocommerce/woocommerce-blocks/pull/851) 2019-08-13 15:44:07 +01:00
Mike Jolley 5f5797dc3d Add global data helpers (https://github.com/woocommerce/woocommerce-blocks/pull/848)
* Extract global settings to assets/js/data

* add alias

* Fix alias

* Rename to settings
2019-08-13 15:43:48 +01:00
Darren Ethier 69890535c9 Add babel-plugin-transform-remove-prop-types Babel plugin (https://github.com/woocommerce/woocommerce-blocks/pull/839)
* install transform-react-remove-prop-types babel plugin

* use `@wordpress/babel-preset-default` not `@wordpress/default` (name change)

* add configuration for new plugin (removing prop-types on production builds)
2019-08-13 09:51:44 -04:00
renovate[bot] e36d014584 Update dependency core-js to v3.2.1 (https://github.com/woocommerce/woocommerce-blocks/pull/838) 2019-08-13 11:40:31 +01:00
renovate[bot] 0229b166a0 Update dependency composer/installers to v1.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/842) 2019-08-13 11:40:01 +01:00
renovate[bot] 45f2d48f56 Update dependency eslint-plugin-jest to v22.15.1 (https://github.com/woocommerce/woocommerce-blocks/pull/844) 2019-08-13 11:39:49 +01:00
Claudio Sanches dddadb895f Fix duplicated translatable string (https://github.com/woocommerce/woocommerce-blocks/pull/843)
* Fix duplicated translatable string

* Fixed more duplicated strings in descriptions

* Merge similar strings
2019-08-13 11:29:00 +01:00
Mike Jolley 84a464fc62 Allow hidden products in handpicked products block (https://github.com/woocommerce/woocommerce-blocks/pull/803)
* Allow hidden products in handpicked block

* Simplify set_visibility_query_args
2019-08-12 12:54:51 +01:00
HackMD a4f82d6a90 Updated deploy instructions 2019-08-12 11:48:58 +00:00
Albert Juhé Lluveras a36608d9dc Make react-test-renderer name consistent (https://github.com/woocommerce/woocommerce-blocks/pull/836) 2019-08-12 13:41:18 +02:00
Mike Jolley de97e18df7 Update readme and deploy script from release/2.3 2019-08-12 12:08:30 +01:00
Albert Juhé Lluveras e7180dfc7b Product Categories: prevent importing all HOCs and import only withComponentId (https://github.com/woocommerce/woocommerce-blocks/pull/834) 2019-08-12 10:44:51 +01:00
renovate[bot] c3008d268f Update dependency core-js to v3.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/824) 2019-08-12 11:05:29 +02:00
renovate[bot] 2cfd59fa38 Pin dependency bundlesize to 0.18.0 (https://github.com/woocommerce/woocommerce-blocks/pull/831) 2019-08-12 11:05:20 +02:00
renovate[bot] da52d84518 Update dependency sass-loader to v7.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/827) 2019-08-12 11:05:06 +02:00
Darren Ethier 222bde2bba add configuration for css bundlesize (https://github.com/woocommerce/woocommerce-blocks/pull/832) 2019-08-09 14:43:15 -04:00
Darren Ethier e5bf616dca Add bundlesize package and tweak travis config (https://github.com/woocommerce/woocommerce-blocks/pull/822)
- adds bundlesize package and travis config to run it on pulls (reports size as a check on pulls)
- reconfigure travis configuration so that jobs are split by task for easier review/reporting
- Fix failing phpunit tests exposed as a result of the travis reconfiguration
- Fix legit fail exposed by failing phpunit test in products REST endpoint (permissions related)
- Don't abort plugin initialization when detecting no build asset file but still throw notice (necessary to ensure php tests run in travis because we don't build js/css assets unnecessarily for those tests)
2019-08-09 14:08:31 -04:00
Albert Juhé Lluveras e5f73b05e8 Add eslint JSDoc checks (https://github.com/woocommerce/woocommerce-blocks/pull/819)
* Add eslint JSDoc checks

* Use @wordpress/eslint-plugin for ESLint config

* Rename 'augments' with 'extends'

* Remove '@wordpress/eslint-plugin' from package.json
2019-08-09 18:18:46 +02:00
Mike Jolley 9a23b81204 Reduce CSS specificity (https://github.com/woocommerce/woocommerce-blocks/pull/796)
* Reduce CSS specificity

* 2019 fixes
2019-08-09 15:07:05 +01:00
Albert Juhé Lluveras 708fb72288 Disable HTML editing on Featured Category (https://github.com/woocommerce/woocommerce-blocks/pull/816) 2019-08-08 17:09:41 +02:00
Albert Juhé Lluveras 6e91656677 Featured Product: hide background opacity control if there is no image (https://github.com/woocommerce/woocommerce-blocks/pull/813)
* Featured Product: hide background opacity control if there is no image

* Add explanation for FocalPointPicker check
2019-08-08 17:09:32 +02:00
Albert Juhé Lluveras 6f88bb85a2 Add tests to utils/products.js (https://github.com/woocommerce/woocommerce-blocks/pull/817)
* Add tests to utils/products.js

* Make getImageSrcFromProduct return an empty string instead of 0 when there are no images
2019-08-08 14:48:34 +01:00
renovate[bot] 981b5aea63 Update wordpress monorepo (https://github.com/woocommerce/woocommerce-blocks/pull/802) 2019-08-08 13:07:34 +01:00
renovate[bot] c99043e897 Update dependency style-loader to v1 (https://github.com/woocommerce/woocommerce-blocks/pull/805) 2019-08-08 13:04:33 +01:00
renovate[bot] 65e28ed35d Update dependency eslint-plugin-jest to v22.15.0 (https://github.com/woocommerce/woocommerce-blocks/pull/815) 2019-08-08 13:00:33 +01:00
renovate[bot] f82c3ecc29 Update dependency css-loader to v3.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/807) 2019-08-08 13:00:03 +01:00
renovate[bot] 9ff3332b24 Update npm to v6.10.3 (https://github.com/woocommerce/woocommerce-blocks/pull/809) 2019-08-08 12:59:29 +01:00
renovate[bot] 0d739215d5 Update Node.js to v10.16.2 (https://github.com/woocommerce/woocommerce-blocks/pull/810) 2019-08-08 12:47:34 +01:00
Albert Juhé Lluveras 3097bb0901 Create a constants.js file with the NAMESPACE value (https://github.com/woocommerce/woocommerce-blocks/pull/799)
* Create a constants.js file with the  NAMESPACE value

* Created 'ENDPOINTS' constant instead of 'NAMESPACE'

* Use NAMESPACE in constants.js
2019-08-07 16:47:01 +02:00
Darren Ethier 2d5b06f07a Introduce withSearchedProducts higher order component and refactor ProductsControl Component (https://github.com/woocommerce/woocommerce-blocks/pull/791)
* add new withSearchedProducts hoc

includes tests

* convert to functional component and wrap with new hoc

* remove dependency between tests

* Fix typo with PropTypes bool

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

* remove unnecessary specific import

* fix bug introduced on refactor for selected prop recalc

* fix tests that were testing the wrong expectation

- also improved mocks a bit so they are a bit more realistic for the purpose of the test coverage.

* remove unnecessary Fragment

* tweak propType definitions and remove defaults

- this keeps argument expectations in sync with wrapped component and reduces chance of unexpected behaviour if `SearchListControl` logic changes.

* remove lodash.find dependency.
2019-08-06 11:34:13 -04:00
Mike Jolley 918f822128 Disable HTML editing on dynamic blocks (https://github.com/woocommerce/woocommerce-blocks/pull/801)
* Disable HTML editing on dynamic blocks

* Tabindex case
2019-08-06 15:10:01 +01:00
Mike Jolley 6a6d280eb0 Add product search block (https://github.com/woocommerce/woocommerce-blocks/pull/697)
* basic scaffold

* Progress

* Fix saving

* Move data to form

* Update assets/js/blocks/product-search/editor.scss

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

* Update assets/js/blocks/product-search/block.js

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

* hex case

* Use a span element

* Move render method

* CSS

* Update buttons

* Fix navigation buttons

* remove webkit appearance styles for buttons

* Swap rich to plain text component

* Improved attribute handling

* Update assets/js/blocks/product-search/block.js

Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com>
2019-08-05 11:25:57 +01:00
renovate[bot] 5efef42495 Update dependency webpack to v4.39.1 (https://github.com/woocommerce/woocommerce-blocks/pull/798) 2019-08-05 10:40:45 +01:00
Albert Juhé Lluveras 8a187db5d9 Move withComponentId to hocs directory (https://github.com/woocommerce/woocommerce-blocks/pull/797) 2019-08-05 10:37:16 +01:00
Albert Juhé Lluveras 2504bffdfa Create `withProduct` HOC (https://github.com/woocommerce/woocommerce-blocks/pull/779)
* Reset 'loaded' state in Featured Product and Category blocks

* Minor code improvements

* Remove state from ApiErrorPlaceholder

* Move getProduct to a HOC

* Undo changes in Featured Category

* Update proptypes

* Move error messages to <ApiErrorPlaceholder>

* Reorder props

* Move lifecycle methods to HOC

* Make <FeaturedProduct> component presentational

* Move withProduct to js/hocs

* Create NAMESPACE constant in utils

* Create getProduct util function

* Set 'error' and 'product' state to null instead of 'false' when they have no value

* Prevent getImageSrcFromProduct and getImageIdFromProduct returning an error when 'product' is not an object

* Add HOC tests

* Use 'toBe' and 'toBeNull' jest expect methods instead of 'toEqual' when possible

* Export HOCs from index

* Move mock implementation to beforeEach
2019-08-02 13:56:53 +02:00