Commit Graph

423 Commits

Author SHA1 Message Date
Darren Ethier 5800aca3db Try bundlewatch (https://github.com/woocommerce/woocommerce-blocks/pull/1365)
* remove bundlesize config

* install bundlewatch and add config

* tighten config file

* fix pattern for vendors file
2019-12-11 11:30:54 -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
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
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 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
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
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
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
renovate[bot] dc13d9c8ec Update dependency react-test-renderer to v16.12.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1225) 2019-11-26 06:38:12 +01:00
renovate[bot] e5a7d1bab9 Update dependency node-sass to v4.13.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1224) 2019-11-26 06:37:57 +01:00
renovate[bot] 571254f69e Update dependency lint-staged to v9.4.3 (https://github.com/woocommerce/woocommerce-blocks/pull/1223) 2019-11-26 06:37:18 +01:00
renovate[bot] 1d3201609b Update dependency eslint-config-prettier to v6.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1222) 2019-11-26 06:36:56 +01:00
renovate[bot] 85ed640634 Update dependency autoprefixer to v9.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/1221) 2019-11-26 06:36:32 +01:00
Mike Jolley fc32c0a9ed Update translation handling to include core translations (https://github.com/woocommerce/woocommerce-blocks/pull/1242)
* Remove language files and po2json generation scripts

* Add action filter and function to load core translations

* Use pre_load_script_translations

* Remove script actions

* docblock
2019-11-23 16:28:54 +00:00
renovate[bot] 868db00a86 Pin dependency use-debounce to 3.1.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1220) 2019-11-21 11:51:46 +00:00
Darren Ethier 688d60d9bd update to dev version 2019-11-19 14:08:55 -05:00
Seghir Nadir 7995d56d9f Bumping version strings to new version. 2019-11-19 18:20:22 +01:00
Mike Jolley d613d2fde6 Active filters block (https://github.com/woocommerce/woocommerce-blocks/pull/1168)
* Basic block construction

* Register on PHP side

* wc-active-filters script

* Price utils

* Refactor price slider so state reflects the query

Moves some logic from the component to the block so that min and max price can change (via query) and be reflected by the price sliders.

This allows the active filters block to change the query and have those new values reflected by the slider.

* Fix type checking of numbers

* Styles for filter block

* Improved attribute helper for getting attribute taxonomy data from ID/taxonomy

* Refactor attribute filter to use updateAttributeFilter helper

* Disable checkboxes when loading to avoid multiple queries

* Add todos - this is blocked

* Remove checked state from Attribute Filter so it gets updated from the store (https://github.com/woocommerce/woocommerce-blocks/pull/1170)

* isLoading check

* active price filtering rendering

* Block heading

* Implement block options; chip display with clear button

* Clear all should remove all attributes

* Enable previews

* Introduce a component to look up terms from slugs using collections (which are cached)

* Correct all docblocks

* activePriceFilters null return

* renderRemovableListItem

* Remove useMemo for hasFilters

* Switch classnames notation

* Ensure slug is array in removeAttributeFilterBySlug

* null -> undefined return types for attributes

* Remove fragment

* Check we have a termObject in ActiveAttributeFilters

* Refactor formatPriceRange return statements

* Ensure query array index will exist

* Only sort when adding a query

* Remove aria-label with dupe text

* hasFilters is function

* Update useQueryStateByKey usage

* More doc block fixes

* Update getAttributeFromTaxonomy return and docblock

* getAttributeFromID return/docblock
2019-11-15 14:41:23 +00:00
renovate[bot] 9c9b248c6d Update dependency core-js to v3.4.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1164) 2019-11-13 10:14:01 +01:00
renovate[bot] e721c2d6c7 Update dependency eslint-plugin-jest to v22.21.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1165) 2019-11-13 10:13:51 +01:00
renovate[bot] 69af13bc45 Update dependency @octokit/rest to v16.35.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1163) 2019-11-13 09:48:43 +01:00
renovate[bot] cff026bd93 Update dependency @babel/core to v7.7.2 (https://github.com/woocommerce/woocommerce-blocks/pull/1162) 2019-11-13 09:48:31 +01:00
Albert Juhé Lluveras 2f04c61223 Update dependencies order (https://github.com/woocommerce/woocommerce-blocks/pull/1146)
* Update dependencies order

* Create eslint WooCommerce plugin with dependency group rule

* Update WCPackageLocality definition so it only includes External and Internal

* Rename WPPackageLocality to WCPackageLocality

* Delete old typedef
2019-11-08 17:30:11 +01:00
renovate[bot] 0295379b49 Update dependency @octokit/rest to v16.34.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1130) 2019-11-06 11:44:26 +01:00
renovate[bot] 3882541824 Update dependency core-js to v3.3.6 (https://github.com/woocommerce/woocommerce-blocks/pull/1132) 2019-11-06 11:39:10 +01:00
renovate[bot] 1d2d4102fd Update dependency autoprefixer to v9.7.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1131) 2019-11-06 11:39:00 +01:00
renovate[bot] 4abb516638 Update babel monorepo to v7.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1129) 2019-11-06 11:38:47 +01:00
renovate[bot] 332c4ccce2 Pin dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/1104) 2019-10-30 08:13:50 -04:00
renovate[bot] 9113805701 Update dependency @octokit/rest to v16.34.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1105) 2019-10-30 07:56:42 -04:00
renovate[bot] 438322d25a Update dependency autoprefixer to v9.7.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1106) 2019-10-30 07:56:08 -04:00
renovate[bot] 6309e9a8c6 Update dependency core-js to v3.3.5 (https://github.com/woocommerce/woocommerce-blocks/pull/1107) 2019-10-30 07:54:55 -04:00
renovate[bot] d1801099b3 Update dependency eslint to v6.6.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1108) 2019-10-30 07:53:52 -04:00
renovate[bot] 0c337ec2b5 Update dependency eslint-config-prettier to v6.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1109) 2019-10-30 07:45:48 -04:00
Mike Jolley f851a6ef9b All Products with Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1032)
* Inital block creation

