Commit Graph

1000 Commits

Author SHA1 Message Date
renovate[bot] cc0ee50685 Update dependency core-js to v3.6.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1438) 2019-12-25 12:45:08 +01:00
renovate[bot] c73f5b6898 Update dependency eslint to v6.8.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1439) 2019-12-25 12:44:47 +01:00
renovate[bot] 4ab46dbb7f Update dependency mini-css-extract-plugin to v0.9.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1440) 2019-12-25 12:44:36 +01:00
renovate[bot] dbad049a6b Update dependency style-loader to v1.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/1441) 2019-12-25 12:44:22 +01:00
Mike Jolley 9b51a824d2 Store API: Add customer endpoints (https://github.com/woocommerce/woocommerce-blocks/pull/1417)
* Add schema/GET endpoint

* Customer data updates + create tests

* Update docs

* Unused method

* Use ID from the customer object, rather than checking logged in user

* PHP 5.6 incompatibility
2019-12-20 16:07:53 +00:00
Garrett Hyder 21f1d03199 Fix double 'yet yet' (https://github.com/woocommerce/woocommerce-blocks/pull/1421)
Found during translation of WooCommerce 
Permalink - https://translate.wordpress.org/projects/wp-plugins/woocommerce/dev/en-ca/default/?filters%5Bstatus%5D=either&filters%5Boriginal_id%5D=8771164&filters%5Btranslation_id%5D=68202906
2019-12-20 10:35:08 +01:00
Seghir Nadir aaddf13494 Add type to checkout input fields (https://github.com/woocommerce/woocommerce-blocks/pull/1401)
* add input type

* fix css issues with types and better change default position
2019-12-19 13:59:34 +01:00
Seghir Nadir cf495a775e Fix Price Filter constraints by rounding up and down (https://github.com/woocommerce/woocommerce-blocks/pull/1419)
* fix problem with price not rounding up right

* add test
2019-12-19 13:52:49 +01:00
Albert Juhé Lluveras 548b2b80a9 Update filter blocks descriptions to explain they only work with the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1420) 2019-12-19 13:46:30 +01:00
Mike Jolley 15dbc627c1 Store API: Add cart coupon endpoints (https://github.com/woocommerce/woocommerce-blocks/pull/1378)
* Correct docblock

* Implement coupons endpoint with add/delete/get functionality

* Add totals

* Use money formatting

* Added tests for new endpoints

* Add coupons to main cart endpoint and update docs to match

* Fix indenting in readme

* is_a to instanceof

* Update coupon_exists logic

* Documentation/tidy class

* Update currency responses for coupon totals w/ tests
2019-12-19 12:41:34 +00:00
Seghir Nadir ca506d0a48 fix translation quantities (https://github.com/woocommerce/woocommerce-blocks/pull/1415)
* fix translation quantities

* update i18n comments and add variable
2019-12-19 10:22:53 +01:00
Mike Jolley cfe55418b1 Translator string feedback (https://github.com/woocommerce/woocommerce-blocks/pull/1412)
* Translator comments need to immedietely precede strings

* Add some extra context to "chips"
2019-12-18 12:59:22 +00:00
Seghir Nadir 25ea48d2ae Update Contributors.md for releasing a new minor version (https://github.com/woocommerce/woocommerce-blocks/pull/1403)
* change doc to update branch

* add example
2019-12-18 11:30:03 +00:00
Mike Jolley 6a47b2232a More API price formatting and currency handling (https://github.com/woocommerce/woocommerce-blocks/pull/1394)
* Consistent currency data and formatting for product prices

* Consistent get_store_currency_properties usage

* Update tests with schema changes

* min_price and max_price to subunit format

* Product query of min and max prices using subunit

* Cart item totals

* Collection data schema object and currency data inclusion

* Handle subunits and new API in product prices

* Update price slider to format numbers using library and new API responses for subunits

* Product query of min and max prices using subunit

* Fix indents in readme

* Add todo for currency formatting

* Handle step for subunits, fixes min/max constraints

* Handle subunit conversion on display, using consistent currency object and wrapped NumberFormat component.

* Prettier ran

* Update usePriceConstraints tests so rounding doesn't make all values be 0

* Rename to minorUnitValue

* Move currencyToNumberFormat to index file

* siteCurrencySettings to constant rather than function

* remove cents term

* cents->minor unit

* typo in todo note

* Switch to FormattedMonetaryAmount

* Formatting

* wrong case
2019-12-18 11:29:20 +00:00
renovate[bot] 47d695b7ad Update dependency @octokit/rest to v16.35.2 (https://github.com/woocommerce/woocommerce-blocks/pull/1407) 2019-12-18 10:51:46 +01:00
renovate[bot] c053ea1846 Update Node.js to v10.18.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1406) 2019-12-18 10:25:27 +01:00
renovate[bot] 963118fd23 Pin dependency bundlewatch to 0.2.5 (https://github.com/woocommerce/woocommerce-blocks/pull/1405) 2019-12-18 10:24:51 +01:00
renovate[bot] 840562d846 Update dependency core-js to v3.5.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1408) 2019-12-18 10:24:26 +01:00
renovate[bot] 81397f5d39 Update dependency css-loader to v3.4.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1409) 2019-12-18 10:24:05 +01:00
renovate[bot] 6c7becc9fb Update dependency downshift to v3.4.8 (https://github.com/woocommerce/woocommerce-blocks/pull/1410) 2019-12-18 10:23:36 +01:00
Seghir Nadir fe57c3c76e update changelog 2019-12-17 20:51:58 +01:00
Seghir Nadir f7553be57a update changelog (https://github.com/woocommerce/woocommerce-blocks/pull/1404) 2019-12-17 20:50:13 +01:00
Mike Jolley 9470caed80 Remove extra colon in active filter widget (https://github.com/woocommerce/woocommerce-blocks/pull/1399) 2019-12-17 18:32:32 +01:00
Darren Ethier c285bb853f mark atomic blocks as side-effect free. (https://github.com/woocommerce/woocommerce-blocks/pull/1402) 2019-12-17 18:32:08 +01:00
Darren Ethier b38c45787a fix incorrect property name for price format (https://github.com/woocommerce/woocommerce-blocks/pull/1397) 2019-12-17 10:25:37 +00:00
Albert Juhé Lluveras 506f964463 Update several blocks so they don't support HTML edition (https://github.com/woocommerce/woocommerce-blocks/pull/1395) 2019-12-17 09:38:31 +01:00
Seghir Nadir d58712ee2b Add Checkout Form components (https://github.com/woocommerce/woocommerce-blocks/pull/1351)
* initial commit at fields

* add radio control

* change input to be uncotrolled

* tweak styles

* populate block with boilerplate

* update aria in radio

* remove comment

* fix typo

* add missing colors

* put reminder to put Disabled back

* wrap text in i18n __

* reorder styles

* rename wc-components to wc-blocks

* use value instead of index for keys

* add no shipping placeholder

* change isEditor default to false

* fix problem with responsive
2019-12-16 23:13:41 +01:00
Albert Juhé Lluveras af5af78266 Price filter: preserve previous constraints while loading (https://github.com/woocommerce/woocommerce-blocks/pull/1386)
* Typo

* Save previous constraint while loading

* Add tests for formatPrice

* Small code refactor

* Refactor usePriceConstraints to DRY and add tests

* Add base-hooks to jest config
2019-12-16 17:48:02 +01:00
Albert Juhé Lluveras 77bb23bf32 Add Feedback Prompt in Cart & Checkout blocks sidebar (https://github.com/woocommerce/woocommerce-blocks/pull/1356)
* Add Feedback Prompt in Cart & Checkout blocks sidebar

* Add border

* Move getInspectorControls out of the component function

* Move feedback prompt to a HOC

* Add @todo comment to feedback link

* Use filter for withFeedbackPrompt

* Export withFeedbackPrompt from hocs index.js

* Typo

* Try moving the feedback texts to context

* Revert "Try moving the feedback texts to context"

This reverts commit 21f889b021ceea6fef722efab9663799829bc769.

* Revert "Use filter for withFeedbackPrompt"

This reverts commit 96bba029d61a383eafa2c0a1c08f7988e319b50d.

* Set feedback text in the HOC function

* Use arrow-function to simplify code

* Refactor
2019-12-16 15:59:16 +01:00
Albert Juhé Lluveras 6d383bee73 Fix Attribute Fiter count misalignment (https://github.com/woocommerce/woocommerce-blocks/pull/1391) 2019-12-16 14:58:29 +01:00
Albert Juhé Lluveras ec77f88a72 Reformat files (https://github.com/woocommerce/woocommerce-blocks/pull/1389) 2019-12-16 14:58:19 +01:00
Darren Ethier 25c32dff45 make sure we only allow one cart/checkout block per page/post (https://github.com/woocommerce/woocommerce-blocks/pull/1384) 2019-12-16 08:27:17 -05:00
Albert Juhé Lluveras a4be92ec15 Always filter attribute filters based on price filter (https://github.com/woocommerce/woocommerce-blocks/pull/1390) 2019-12-16 14:04:19 +01:00
Darren Ethier 80d76944cc account for default orderby changes in editor (https://github.com/woocommerce/woocommerce-blocks/pull/1385) 2019-12-16 07:35:13 -05:00
Darren Ethier 10c27e928d Only allow one instance of the All Products block per page/post. (https://github.com/woocommerce/woocommerce-blocks/pull/1383)
* only allow one instance of the all products block per page.

* limit filter blocks to one instance per page/post
2019-12-16 07:31:38 -05:00
Darren Ethier 762caa5aae Fix messaging when there are no attributes (https://github.com/woocommerce/woocommerce-blocks/pull/1382) 2019-12-16 07:28:03 -05:00
renovate[bot] 2b1767482a Lock file maintenance (https://github.com/woocommerce/woocommerce-blocks/pull/1387) 2019-12-16 08:29:08 +01:00
Darren Ethier 5ac157b14a Normalize set minPrice and maxPrice values by step (https://github.com/woocommerce/woocommerce-blocks/pull/1379)
* normalize set minPrice and maxPrice values by step

* follow standards for comment blocks
2019-12-13 16:54:35 -05:00
Albert Juhé Lluveras 5485e4c51c Use wc_review_ratings_enabled() API function to check if review ratings are enabled (https://github.com/woocommerce/woocommerce-blocks/pull/1374) 2019-12-13 18:13:11 +01:00
Mike Jolley 901e996cc5 Add money formatting to API responses (https://github.com/woocommerce/woocommerce-blocks/pull/1367)
* Implement basic version of MoneyValue with decimal conversion

* Implement MoneyValue in cart classes

* Add minor unit to schema

* Update tests

* Add tests

* Tweak minor unit description

* Replace pow

* Dump rounding mode and use constant values

* Only return strings

* prepare_money_response method

* Update types back to string

* Remove unnecessary parentheses

* Feedback; force integer rounding mode to prevent notices
2019-12-13 15:37:11 +00:00
Albert Juhé Lluveras 810341d084 Add Cart block checkout button (https://github.com/woocommerce/woocommerce-blocks/pull/1366) 2019-12-12 20:46:56 +01:00
Albert Juhé Lluveras b5791d9c53 Rename SubmitButton to FilterSubmitButton (https://github.com/woocommerce/woocommerce-blocks/pull/1369) 2019-12-12 20:16:39 +01:00
Albert Juhé Lluveras bd4b57074e Load ErrorPlaceholder CSS only in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/1368) 2019-12-12 20:16:11 +01:00
Rua Haszard e5bc742853 add pricing discount info to cart line items api (https://github.com/woocommerce/woocommerce-blocks/pull/1325)
* add more pricing detail to cart line items api:
- total line price, before any coupon/discount
- saving, aka discount amount (if any)
- boolean if saving > 0

* add new cart price info properties to schema

* tidy field naming – line subtotal=pre discounts, line total=discounted

* remove saving / discount fields from API – could be calculated on client

* return numbers (not string) for price fields

* rename API field "price" to product price for clarity

* fix schema type for total fields (now float)

* Total descriptions in schema

* Format all costs as strings to follow core rest api

* Add totals to cart schema

* Update tests

* tax_lines
2019-12-12 10:31:25 +00:00
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 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