* update min version of WordPress core to 5.3 in readmes
* update min WP version to 5.3 - main plugin file & admin compat notice
* remove WordPress 5.2 travis e2e test build
* disable legacy (WP <5.3) webpack entry points
* add "update user docs" step to release process, incl min WP/Woo reqs
* add 5.5 test
* allow test to fail
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* add dark styles setting
* add attributes to blocks
* add colors to input and select
* cover rest of items
* tweak select contrast
* fix ie11 issue
* fix focus
* include checkbox styles
* fix extra spacing after phone number
* add styling to quantity selector
* remove extra rule
* remove editor styles for radio control
* use border-color
* rename variables and classes and wording
* adjust colors
* provide tighter control over colors
* remove redudant outline rule
* add more variables
* add support for order note
* use variables for textarea
* move dark mode panel to last
* remove generic icons from Cheque & Stripe CC payment methods
* remove icon prop from PaymentMethodLabel - no longer supported:
- icons should only be used for recognisable brands
- generic icons (e.g. credit card) are not recommended
* Revert "remove icon prop from PaymentMethodLabel - no longer supported:"
This reverts commit 1990028a6c98b82750fb917ff3086dbe022ef41d.
* Hide saved payment methods if their gateway is disabled
* Fix wrong type-def
* Remove extra blank line
* Rename var
* Use FILTER_VALIDATE_BOOLEAN instead of comparing to 'yes'
* Use data from Payment Method context instead of reading setting from the server
* Use data from Payment Method context instead of reading setting from the server
* fix issue with overlapping margins
* move styles out of select
* remove extra spacing
* remove extra spacing from cart
* move styles to state input and remove extra position.
* use svg for checkbox
* update borders
* switch to rems
* define a rem function
* fix ie11 issue
* fix focus
* add ie hack
* fix spacing and switch to em
* switch to rem
* issue template for cart & checkout feedback
* fix example desktop OS (not iOS!)
* delete `withFeedbackPrompt` - not used
* link cart/checkout editor feedback to GitHub issue:
- add new CartCheckoutFeedbackPrompt with specialised text & url
- use in cart/checkout blocks
- tweaked wording of feedback prompt text
* use speech bubble icon to represent feedbackiness
* simplify cart/checkout feedback prompts
* add default labels to all issue templates
* use markdown heading syntax for headings (was basic bold previously)
* tweak wording (remove hint of frustration) and use new "feedback" label
* Fix JS-rendered blocks inside Empty Cart
* Add deprecation rules
* Performance improvements
* Typo
* Remove 'is-loading' class requirement
* Undo changes moved to woocommerce/woocommerce-blocks#2952
* Improve some comments
* Improve code
* IE 11 fix
* Minor fixes
* Assign default value in arguments destructuring
* Refacot renderFrontend code to make it easier to understand
* Revert "Assign default value in arguments destructuring"
This reverts commit 04ae943c675b94e599a1d1700075a79ef8be5004.
- default styling for validation errors is absolute
- this requires the layout provides appropriate space for errors
- payment form is too compact to provide room for errors,
- especially when checkout is narrow due to window or theme
* enqueue order of payment gateways as script data
* use configured gateway order for payment method tabs
* clarify name of payment gateway sort order setting
* fix formatting
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* fix bug - express payment methods not working due to ordering logic:
- move ordering code to payment methods in usePaymentMethods hook;
- this only applies to standard (non express) payment methods
- also any code that uses payment methods will get them in correct order
* why did this formatting not happen pre-commit?
* move method ordering into refreshPaymentMethods to avoid infinite loop:
- pass keys of express payment methods so they work correctly (show up)
- refreshPaymentMethods dispatches availablePaymentMethods to redux
store; I suspect this was causing infinite loop as the callback
depends on registeredPaymentMethods
- handle case when a payment method is not in PAYMENT_GATEWAY_SORT_ORDER
- this happens with COD when dependent on shipping
* fix formatting
* use shallow equal to prevent refreshCanMakePayments infinite loop
* use native Set instead of lodash.union for unique gateway names
* code formatting
* check to ensure we register paymentGatewaySortOrder asset once only
* fix COD tab showing out of order if not available at page load:
- return ALL gateways in sort order array
- note this includes gateways that are not enabled by merchant
* reinstate return bool from usePaymentMethods hook (broken in refactor)
* add basic typedefs for payment methods hooks
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* regenerate auto load maps after version change.
* make sure composer.json is updated with version change for deploys (also necessary for correct auto-load map regeneration)
* update WC tested up to string
* Detect if `JETPACK_AUTOLOAD_DEV` is defined in `wp-config.php` when developing the plugin.
* Add Checkout Order notes (UI)
* Add Checkout Order notes (context)
* Add missing useEffect dependencies
* Remove duplicate toggle in editor
* Minor fixes
* Check whether orderNotes have changed before creating a new state object
* Rename showCounter to showStepNumber
* Rename 'onChange' with 'onTextChange'
* Add comment and tests to FormStep component
* Rename 'with-counter' to 'with-step-number'
* Fix wrong prop
* Make it so order notes are persisted when toggling the checkbox
* Update type-defs
* Set showStepNumber default value to true
* Provider progress
* Revert nonce change for debugging
* Working emitters
* Fix dismiss link alignment in notices
* Fix button state and double adds
* Remove old context file
* Add type defs
* Fix context name
* Leftovers from merge
* Hooks up the variation picker to cart context
* Group event emitters in context
* Fix external product display
* Pass product through to VariationAttributes
* Pass around dispatchers
* Update assets/js/base/context/add-to-cart-form/form-state/reducer.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Update assets/js/atomic/blocks/product-elements/add-to-cart/product-types/variable/variation-attributes/attribute-select-control.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Update assets/js/base/context/add-to-cart-form/form-state/reducer.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* remove placeholder comment
* content->container
* Clarify variation method comment
* update comment
* Switch nesting of providers
* Variation attribute utils test coverage
* If nothing is selected yet, just return all variations.
* Comments to explain loops
* Use refs to avoid recalculation of attributes on every render
* Update memo usage
* typo
* move mock data to test file
* Switch to useShallowEqual
* trigger cart fragment refresh after add to cart
* Decode option entities
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* enqueue and respect merchant option for disabling stripe express pay
* don't even register express payment method if merchant has disabled it
* add StripeServerData.allowPaymentRequest to typedef
* add changelog to readme.txt
* Add testing docs for release
* add some new commands to help with release testing phase
* Add testing notes for 3.0.0
* fix testing note typo
* updae notest to reference the new package-plugin:deploy script for use as part of the release process
* Add note about creating manual tag for the release.
* automate creation of dev tag for release.
* remove release branch from travis branches because we now do pull requests for releases
* remove duplicate back order badge for cart (https://github.com/woocommerce/woocommerce-blocks/pull/2890)
* update zip link in testing notes
* only update stable version in readme.txt if not a pre-release
* Add handling for conditional github release creation based on WP deploy question
* add distignore fir wp deploy builds
* Cart & Checkout: fix '0' visible when product stock was 0 and it allowed backorders (https://github.com/woocommerce/woocommerce-blocks/pull/2891)
* Create wordpress-deploy.yml
* fix cod not accounting for global rate values (https://github.com/woocommerce/woocommerce-blocks/pull/2894)
* ensure we’re only running checks for `wc_reserved_stock` table when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/2895)
* update readme.txt changelog
* remove unnecesary variable definitions
* update github deploy script
* Bumping version strings to new version.
* add missing step for checking out code from tag
* fix exclusion for docker-compose.yml
* fix zip name (it differs from repository name)
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Product selection when out of context for price and title blocks
* Move product element name/description/icons to constant files
* Add attributes and hocs to all elements
* Standalone block rendering
* Add a placeholder if title has no content
* Revert "Add a placeholder if title has no content"
This reverts commit 29115154b33eedc661ccd3cc758acdbc5041ffbc.
* parentClassName is not always present
* Loading state
* Wrap description in P
* Fixed loading styles when nested
* Maintain product shape in useProductData
* feature gate elements from showing in inserter
* fix feature flag
* include price PR
* edit withProductSelector to be a hoc
* fix lint issue
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* Fix Credit Card input font size in some themes
* Fix spacing between credit card icon and input label
* Fix min-width of credit card input fields
* Improvements to the way credit card input fields are resized
* Simplify min-width
* refactor all draft order functionality to be in it’s own class and feature gate it.
* move and fix tests for draft order deletes
* add test to ensure only draft orders are deleted
* implement review feedback and assert valid results before deleting
* update tests
* doh method can’t be protected
* fix conditional for removing scheduled action
* switch to use Woo Core function for catching the exception
* add tests for error handling.
* use `$wpdb->prepare` and remove temp group on test
* stub out COD payment method for checkout block
* consistently use sentence case for (default) payment tab labels
* expose COD `enable_for_virtual` option to client
* correct docblock return value comment Stripe::get_inline_cc_form()
* allow merchant to disable COD payment for virtual/downloadable orders
* tweak canMakePayment dev docs - add cart-dependent example use case
* only allow (show) COD if initially-selected shipping method(s) allow
* tweak `canMakePayment` payment extension API docs
* use $VID:$ substitution for `@since` version in new payment methods
* use FILTER_VALIDATE_BOOLEAN for payment method boolean options
* use more semantic `some` when hunting for COD-unsupported shipping
* clarify `canMakePayment` API docs
* re-select payment method if selected method disappears (e.g. COD) +
+ factor out early return into separate if at top for clarity
* Deregister core cart/checkout scripts and styles when rendering the blocks
* Fix regression: redirect to full cart when adding a product from empty cart
* Make it so it scrolls to the top
* Update assets/js/base/utils/legacy-events.js
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Add check for jQuery availability
* Listen to removed from cart event too
* Remove unnecessary useEffect dependency
* Remove jQuery event subscriptions on component unmount
* Fix tests
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Show backorder notice in the Cart block
* Don't render variation <div> if empty
* Create ProductBackorderNotification component
* Add product backorder notification to the checkout block
* Fix classname and comment
* Rename notification->badge and don't show low stock badge if backorder is shown
* Use ternary to dispaly backorder/low stock badge
* allow payment methods to disable based on shipping or other factors:
- renamed 'initialized' array 'available' to match primary purpose of
`canMakePayment` api - whether payment method should be available
- trigger refresh of available payment methods when shopper chooses
different shipping method
- rename resolveCanMakePayments => refreshCanMakePayments
- tweaked some variable names and scope for clarity
- added comments to clarify things
Note this should not affect behaviour yet - no existing payment methods
use this new feature. COD payment method will need this - woocommerce/woocommerce-blocks#2831
* optimise refreshCanMakePayments:
- useShallowEqual to avoid unnecessary call when shipping methods have
not actually changed (but object value has)
* replace ("set") payment methods in store, was appending:
- payment methods may come and go depending on cart/checkout state
- the previous SET action appended provided payment methods to the
collection
- this prevents dynamic payment methods e.g. COD from being able to hide
i.e. disable
* cache test payment request to avoid unnecessary stripe API calls:
- in the canMakePayment callback there's a test payment to determine if
chrome pay/apple pay is set up and available
- canMakePayment is now called multiple times as checkout state changes
- now the results of the test payment are stored in variable, and
returned on subsequent calls
* set init flag to avoid additional attempts to init stripe API:
+ tweak naming of init flag
* lots of release process doc tweaks:
- add outcomes for all H4s (we may be able to remove some similar material from "body" content)
- mention that svn is needed
- clarify relationship to PR and PR checklist in a few places
- we have 2 docs to follow now, which could be confusing
- clarify release metadata step - this is metadata, not version number
- clarify relationship to woo core
- add dev blog post as final happy 🎉 step
* fix typo
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* stubs for bank transfer payment method
* allow merchant to disable BACS payment method
* show customised BACS title & description in checkout
* re-add entry point for BACS payment method (lost in rebase)
* Reduce specificity of some button styles
* Submit container: make it possible for themes to change the shadow color without the need to rewrite shadow values
* Use background-color instead of background property in docs
* Add docs to style the button and the submit container
* Remove border from button
* Add back state styles to button component
* Docs improvements
* Undo unncessary changes in button component styles
* Add spaces
* Split up webpack files for better readability
* Fix storybook
* Fix tests
* update progress-bar-webpack-plugin and implement better feedback
- updates progress-bar-webpack-plugin to latest version which includes more granular output of what webpack event is being processed.
- Improve asset build complete summary to include what build was completed.
* remove unnecessary s suffix
* Add back package-lock
Co-authored-by: Mike Jolley <mike.jolley@me.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Move register_block_script and get_block_asset_build_path to src/Assets/Api
* Only load block scripts in the frontend
* Fix version_compare numbers so they match 5.2.x versions
* Use register_scripts from AssetApi class
* update version number in readme.txt
* 2.9.0 changelog
* flesh out changelog + consistent punctuation
* fix changelog prefixes
* remove extraneous .
* testing instructions for 2.9.0
* tweak testing instructions - delete shortcode
* 2.9 version in package-lock
* 2.9 version numbers
* 2.9 release version in package-lock
* Bumping version strings to new version.
* add basic docs for running e2e tests
* shift common dependencies info to top, clarify iterate-test comment
* link out to wp-env docs
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* remove extra bracket, tweak wp-env docs link
* typo
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* Fix Cart test async logic
* tweak test
* refactor test to not call response twice
* add comment for why we're calling fetch twice
* fix duplicate calls
* reset empty test to normal value
* switch to mockResponse
* convert comment to todo block
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
* add e2e test for instantiating All Reviews block:
- adapted code from @senadir in-progress PR
https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/2756
* remove pptr-testing-library - not needed for this test
* Don't skip tests for the review block on < 5.3
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* modify dashicon replacements to be consistent with other icon exports
This also involved modifying the dashicon module replacement to use `cloneElement` instead of `createElement`.
* import from packages not global
* export woo icon consistent with other icons from the library
The Woo category icon was not using the Icon system and not exported consistent with other icons.
* add missing viewbox to arrowBack
* add story for icon library
* Update assets/js/icons/stories/index.js
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Remove legacy files
* Use thumbnail product image for Cart, Checkout and Reviews blocks
* Add option to toggle between full size and cropped image to the Atomic Product image block
* Add attributes to API
* Add component
* API updates to return variation data
* Update to handle updated api responses
* Working picker
* Update tests
* update test
* Use SelectControl
* Add Picker to Form Block
* Code cleanup and splitting
* Inline todos
* Update todos
* Update assets/js/atomic/blocks/product/add-to-cart/product-types/variable/variation-attributes/index.js
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* change classname and move styles within component
* Correct conditional
* Avoid nesting filters
* Remove exclude from getVariationsMatchingSelectedAttributes
* basic select styles
* remove custom select styles
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* Switch to use wp-env
* fix travis config
* fix spacing?
* doh need to install packages before starting environment!
* more fixes for errors in travis environment
* hmm still have node-git issues
* nope must use dash
* maybe it’s a caching issue (we’re caching node_modules?)
* remove configs
* add wp-env override json to gitignore
* remove obsolete scripts
* fix config in travis
* restore default env (for phpunit)
* for e2e manually set WORDPRESS_BASE_URL
* doh fix variable for wp version
* run phpunit via docker and fix WordPress version used for tests
* find out what’s going on with this thing
* don’t escape?
* doh phpunit needs dev installed from composer!
* fix versions
* looks liek we have to make sure wp db is up to date?!?
- also moves pre-configuration stuff all into one file for easier maintenance.
* see if I can get insight into what the siteurl is in the wp environment on travis
* try env setup (known that will break phpunit but possible it might fix e2e?)
* output plugin list to see what is active in travis
* try flushing rules
* do a hard fulsh
* fix argument syntax
* move things around and add pre-configuration as files so all wp commands run at once
* revert back to running each container command separately
Not sure, but this might affect permissions issues?
* maybe re-ordering before the file sync will help?
also try some configuration changes
* another attempt at travis config
In this attempt:
- map .htaccess to the server on the environment start
- try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup
* use default wp version for gute build
* refactor to run all wp commands in one go
* don’t return promise from setup function
- this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there).
* make sure we activate gutenberg plugin (previously we were just installing)
The syntax of the command was incorrect.
* try alternative syntax for installing and activating plugin