* Update labels

* Columns, rows, sample data json

* Output data from API

* thumbnail_html

* Split into smaller components of grid

* Price handling

* Image handling

* Remove !

* frontend

* Work on cart api

* Cart error handling and product type conditions

* innerblock progress

* Implement layoutConfig as set from innerblocks shape.

Note:

- this is just a poc
- where things are configured likely needs changed
- will still need to work out how this gets persisted for the frontend and how things get displayed there (but likely will work fairly similar in terms of mapping to components).

* use correct prop name

* Working edit button

* Clean up block controls and edit view

* Add link with innerblocks

* update link description

* correctly handle components with inner blocks as children

* Re-organise atomic components and blocks into own directories

* Unique keys for components

* Fix default layout when inserting block for first time

* Working layoutconfig save

* Save attributes

* Move sale badge to image component

* Add disabled to render preview and blocks

* icons

* Editor view styling

* Update withComponetId to stop component ID incrementing too many times

Co-Authored-By: Darren Ethier <darren@roughsmootheng.in>

* Improve key generation

* done/cancel buttons on edit

* Create withProducts HOC for All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/994)

* Create withProducts HOC for All Products block

* Add order select and pagination to All Products block

* Go to first page when changing order

* Add HOC test

* Make sure block is updated whem columns/rows change in the editor

* Fix 'SALE' badge positioning

* Remove unnecessary key

* Honor 'perPage' value when generating placeholders

* Make placeholder sizes match rendered block item

* Several CSS improvements

* Remove unused CSS properties

* Move getProducts to hocs utils

* Remove All Products sample-data.json

* Fix order select wrong margin in the editor

* Refactor how loading image gets its size

* Clear products when loadProducts start

* Enhance pagination logic

* Fix placeholder width

* Fix regular_price check

* Set product link max-width

* Implement querystrings for the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/997)

* Implement querystrings for the All Products block

* Create withWindow HOC

* Add with-window tests

* Use renderFrontend util in All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1003)

* Add with-window tests

* Use renderFrontend util in All Products block

