* Form/button stucture
* Use registerBlockComponent
* Context for add to cart form
* Working cart button
* Tidy up button component
* Add todos
* Revert reg block
* Hide stock indicator if not purchasable
* Hide terms if empty
* Add url and type to API
* Skip default category from term response
* Rename form element
* Form for product types
* Tidy up context provider and expand todos
* No longer using qty icon
* Update todos
* Correct text domain
* registerExperimentalBlockType
* Duplicate method
* Remove prevent default
* Update docblock
* Description for button code
* Order summary: Add spacing between product name and price name
* Remove border from shipping options in the side bar
* Add a hasBorder prop to Panel
* Checkout Order summary: remove margin product description
* Fix padding when there are multiple packages and remove old code
* Simplify selector
* Add margin botton to no shipping options notice
* Make sure Checkout titles are aligned when there are no express payment methods
* Update step heading margins according to new designs
* Add theming docs
* Update some components to the new class name structure
* Add docs about class name updates
* Update coding guidelines
* Minor improvements
* Update docs/theming/class-names-update-280.md
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* more setup configuration for rtl
* move default state for cart out of reducer
This also creates a file for default store states, it should make it easier to execute tests in various environments.
* Make sure there’s a default object for cart line item row
* set defaults for cartData
* add fetchMock as a global in eslint config
* add initial cart flow tests
This is just to get the ball rolling, the cart block needs more tests
* fix missing @wordpress/jest-console configs (because I overwrote the original configuration)
* update test because of change in branch
* switch import order
* add globals.d.ts file to declare globals we use.
This is a quick solution to prevent typescript linting warning about `fetchMock`. At some point we could also create a proper interface for it or import the types (if they exist) for the `jest-mock` package.
The new `globals.d.ts` file is excluded from published builds.
* Use same margin-bottom in credit card input as in checkout inputs
* Set cursor:text for Checkout input labels
* Increase line height of expiry and cvc input validation errors in large viewports
* Increase height of expiry and cvc input validation errors in small viewports
* Move order summary styles to component style.scss
* Fix wrong class name in Order summary
* Move express payment methods a little bit higher
* Fix shipping options panel misaligned in the Cart sidebar
* Add right padding to panel button so text doesn't overlap the arrow
* Fix wrong class name in Order summary (II)
* add state for selected saved token in payment data
* add handling for flipping payment status back to pristine when checkout has error
If payment status is successful client side, but the checkout state goes into an error after server side processing, then we reset payment status to pristine to allow for reprocessing of payment method client side.
This is skipped for saved payment method tokens because they effectively are _only_ processed server side.
* Revert "Move blocks to stable flag (https://github.com/woocommerce/woocommerce-blocks/pull/2261)"
This reverts commit a005649ab8.
* migrate to number based gating
* add todo to watch feature flag
* remove flags from build
* change flag in travis
* load flag in right order
* expose flag to js
* simplify flag definition
* more feature flags
* wrap flag in check
* add helper functions
* add helpers in PHP
* fix typo in flag
* move php code to src/domain/package
* tweak if condition
* return flag to travis
* fix broken block name
* remove obsolete useStoreOrder hook and implementation.
This hook was actually never completed and was only implemented in the `usePaymentMethodInterface` hook/api. The original purpose was to expose order details to registered payment methods, but that is now exposed via checkout state event emitters so it’s no longer needed.
OrderId is exposed via the `CheckoutState` context provider.
* remove setBillingData from being exposed to payment methods directly
billingData is updated via event emitter callback responses (see payment method data context provider) and is not something that should be set directly via payment methods.
We want checkout to have control over how billing data is updated in the state.
* Update item count badge styles
* Make sure item count badge doesn't break in multiple lines
* Make item count badge have white background
* Add docs
* Move order summary CSS properties outside of the sidebar class to reduce specificity
* Move Order summary to its own component
* Register Atomic Blocks and save some block content
* renderInnerBlocks utility
* Frontend Rendering
* Clean up atomic block classnames
* Move shared styles
* Create a hoc for attribute mapping
* Rename some unpluralised class names
* Remove prefixes from atomic component class names
* Updated styles
* Update styles from master
* Revert product list styles
* 2020 fixes
* Separate renderFrontend from renderInnerBlocks
* Lazy loading of components
* Tweak loading classes
* FIx all products loading state
* Revert lazy implementation - creates too many unneccessary files due to webpack config
* Cleanup
* Remove wcBlocksBuildUrl
* Move call to register_atomic_blocks
* Remove duplicate key
* reuse render frontend
* Corectly handle frontend attribute mapping to keep editor working
* Style updates
* Update side effects
* Remove width style from rating to fix alignment
* Move ssr grid styles to main stylesheet
* Put back prefixed classnames
* 2020 styling fixes
* Create frontend files instead of doing it all in block map
* Update assets/js/atomic/utils/get-block-map.js
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Update assets/js/atomic/utils/render-parent-block.js
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Fix last child alignment regardless of block type
* More specificity fixes
* 2020 button alignment
* static fix to prevent offsets
* fix placeholder image in firefox
* Issues reported in feedback
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Honor heading styles in Cart and Checkout blocks
* Replace Panel with DisclosureWidget and remove Card
* Remove panel-style from main entry
* Rename DisclosureWidget props
* Simplify TitleTag assign
* Add aria-expanded attribute
* Rename DisclosureWidget to Panel
* Make Panel button clickable area smaller
* Fix specificity issues with Twenty Twenty
* Reset italics in reset-typography mixin
* Make C&C titles font size large
* Add padding to shipping options when in the sidebar
* Fix Sale badge markup discrepancy. Fixeswoocommerce/woocommerce-blocks#2107
* Fix product link markup discrepancy
* Use same class name for ratings markup in product grid blocks
* Remove editor specific class name for product title
* Unify price layout between product grid blocks and All Products block
* Change specificity raising classes to avoid editor class names
* Make small images fill the available width in product grid blocks
* Avoid increasing selector specificity in the frontend
* Undo AbstractProductGrid.php template changes
* Do not remove .wc-block-grid__product-rating__stars from CSS
* Add theming docs
* Remove underline from discounted prices
* Fix position of on sale badge in Twenty Twenty
* Make sure we reset styles from Core
* Fix image on sale badge not correctly positioned
* Fix sale badge alignment when they are on in the right
* Use named font sizes instead of values in px
* Convert rem mixin to em
* Remove unnecessary line-height
* 'Design' -> 'layout'
* Add comment to magic line-heihgt number
* Update a couple of class names to use BEM
* Use consistent name for SCSS variables
* Fix order summary line heights
* Update docs/contributors/coding-guidelines.md
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* Convert several default buttons to primary
* Align primary and tertiary buttons
* Align select controls of placeholders
* Don't force a placeholder background color
* Add border to placeholder lists
* Add work-around for SearchListComponent compatibility with last version of @wordpress/components
* Remove todos for colors (see woocommerce/woocommerce-blocks#1331)
* remove todo for payment method express payments placeholder
No placeholder is needed because we don’t want to show this at all if there are no payment methods setup (or initialized based on `canMakePayment`). The payment methods step will have instructions in the editor for users to setup their payment methods.
So this todo was invalid.
* Remove todo comment for useStoreOrder (see woocommerce/woocommerce-blocks#2555)
* remove obsolete todos for usePaymentMethodInterface
* changed todo into a Note for the useQueryState tests
With focused work happening on tests, this is better as a note that can be picked up when this file is touched again.
* remove obsolete todo from payment method registration validation
* remove todo covered by created issue (see woocommerce/woocommerce-blocks#2166)
* remove obsolete todo for stripe utils
* Convert todo to a Note for Checkout Block php registration
For now, I think having the comment block noting what is happening here is sufficient. Whether or not we extend the blocks to cover the other endpoints is something that will surface in future planning and putting in an issue right now coudl be premature (and likely just land the issue in the icebox)
* Remove todo related to ReserveStock covered by woocommerce/woocommerce-blocks#2556
* Remove todo in AbstractRoute covered by issue in WooCommerce project
see https://github.com/woocommerce/woocommerce/pull/26219 for the issue.
* Convert todo to note for wp_version check in Library class
* Fix different heading size of Cart block between frontend and editor
* Increase Cart submit button specificity so styles are applied in the editor
* Ensure buttons don't inherit borders
* Simplify styles
* Create Title component
* Rename 'level' prop to 'headingLevel'
* Add TwentyTwenty styles from Core
* Increase product on sale selector specificity
* Add theme class name to admin
* Fix some more style discrepancies
* Use em instead of rem