Commit Graph

255 Commits

Author SHA1 Message Date
Kelly Dwan cba3d402b6 Bump the version, update the changelog (https://github.com/woocommerce/woocommerce-blocks/pull/478) 2019-03-06 18:27:37 -05:00
Kelly Dwan 1712f8dbcf Remove blocks API endpoints (https://github.com/woocommerce/woocommerce-blocks/pull/477)
* Remove blocks API endpoints

* Remove API tests
2019-03-06 16:06:02 -05:00
Kelly Dwan 7f78a79698 Set up plugin to be published on npm (https://github.com/woocommerce/woocommerce-blocks/pull/456)
* Move block rendering class into assets

* Update package.json for npm

* Move script registration into publish-able file

* Fix phpcs issue

* Add note about source of file

* Add wcSettings back in

* Rename files to match class name

* Add languages & includes back, so we can use this for publishing zip files

* Update documentation, versions, and add hook for wc components settings

* Update wcSettings output to use fitler

* Update version to `alpha`

* Make block library class into a singleton
2019-03-04 09:30:06 -08:00
Kevin Killingsworth 1288fe1c75 Remove legacy block (https://github.com/woocommerce/woocommerce-blocks/pull/457)
* Remove legacy block

This removes the legacy products block and sets the version to
v2.0.0-dev

* Remove legacy product block test

* Update plugin header version
2019-02-26 14:16:21 -06:00
Kelly Dwan 930602bc8d Remove shortcode tweaks (https://github.com/woocommerce/woocommerce-blocks/pull/449)
* Remove shortcode filter

WC core handles category & attribute IDs as of 3.5

* Bump min requirements to 3.5+
2019-02-22 13:16:46 -05:00
Kelly Dwan 5af66f5de5 Remove the edit-blocks dependency from front end styles (https://github.com/woocommerce/woocommerce-blocks/pull/446) 2019-02-21 14:01:04 -05:00
Kelly Dwan b14a37f7b5 Update CSS build process (https://github.com/woocommerce/woocommerce-blocks/pull/439)
* Split apart editor and frontend styles

* Remove the empty JS files after each build

* Pull out editor and style CSS files into two single, separate files
Rename products-grid CSS, add a “global” front end stylesheet

* Update style registration to use these two new global CSS files

* Merge style JS files into vendors before deleting them

* Remove empty file to fix lint error

* Check for file before reading from it

When watching, not all the file stubs are created, so this errors out.
2019-02-19 16:09:36 -05:00
Kelly Dwan 37fca65ad6 Bump stable tag & plugin dev version (https://github.com/woocommerce/woocommerce-blocks/pull/420) 2019-02-13 15:18:21 -05:00
Kelly Dwan 33cb699ef1 Update changelog, bump version to 1.4.0-rc (https://github.com/woocommerce/woocommerce-blocks/pull/413)
* Update changelog, bump version to 1.4.0-rc

* Update languages to language packs at 100% for v1.3.1

* Update readme with button PR

* Add note about featured product edit mode

* Update version number

* Add a missing bug fix to the changelog
2019-02-13 10:50:40 -05:00
Kelly Dwan 6bf837ff7a Featured Product: Allow to resize the block height (https://github.com/woocommerce/woocommerce-blocks/pull/397)
* Add ResizeableBox wrapper to component to adjust height

* Use the fixed height on the front end display of the block

* Fix display of resize handle

* Allow the default & min featured product heights to be customized by setting a new theme support keyword, `featured_block`.

* Use `min-height` on the front end display, so content is not clipped on smaller screens

* Add a wrapper div to the content, to prevent it from breaking out of the block display
2019-02-05 15:49:24 -05:00
Kevin Killingsworth dc2b4485f4 Add placeholder image for product preview (https://github.com/woocommerce/woocommerce-blocks/pull/382)
* Add placeholder image for product preview

This adds the designated placeholder image url from settings into the
wcSettings global for the blocks to use. Then uses the placeholder url
when a product doesn't have any images.

* Updated based on review notes

Using `$block_settings` instead of `$settings`
Using '' alt tag
Updated snapshot

* Add the placeholder global to test that it passes through to the preview
2019-02-01 10:45:53 -05:00
Kelly Dwan ac96484f7a New block: Products by Attribute (https://github.com/woocommerce/woocommerce-blocks/pull/378)
* Add Products by Attribute block

* Remove attributes property from sharedAttributes

* Add operator control to Products Attribute selector

* Fix default operator queries

* Add the initial “edit mode” placeholder screen

* Style attribute selector better

* Add ‘edit mode’ toggle to toolbar

* Add orderby control
2019-01-30 16:27:56 -05:00
Kelly Dwan d0d2bb4f3b Release 1.3.1 (https://github.com/woocommerce/woocommerce-blocks/pull/346)
* Bump the version number

* Add the changelog to the readme

* Add new strings to the PHP file

* Update stable tag
2019-01-17 15:04:22 -05:00
Kelly Dwan eee1359cc0 Fix translations, bundle complete JS translation files (https://github.com/woocommerce/woocommerce-blocks/pull/339)
* Update the translation file with strings in new JS files

* Automatically build the translation files when building the JS files

* Reorganize script+style registration so that all files for each block are grouped together

* Bundle the finished translations into the plugin

* Fix untranslated strings

* Remove the edit-blocks dependency from featured product CSS file (https://github.com/woocommerce/woocommerce-blocks/pull/342)
2019-01-17 11:58:53 -05:00
Kelly Dwan afae8db424 Add changelog & version bump to 1.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/323)
* Add changelog & version bump to 1.3.0-RC

* Update changelog phrasing

* Update name/version in package-lock

* Update readme

* Bump version to 1.3.0
2019-01-15 16:43:18 -05:00
Jeff Stieler 71a4c81dd1 Use the wcSettings object from wc-admin if present and update it to more closely match the latest from wc-admin. 2019-01-15 11:21:16 -07:00
Kelly Dwan 71b448f8b6 Build: Split out vendor files into separate, shared JS & CSS files (https://github.com/woocommerce/woocommerce-blocks/pull/314)
* Add splitchunks to webpack config to combine node_modules imports into a vendors script

* Move legacy CSS into legacy folder

* Get components css without needing to use relative path

* Add vendors css file
2019-01-14 15:33:17 -05:00
Kelly Dwan 0d720183aa Add "Featured Product" block preview (https://github.com/woocommerce/woocommerce-blocks/pull/308)
* Add classnames package

* Add background image & initial styles

* Only show inspector controls when not in edit-mode

* Add overlay color + opacity controls

* Add content alignment

* Fix display of content

* Add content toggles

* Update styles from feedback

* Display the "Featured Product" block on the frontend (https://github.com/woocommerce/woocommerce-blocks/pull/310)

* Add render_callback to dynamically render product

* Set a size for the product description

* Remove fallback placeholder image

* Reset the background color for the placeholder component

Previously this was overriding storefront's custom background color CSS

* Update nested conditional

* Remove unnecessary style

* "Featured Product" Block: Add link to the product to the block (https://github.com/woocommerce/woocommerce-blocks/pull/311)

* Featured Product Block: Add link to the product to the block

* Add a better link label for screen reader users

* Match core button styles, fix alignment of button-link
2019-01-13 12:22:15 -05:00
Kelly Dwan 64e46b8f8e Add ProductControl, update SearchListControl to pick a "single item" (https://github.com/woocommerce/woocommerce-blocks/pull/304)
* Add a prop to turn on “single choice” mode

* Create new ProductControl to select a single product

* Remove align from shared attributes

This is given to us by default for using supports.align

* Add Featured Product block

* Fix spelling mistake & copy-paste issue

* Fix lint warning

* Add featured product script to build process, register block in PHP
2019-01-10 14:01:49 -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
Kelly Dwan 134976e5d5 Fix "products by all categories" not finding products in parent-categories (https://github.com/woocommerce/woocommerce-blocks/pull/272)
* Fix issue with product categories when one category is a parent

* Add tests for product by categories intersections
2018-12-20 10:24:11 -05:00
renovate[bot] d3c8998430 Update dependency @woocommerce/components to v1.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/267)
* Update dependency @woocommerce/components to v1.3.0

* Set up new globals used by @woocommerce/components
2018-12-19 10:55:16 -05:00
David Levin 5af019bcd7 New Block: Add "Newest Products" Block (https://github.com/woocommerce/woocommerce-blocks/pull/255)
* add newest products block

* update class name in index.js and product-new.js

* Add a new WooCommerce block category and include all blocks within.

* Fix shortcode product order

* Show block category on all post types
2018-12-18 14:45:49 -05:00
David Levin 1bf9ab1fb5 resolve conflicts 2018-12-14 18:08:58 -08:00
David Levin d30761ba2f Add top rated products block 2018-12-14 11:45:19 -08:00
Kelly Dwan cdd520bbeb Fix incorrectly escaped HTML in build notice (https://github.com/woocommerce/woocommerce-blocks/pull/235) 2018-12-14 09:57:11 -05:00
Kelly Dwan 43675515af Block: Add new "Best Selling Products" block (https://github.com/woocommerce/woocommerce-blocks/pull/221)
* Move from a JS file per block registration to one file registering all blocks

This will let webpack combine shared libraries, like gridicons

* Move global block settings to the “before all scripts” section

These shouldn’t be tied to a specific block file, since they’re used across all blocks

* Register both block types

We can also remove the scripts, since we enqueue these below

* Update getShortcode & getQuery to handle different block types

* Pass block type name to getQuery

* Update shared attributes - edit_mode is not a universal option, but categories will be

Categories is shared, but orderby is not

* Add “Best Selling Products” block

* Add a shared class name for product grid blocks

* Fix failing tests
2018-12-13 12:19:55 -05:00
Kelly Dwan c6d071cebf Fix PHP CodeSniffer issues (https://github.com/woocommerce/woocommerce-blocks/pull/215) 2018-12-11 11:14:02 -06:00
Kelly Dwan ba83d67b32 Bump version (https://github.com/woocommerce/woocommerce-blocks/pull/211) 2018-12-04 19:41:40 -05:00
Kelly Dwan cd01cfe3bd Release 1.2.0 (https://github.com/woocommerce/woocommerce-blocks/pull/206)
* Update display name in wp-admin

* Update minimum WP in readme.txt

* Bump version in wp-admin

* Disable “dev mode” for release

* Updating plugin name

* Update version constant

* Don’t commit disabling dev mode
2018-12-04 15:54:14 -05:00
Kelly Dwan 723c8eedab Update textdomain to plugin slug (https://github.com/woocommerce/woocommerce-blocks/pull/199)
* Update textdomain in JS files

* Update textdomain in PHP files

* Add babel plugin to create pot & php files from JS

* Update textdomain in plugin header

* Update translations after rebase
2018-12-04 09:51:21 -05:00
Claudio Sanches 81605bae30 New custom endpoints (https://github.com/woocommerce/woocommerce-blocks/pull/162)
* Included PHPCS and git hooks

* Fixed coding standards

* New Products endpoint

* Fixed product controller schema

* Improved products controller schema and response

* New product categories controller

* Updated REST API base to match WooCommerce authentication

* Fixed products/categories endpoint

* Better docblock

* Product attributes controller

* Product attribute terms controller

* Update REST API urls

* Reverted PHPCS changes

* Check permission only once while fetching posts

* Included raw price

* Included sku to products endpoint response

* Fixed endpoints in unit test

* Fixed routes in unit tests

* Check and use subscriber, contributor and author rules in unit tests
2018-11-30 14:12:56 -05:00
Kelly Dwan eb21a5ec9f Update dependencies, add all packages in use (https://github.com/woocommerce/woocommerce-blocks/pull/159) 2018-11-27 12:13:16 -05:00
Kelly Dwan 6a50ebde8b Adds continuous integration testing with travis (https://github.com/woocommerce/woocommerce-blocks/pull/156)
* Add travis to run JS & CSS linting, JS tests, and PHPUnit tests

* Move API initiation out of the gutenberg/files check

So that php tests run without having to build the JS files

* Add very basic product endpoint tests

* Fix stylelint issues in CSS

* Remove e2e setup, replace with dependency setup

* Add missing install step

* Remove cache for now

* Add specific `har-validator` dependency because v 5.1.2 has disappeared

* Only run npm install for the JS test job

* Check for installed plugins

* Update install location

* Fix typo in plugin name

* Check the BRANCH variable, rather than TRAVIS_PULL_REQUEST_BRANCH, which is only set on PR runs

* Remove debug command

* A change to trigger CI

* Set the expected node & npm versions

* Remove copy-pasted command, does not apply
2018-11-27 12:12:48 -05:00
Kelly Dwan aec2d567e2 Check that the translation function exists before using it (https://github.com/woocommerce/woocommerce-blocks/pull/150) 2018-11-21 16:10:16 -05:00
Kelly Dwan a4205a956e Update “tested up to” versions for WC and WP (https://github.com/woocommerce/woocommerce-blocks/pull/141) 2018-11-21 10:56:05 -05:00
Kelly Dwan 2231c829d1 Add a basic product category block (https://github.com/woocommerce/woocommerce-blocks/pull/136)
* Add a second block, for “products by category”

* Fetch products in the given category, when attributes change

* Display the resulting products

* Style the product preview

* Create utils folder, move shared attributes

* Move getQuery to shared utils folder

* Create a helper function to get the shortcode string

* Support the menu_order setting

* Support center/wide/full alignment

* Update PropTypes

* Add tests

* Add text domain to translation functions
2018-11-19 11:33:17 -05:00
Kelly Dwan 140f4e5ed6 Update build process (https://github.com/woocommerce/woocommerce-blocks/pull/122)
* Add api-fetch dependency

* Remove compiled files from the repo

* Update build process, remove grunt

* Import CSS into block, as we now extract CSS via webpack to build

* Update enqueue scripts to reflect new build locations

* Detect if build files don’t exist, and instruct users to build project

* Update readme with build instructions

* Clarify where to run npm commands in info notice

* Only enqueue our JS files if we know they exist

* Clarify version compatibility between WC and WP 5.0
2018-11-13 14:12:32 -05:00
Kelly Dwan 27ad957eb3 Add all dependencies used in the product block to the script registration (https://github.com/woocommerce/woocommerce-blocks/pull/121)
Fixed woocommerce/woocommerce-blocks#120
2018-11-13 10:48:13 -05:00
claudiulodro 905ced2193 Update version for release 2018-09-07 08:51:45 -07:00
claudiulodro 66aa3b52a9 Merge remote-tracking branch 'origin/master' into HEAD 2018-08-22 11:00:00 -07:00
claudiulodro f411c4453f Update info for release 2018-08-22 10:59:02 -07:00
claudiulodro ce6938548e Don't initialize scripts if wc is not active 2018-08-22 10:28:39 -07:00
claudiulodro 03ade781d3 Update WC requires version 2018-06-06 09:08:17 -07:00
claudiulodro 6e09ffb392 Update info for 1.1 release 2018-06-06 08:59:45 -07:00
claudiulodro 59cba2a952 Include custom API endpoint for required orderby features 2018-06-01 10:22:58 -07:00
claudiulodro 0572330b3e Only enqueue gberg scripts/styles on backend editor 2018-06-01 09:35:46 -07:00
claudiulodro 31d489a4ba Readme 2018-04-20 10:17:55 -07:00
claudiulodro 188eaba8bb Compartmentalize plugin 2018-04-19 09:53:21 -07:00
claudiulodro d5dbda0d9f Use theme default number of rows 2018-04-03 10:26:56 -07:00
claudiulodro 52c6b37abf Format prices in preview 2018-03-09 11:45:53 -08:00
claudiulodro 397937edd0 Use theme column settings and dont enable top edit buttons if no display selected 2018-03-09 11:04:01 -08:00
claudiulodro caf0a09a79 Fade out products when selected 2018-02-22 10:48:34 -08:00
claudiulodro 149a546290 Update menu functionality to match latest designs 2018-02-15 09:42:24 -08:00
claudiulodro 6533d2f166 Set up and move things over for a feature plugin 2018-02-13 11:03:53 -08:00