* Rename properties and components from 'order' to 'sort' (https://github.com/woocommerce/woocommerce-blocks/pull/1012)

* Rename properties and components from 'order' to 'sort'

* Rename onOrderChange to onSortChange

* Remove unnecessary stylint-disable-line (https://github.com/woocommerce/woocommerce-blocks/pull/1016)

* Create withBrowserLocation and withBrowserHistory HOC (https://github.com/woocommerce/woocommerce-blocks/pull/1022)

* Create withBrowserWindowProp HOC

* Remove unnecessary expect's

* Always pass window prop to propMap if it exists

* Scroll to top when switching pages in All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1011)

* Scroll to top when switching pages in All Pages block

* Improve keyboard navigation in the All Products block

* Create withScrollToTop HOC

* Fix variable name typo

* Update paths with aliases

* Avoid first and last page being included in pagination 'pagesToDisplay' (https://github.com/woocommerce/woocommerce-blocks/pull/1015)

* Update lock

* constants

* linting

* Clean up styling

* Prettier

* Block options for title/image

* Prettier

* Remove shared content controls

* Update atomic block descriptions

* Summary block

* Prettier

* Impoved template edit appearance and added inline tips

* Apply prettier

* Reset and cancel buttons

* Improved keys

* Tweak tip placement

* Remove incorrect comments

* Remove disabled ofr non interactive elements

* Fragment not needed

* Update assets/js/atomic/components/product-list/title/index.js

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

* Move componentId hoc

* Comment

* Implement onImageLoaded

* Pagination: disable first/last page if they are active (https://github.com/woocommerce/woocommerce-blocks/pull/1041)

* Update assets/js/atomic/components/product-list/rating/index.js

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

* Sale badges refactoring

Adds sale badges blocks and improves how the default blocks are defined.

* revert changes in withComponentId

* fix flexbox alignment

* Create withQueryStringValues HOC and use it in ProductGrid component (https://github.com/woocommerce/woocommerce-blocks/pull/1040)

* Create withQueryStringValues HOC and use it in ProductGrid component

* Add tests

* Add comment explaining urlParameterSuffix

* Don't destructure props if only used once

* Move dependencies check outside the HOC

* Update test description

* Remove HOCs no longer used

* Update assets/js/atomic/blocks/product-list/image/index.js

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

* Update assets/js/atomic/components/product-list/sale-badge/index.js

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

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

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

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

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

* Feedback

* Grid to List

* Improved badge handling

* update package-lock after merge from master

* Add wp.data store for schema and lists. (https://github.com/woocommerce/woocommerce-blocks/pull/1008)

* install @wordpress/data-controls and deepFreeze

* add schema store

* add query-state store

* add collections store

* add bundle entry point (and export store keys and constants)

* add master README.md for new stores

* add bundle configuration and register asset php side

* Add missing param name

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

* code style fixes

* remove unnecessary period from test description

* Simplify conditional

* reorder imports (code style)

* reorder imports and codestyle

* refactor using lodash for state utils

* reorder imports

* reorder imports

* reorder dependencies

* reorder dependnecies an remove duplication block

* remove errant tab

* reorder dependencies

* Modify collections store to add headers to the store state. (https://github.com/woocommerce/woocommerce-blocks/pull/1073)

* add control for getting unparsed response from apiFetch

* Modify action so it recieves a response object.

* modify reducer to handle response object

* improve selectors to make headers accessible

- modifys existing `getCollection` to retrieve items from state.
- adds `getCollectionHeader` selector

* update resolvers to handle full response from request

- also adds resolver for `getCollectionHeader`

* update docs for changes

* Improve spacing in doc

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

* Fix spacing in inline docs

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

* change `getFromState` to receive an object instead of arguments list.

* Prepare All Products block to accept extension inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1047)

* Simplify BLOCK_MAP

* Prepare All Products block to accept extension inner blocks

* Change filter name

* Update filter name

* Add check that block exists in BLOCK_MAP

* Create REVERSED_BLOCK_MAP instead of searching blocks each time

* Change how child blocks are registered for All Products block

* Refactor All Products block so reverse map isn't needed

* Remove getDefaultBlocks

* Make sure getRegisteredInnerBlocks always returns an object and add checks to registerInnerBlock

* Add missing blockName arg

* Add inline docs to block registry

* Move 'blockName' prop to context

* Typos

* Improve registerInnerBlock error messages and create a validation function

* Refactor context

* Rename validateOption to assertOption

* refactor where new context lives and add alias for base-context

* fix doc block

* remove todo block (there’s an issue for it)

* rename context

* Update assets/js/atomic/components/product-list/sale-badge/index.js

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

* HeadingToolbar comment

* Tweak bool comparison

* Improve how default layouts are set so all blocks can be removed and the no-content message is correct

* Sale centering

* Fix default template

* Product example switch to preview

* Update preview schema and image data to match latest schema

* Add @woocommerce/atomic-components alias

* Alias for previews to prevent need for relative paths

* Drop `align` for sale block

Align disrupts other blocks in unexpected and unavoidable ways. Drop support so the sale block is a block level item.

* Rename atomic components and blocks (and create ProductLayoutContext) (https://github.com/woocommerce/woocommerce-blocks/pull/1089)

* rename atomic blocks and components to be more generic (drop list)

* create new context for productlayout and implement provider

* Rename ProductSalesBadge to ProductSaleBadge

* Add php5.3 restriction for All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1090)

* enable legacy builds and add handling for AllProducts to be wp5.3 only

* fix legacy builds

* Prevent filemtime notice

* Implement new data stores with All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1067)

* add new hooks and tests and alias for hooks

* various fixes for stores after implementation tests

* implement new stores for ProductList component

* add doc blocks for useStoreProducts hooks

* fix typo in property on returned object
2019-10-28 09:53:09 -04:00
Mike Jolley 6319de52e9 Build maintainence (https://github.com/woocommerce/woocommerce-blocks/pull/1092)
* Ignore node_modules when watching to reduce CPU load

https://github.com/webpack/webpack/issues/1706

* Remove prepack - we no longer push to NPM
2019-10-28 11:00:04 +00:00
renovate[bot] 9ad48205b4 Update dependency react-test-renderer to v16.11.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1074) 2019-10-23 10:19:08 +02:00
renovate[bot] 3d22e01e63 Update dependency lint-staged to v9.4.2 (https://github.com/woocommerce/woocommerce-blocks/pull/1072) 2019-10-23 10:19:01 +02:00
renovate[bot] d36b881b9c Update dependency eslint-plugin-jest to v22.20.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1071) 2019-10-23 10:18:43 +02:00