Commit Graph

12 Commits

Author SHA1 Message Date
Mike Jolley 25544f3ce4 Remove deprecated shortcode save handling from SSR Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4010) 2021-04-08 13:42:03 +01:00
Seghir Nadir bfb2f33bfd add new icons and remove old ones (https://github.com/woocommerce/woocommerce-blocks/pull/1644)
* add new icons and remove old ones

* add docs

* add notes and remove gridicons

* update to folderStarred

* typos

* reorder imports

* update prop name to srcElement

* validate element

* fix bad import

* lowecase folderStarred

* add propTypes
2020-01-31 19:20:33 +01:00
Mike Jolley 5a1bbbefb9 Update NPM dependencies and script dependency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1337)
* Update NPM packages

* Switch JSON dependencies to new PHP files

* include->require

* include->require

* Remove from package and run audit fix

* Update wp-prettier

* Use version from asset file

* Fix eslint issues and test failures

* Update OriginalComponent docblocks

* Props are objects, not arrays

* Array to Object

* fix tests throwing unhandled rejection errors in node.

These tests were all testing Promise.rejects but then not properly catching the reject in the assertions.

* exclude rule for no short array syntax allowed

This is a WordPress core standard that we choose to ignore because it’s silly in our context to follow that rule (and we’re being consistent with WooCommerce Admin).
2019-12-10 12:17:46 -05:00
Mike Jolley bf370806ed Add grid block previews using an SVG image (https://github.com/woocommerce/woocommerce-blocks/pull/1118)
* Implement preview for on-sale products

* Previews for other grid blocks

* Shared previews

* Fix SVG

* add svg as asset

* Add image via path

* cleanup
2019-11-15 15:16:18 +00:00
Albert Juhé Lluveras 6ab7834f59 Install prettier and reformat files (https://github.com/woocommerce/woocommerce-blocks/pull/945)
* Install prettier

* Reformat all files

* Add prettier to precommit hook

* Update prettier settings to match Gutenberg code standards

* Reformat files with new settings

* Improve legibility in some line breaks
2019-09-05 17:09:31 +02: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
Kelly Dwan e0ff109781 Add dynamic rendering + SSR to the Top Rated Products block (https://github.com/woocommerce/woocommerce-blocks/pull/600) 2019-05-28 13:06:12 +01:00
Mike Jolley 1fb893e3f4 Add Woo icon and branding to block categories (https://github.com/woocommerce/woocommerce-blocks/pull/581)
* remove php insertion of block category

* Add an SVG icon for the woo logo

* Add block-category.js to import into blocks

This creates the category icon complete with a Woo SVG icon

* Import block-category to all blocks that use it

* Style woocommerce blocks in woo purple

* Lint error

* fillRule case

* Update propTypes

* Use foreground prop instead of css

* Convert Woo Logo to ICON type component

* Add shared blocks.js to house the category code

* Calculate width from height
2019-05-28 11:18:07 +01:00
Kelly Dwan 9fa9257430 Blocks: Add rating to grid previews (https://github.com/woocommerce/woocommerce-blocks/pull/472)
* Add rating stars to the product preview

* Add rating to the visibility controls
2019-03-06 13:50:32 -05:00
Kevin Killingsworth ffc19e26ec Add transforms for shared attributes. (https://github.com/woocommerce/woocommerce-blocks/pull/448)
* Add transforms for shared attributes.

This adds transforms for the 5 blocks which share attributes:

- woocommerce/product-best-sellers
- woocommerce/product-category
- woocommerce/product-new
- woocommerce/product-on-sale
- woocommerce/product-top-rated

* Use createBlock directly and rowColumnBlockTypes

This adds rowColumnBlockTypes as an array of woocommerce/* block types
that use row and column layouts

* Move block types into utils, and use without

This uses lodash instead of without instead of difference
It also moves the block types from an index into the shared-attributes
in utils.
2019-02-25 23:31:25 -06:00
Kelly Dwan 17ff1aa886 Blocks: Add new content controls to grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/440)
* Component: GridContentControl for controlling visibility of product content

* Add the content control to all grid blocks

* Use CSS to hide the content on the front end

* Fix missing translation functions
2019-02-21 14:00:47 -05:00
Kelly Dwan 6a1c1490cb Split blocks into separate JS files (https://github.com/woocommerce/woocommerce-blocks/pull/305)
This lets us use the functionality of `register_block_type` to automatically enqueue the scripts and styles used by blocks in the editor, and eventually, styles on the frontend as well. Also adds cssnano to minify our CSS.
2019-01-10 13:16:37 -05:00