Commit Graph

983 Commits

Author SHA1 Message Date
Darren Ethier 1cd70ae760 Configure travis to only run on master or release branches (does not affect pull builds) 2019-12-11 10:04:25 -05:00
Darren Ethier cd25b1be07 Install bundlecop and configure in package.json size-check script (https://github.com/woocommerce/woocommerce-blocks/pull/1364)
* install bundlecop and configure in package.json size-check script

* update js doc to test bundlecop

* uninstall bundlesize package
2019-12-11 09:58:49 -05:00
Darren Ethier d153ecad2e Fix increase in some bundle sizes (https://github.com/woocommerce/woocommerce-blocks/pull/1363)
* import svg directly to avoid pulling all dependencies

* revert unnecessary change with sideEffects figured out.

* add sideEffects to package json.

This results in a ~60% reduction in bundle sizes!
2019-12-11 07:29:09 -05:00
Darren Ethier 0c09e791ad Fix asset namespacing for cart and checkout blocks - round three! (https://github.com/woocommerce/woocommerce-blocks/pull/1357)
* tweak registration of block script so that handle can be customized

* implement new custom handles for checkout and cart blocks
2019-12-11 10:18:00 +01:00
renovate[bot] 9c17dff473 Update dependency @babel/core to v7.7.5 (https://github.com/woocommerce/woocommerce-blocks/pull/1359) 2019-12-11 10:11:17 +01:00
renovate[bot] 5f6507d6ba Update dependency core-js to v3.4.8 (https://github.com/woocommerce/woocommerce-blocks/pull/1360) 2019-12-11 10:11:12 +01:00
renovate[bot] 8e310e3d6e Update dependency css-loader to v3.3.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1361) 2019-12-11 10:10:56 +01:00
renovate[bot] 0fec59027d Pin dependency @wordpress/scripts to 6.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1358) 2019-12-11 10:09:53 +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 21eb9aac8c Added instructions for handling release branches (https://github.com/woocommerce/woocommerce-blocks/pull/1352)
* Added instructions for handling release branches

* Update test about version bumps

* master text

* Upper case Package.php
2019-12-10 16:20:41 +00:00
Albert Juhé Lluveras bf260b0838 Add Empty Cart View with inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1350)
* Add Empty Cart View with inner blocks

* Add logic so empty cart is always saved and only displayed when cart is empty

* Make cart hidden until the correct display is loaded

* Add missing propTypes

* Remove is-loading class

* Import InnerBlocks from @wordpress/block-editor

* Add explanation for always rendering EmptyCart in the editor
2019-12-10 16:41:57 +01:00
Mike Jolley a753cbb25c Store API: Add shipping rate api (https://github.com/woocommerce/woocommerce-blocks/pull/1344)
* Add basic controllers

* Schema

* Collections

* Updated schema

* Remove package ID

* Destination handling

* Destination validation

* Rename method for extra clarity

* Tests

* RestContoller type

* typos

* Fix object/array definitions

* Fix shipping-rate definition

* Fix tests

* Add docs

* Tweak description
2019-12-10 13:54:18 +00:00
Albert Juhé Lluveras c346870842 Update changelog with 2.5.3 release (https://github.com/woocommerce/woocommerce-blocks/pull/1355) 2019-12-10 11:29:58 +00:00
Darren Ethier 0286c2d751 Fix broken cart & checkout blocks due to inconsistent block names between server side and client side registration (https://github.com/woocommerce/woocommerce-blocks/pull/1353)
* remove unnecessary suffix on chunk names

* don’t change block name, just add prefix to handle.
2019-12-09 15:50:49 -05:00
Darren Ethier a0b4d9b798 improve cart and checkout block namespacing (https://github.com/woocommerce/woocommerce-blocks/pull/1343) 2019-12-09 14:05:05 -05:00
Mike Jolley 2f91921214 Fix package init for WooCommerce 3.9 (https://github.com/woocommerce/woocommerce-blocks/pull/1335)
* Update Domain/Package so plugin file is not required, only a path.

* remove WC_BLOCKS_PLUGIN_FILE constant and add more inline docs

* Update tests

* Remove WC_BLOCKS_PLUGIN_FILE constant
2019-12-09 16:44:28 +00:00
Albert Juhé Lluveras 0fa4dd05a5 Add 'Go' button to Attribute Filter (https://github.com/woocommerce/woocommerce-blocks/pull/1332)
* Add 'Go' button to Attribute Filter

* Code cleanup

* Fixes

* Avoid onSubmit being called in the editor

* Update attributes help texts

* Fix wrong input check box width
2019-12-06 16:36:55 +01:00
Seghir Nadir 58d4d73b51 Introduce Checkout Form skeleton and Checkout Form Step Component (https://github.com/woocommerce/woocommerce-blocks/pull/1329)
* introduce form steps

* add last step

* add prop types

* fix css color variable naming

* add label for a11y

* use :last-child

* white space

* use direct args in classnames

* typo

* rename ids for steps

* fix line height to match title

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* heading-content

* rename css var

* move vars to file

* move components within file

* move imports

* rename prop name to kebabCase

* update prop name

* make components responsive with storefront

* fix some compatiblity problems with 2020

* battle in the CSS ground

* move import to correct place

* turn stepHeadingContent to render prop

* styling
2019-12-06 14:18:55 +01:00
Rua Haszard 6afd947631 allow merchant to toggle cart empty/full modes in block editor (https://github.com/woocommerce/woocommerce-blocks/pull/1327)
* allow merchant to toggle cart empty/full modes in block editor

* use text `Button` for empty/full toolbar buttons

* fix highlighting of current cart state (empty/full) in editor:
- use new custom TextToolbarButton for empty/full mode buttons

* use color variables from css/abstracts/_colors

* Update assets/js/components/text-toolbar-button/index.js

Co-Authored-By: Seghir Nadir <nadir.seghir@gmail.com>

* fix className now props is separated out
2019-12-06 10:08:48 +13:00
Albert Juhé Lluveras 578ddbe94d Minor code style fixes in All Products blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1330) 2019-12-05 17:03:31 +01:00
Mike Jolley b6e278e84f Add `low_stock_remaining` field to product API (https://github.com/woocommerce/woocommerce-blocks/pull/1319)
* Add get_low_stock_remaining field

* Typehinting
2019-12-05 15:09:25 +00:00
Albert Juhé Lluveras aa43840f13 Add 'AND' display format to Attribute filter dropdown (https://github.com/woocommerce/woocommerce-blocks/pull/1309)
* Add 'AND' display format to Attribute filter dropdown

* Add translators comments

* Remove 'assertive' from speak calls

* Wrap some functions in useCallback

* Only filter available filters if style=list and query=and

* Show placeholder in AND query type

* Add default cursor to list-item elements

* Fix issues with 20xx themes

* Fix issues with 20xx themes (II)
2019-12-05 14:58:44 +01:00
renovate[bot] 2c31eb2c25 Update dependency css-loader to v3.2.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1316) 2019-12-04 09:04:55 +01:00
renovate[bot] 780171af56 Update dependency autoprefixer to v9.7.3 (https://github.com/woocommerce/woocommerce-blocks/pull/1314) 2019-12-04 09:04:44 +01:00
renovate[bot] d6fc110913 Update dependency core-js to v3.4.7 (https://github.com/woocommerce/woocommerce-blocks/pull/1315) 2019-12-04 09:04:31 +01:00
renovate[bot] 274e971220 Update dependency eslint to v6.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/1317) 2019-12-04 09:04:22 +01:00
renovate[bot] 0c819caf73 Pin dependency downshift to 3.4.3 (https://github.com/woocommerce/woocommerce-blocks/pull/1313) 2019-12-04 09:03:40 +01:00
Albert Juhé Lluveras 41374cf5ea Fix price slider layout in narrow columns 2019-12-03 21:18:11 +01:00
Seghir Nadir 88d20ba018 change bundle size limit to 400 (https://github.com/woocommerce/woocommerce-blocks/pull/1310) 2019-12-03 15:40:43 +01:00
Seghir Nadir ee1cdf7e0d Skeleton Checkout block (https://github.com/woocommerce/woocommerce-blocks/pull/1308)
* add checkout block

* prevent block from loading in wrong page

* remove block limitation

* exclude file from build

* rename todo

* remove fragment

* move files

* refactor example file
2019-12-03 15:12:46 +01:00
Rua Haszard 8e2b94fd69 Skeleton shopping cart block (https://github.com/woocommerce/woocommerce-blocks/pull/1306)
* basic empty cart block

* use a real placeholder for placeholder editor content

* remove unnecessary Fragment

* updates to config and frontend script

* enqueue frontend script

* add example config to block registration

* change name typo
2019-12-03 08:57:56 -05:00
Albert Juhé Lluveras f7c807a0c6 Add dropdown display style to Attribute Filter block (https://github.com/woocommerce/woocommerce-blocks/pull/1255)
* Add dropdown display style to Attribute Filter block

* Unify filter blocks margin

* Show attribute label inside dropdown input

* Minor CSS reorganization

* Refactor code to smaller files

* Preserve input values on blur

* Only save data-display-style if it's different than 'list'

* Remove inputRef prop in DropdownSelectorInputWrapper

* Accessibility: fix missing label

* Prevent input field being unselected when removing an item with the backspace

* Remove isLoading styles and don't set isDisabled when it's not actually disabled

* Accessibility: increase color contrast

* Add package-lock.json

* Prevent input field being unfocused when removing an item with its chip card

* Don't show menu when input is unfocused
2019-12-03 14:39:11 +01:00
Albert Juhé Lluveras 1e92555c8c Add 2.5.2 changelog 2019-12-02 21:03:29 +01:00
Darren Ethier be199a6d48 Restore back-compat loading of assets registry switch which ensures wcSettings is only loaded when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/1292)
* restore back-compat switch

* update woocommerce/components dependency to latest version

* fix bug in AssetDataRegistry and add tests to guard against regressions
2019-12-02 14:53:36 -05:00
Pierre 221591ce81 Fix the PHP Notice in Featured Category Block when the category is deleted (https://github.com/woocommerce/woocommerce-blocks/pull/1291)
https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/1290
2019-12-02 19:35:01 +01:00
Darren Ethier 1670757534 Remove with-query-string-values hoc implementation (https://github.com/woocommerce/woocommerce-blocks/pull/1287)
* remove with-query-string-values hoc implementation

* remove unnecessary passed in props and clean up proptypes

* remove dead code
2019-12-02 07:52:10 -05:00
Albert Juhé Lluveras aaa37637c2 Replace 'isPreview' with 'isEditor' when it refers to the editor (https://github.com/woocommerce/woocommerce-blocks/pull/1276)
* Replace 'isPreview' with 'isEditor' in several places

* Explicitly set props to true

* Add missing propTypes
2019-12-02 11:27:44 +01:00
renovate[bot] 05b234862b Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/1288) 2019-12-02 10:52:13 +01:00
Albert Juhé Lluveras 84a073acf4 Update 'Tested up to' version to WP 5.3 (https://github.com/woocommerce/woocommerce-blocks/pull/1282) 2019-11-29 19:37:05 +01:00
Albert Juhé Lluveras f8571c3618 Add instructions to update a single file to WordPress.org (https://github.com/woocommerce/woocommerce-blocks/pull/1284) 2019-11-29 19:36:38 +01:00
Albert Juhé Lluveras 5698e123d3 Fix Price Filter block if minPrice or maxPrice are null (https://github.com/woocommerce/woocommerce-blocks/pull/1278) 2019-11-29 15:28:14 +01:00
Jeff Stieler fb8a21ba81 Add getAdminLink() to shared settings export. (https://github.com/woocommerce/woocommerce-blocks/pull/1244)
* Add getAdminLink() to shared settings export.

* Import getAdminLink from @woocommerce/settings

* Uninstall @woocommerce/navigation
2019-11-28 17:33:29 +01:00
Darren Ethier bdcb7544c1 Add source-maps for easier debugging development builds (https://github.com/woocommerce/woocommerce-blocks/pull/1274)
* add source-maps for easier debugging

* change test to be a bit more stable
2019-11-28 07:55:59 -05:00
Albert Juhé Lluveras ed4e4ad7b9 Use attribute label instead of slug in Filter by Attribute title (https://github.com/woocommerce/woocommerce-blocks/pull/1271) 2019-11-27 14:29:28 +01:00
Seghir Nadir 087e5531aa Update CONTRIBUTING.md
change some things according to Darren [notes here](2ee0b6afd8)
2019-11-27 14:27:44 +01:00
Seghir Nadir 6680559d53 Update CONTRIBUTING.md 2019-11-27 12:27:17 +01:00
renovate[bot] 007e19eb68 Update dependency eslint to v6.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1268) 2019-11-27 11:19:08 +01:00
renovate[bot] e326639a37 Update dependency core-js to v3.4.4 (https://github.com/woocommerce/woocommerce-blocks/pull/1267) 2019-11-27 11:19:00 +01:00
renovate[bot] 2ce6504676 Update babel monorepo to v7.7.4 (https://github.com/woocommerce/woocommerce-blocks/pull/1266) 2019-11-27 11:18:53 +01:00
renovate[bot] 18d2757665 Update dependency request-promise to v4.2.5 (https://github.com/woocommerce/woocommerce-blocks/pull/1269) 2019-11-27 10:36:34 +01:00