* revert changes to webpack file
* fix loading of chunks
* revert changes to assets api as well
* include chunks from other blocks
* bail early if there is no build folder
* Start using the block.json metadata file for `Products by Tag`
* Remove comment
* Add version, schema, and text domain
* Add defaults
* Remove wrong keyword
* Add tag icon when registering the block
This PR creates a new directory called `featured-items` which includes both blocks.
All the shared code lives at the top level of that directory.
Individual blocks still have their own directories, with their `block.json` and all other relevant configuration.
All the functionalities have been refactored out into their own files, accepting configuration when relevant, but mostly de-duplicating all the code.
Styles have also been refactored using mixins and extends and they mostly live in one place.
* Start using the `block.json` metadata file for `Handpicked products`
* Add the `properties` attribute to properly parse booleans
* Remove comment
* Add schema, delete version
* Start using the `block.json` metadata file for the `Featured Category` block
* Get default attributes from the `block.json` file
* Remove unnecessary `get_block_metadata_defaults` function
* Add alt attribute to the block.json file
* Remove unused imports
* Start using the `block.json` metadata file for the `Feature Product` block
* Get default attributes from the block.json file
* Add removed comment
* Remove unnecessary `get_block_metadata_defaults` function
* Add alt default to block.json
* upgrade wordpress/scripts to 22.3
* update jest config/setup
* add explicit-exports-references plugin
to handle payment-method-config.tsx spying on external methods
the way code is output now changed and tests like this would not
work anymore as transpilet files were no longer using exports but
local references to methods.
* missing snapshot
* make cart-products E2E test more stable
* surppress eslint error in test file
* fix css stylelint issues
* update eslint-plugin-woocommerce eslint package
* remove temp test:e2e:start script
* re-run
* add stylelint as recommended extension
* remove redundant types (provided by packages now)
* patch update @testing-library/jest-dom
* Update storybook to 6.3.6
* @storybook/addon-knobs
* Remove need for wordpress-compose imports
This functionality exists in WP 5.5 so we don't need to import the package any more.
* Update to latest non 17x packages
* Composer update
* Fix for @babel/plugin-proposal-nullish-coalescing-operator and spinner style
* onSelect was called before init
* Add back env
* Update locks
* Revert browserlist config increase (ie11 support dropped needs separate discussion)
* update locks
* SVG can come from the external
* Import from components package where possible (5.5 has Gutenberg 9.2.0) and revert component package version change
* Revert component imports. Import from wordpress-components in the frontend context. This removes `wp-components` dependency from all -frontend asset files.
* Tidy and document current configs
* Add terser package
* sharedConfig with Terser plugin setup
* replace todo
* revert change to alias
* Package lock update
* ci to install
* Revert "ci to install"
This reverts commit a65b7f3ca8ef8ab1cb78f825a43ca8df07f784bb.
* revert shared config
* fix extra comma
* tweak setup
* Missing jsx
* Add isCompact prop to components using SearchListControl
* Update @woocommerce/components to 6.1.2
* Remove legacy CSS code
* Add some CSS rules to override conflicting editor styles
* Replace showCount prop with has-count class name
* Create ExpandableSearchListItem component
* Refactor ProductControl so it uses ExpandableSearchListItem
* Update @woocommerce/components to 6.2.0
* Fix @woocommerce/components builds breaking
* Fix a11y of expandable item list children
* Set categories to an empty array by default
* Render compact control in Attribute filter sidebar
* Add countLabel to ProductAttributeTermControl
* Fix ProductTagControl selected items
* Use sentence case for countLabel
* Fix wrong margins in block editor
* Fix checkbox alignment
* Update package-lock.json
* Fix withCategories test
* Fix JS error in Filter Products by Attribute block
* Make input ids unique
* Fix circular dependencies in Icons package
* CircularDependencyPlugin
* Fix deriveSelectedShippingRates CD
* Move useStoreNotices to context/hooks
* Move useStoreCart to base/context/hooks
* Move useStoreEvents to base/context/hooks
* Move collection/product hooks
* Move useStoreAddToCart
* Move useCustomerData
* move shipping hooks
* Move checkout and payment hooks
* Context should import hooks with relative paths
* Prevent circular dependency in store notices container components
* Move address fields to settings so they are shared
* Import PaymentMethod components direct
* relative import
* Fix select CD
* Move ValidationInputError
* Move components consumed by context
* Fix up internal imports in context
* fix CD in checkout package
* Separate providers
* Fixing context exports
* Fix base context hook import
* fix mocks
* Pass hooks to Slot Fills as Fill Props to avoid imports from base-context
* Export components, not hooks
* Pass props to ExperimentalOrderMeta
* Run CD plugin when using `npm start` only
* Rename CIRCULAR_DEPS to CHECK_CIRCULAR_DEPS
* Remove duplicate key from rebase
* Move packages component back to main file
* Remove dashicon module replacement
* Restore SVG import from package not external
* Move core locale handling to avoid impact settings package size
* Remove deleted file from rebase
* Remove item and change quantity doAction hooks
* Cart event
* Event/Action system for cart events
* GA implementation
* Revert some unrelated commits
* revert change
* Listing impression config for all products
* Category support
* remove unrelated change
* Remove listype and block import
* wrap action in try catch
* Tidy
* Only load analytics scripts in experimental builds
* Made console log more specific
* Wrap script reg in experimental check
* add typescript support
* Add type declarations for Cart and CartResponse interfaces
* make sure we’re resolving .ts files as well as .js files on imports
* add more types
* type the cart data store
* Apply suggestions from code review (implement .tsx in configs)
Co-authored-by: Jon Surrell <jon.surrell@automattic.com>
* remove global fetchMock declaration and directly import where used.
* rename type
* remove named action types and just infer by returning action creator values as const
* use interface instead of type
* rename
* renames
* create CartAction type as union of action creator returned types and implement in reducer
* remove unused imports
* refresh package-lock after rebase
* Add base TS config that projects will inherit from
* Add tsconfig for assets/js/data project
* Ignore TS error on cart store registration
We will address this in cooldown when we have time to investigate further
* Add tsc to build step to catch TypeScript errors
* add a separate command for tsc and tweak build command to use
* restore checkJs and allowJs values in config and remove ts check from build command
* Add ts:check-all command
* Add TypeScript checking workflows
* Change triggers for TypeScript workflow
* Use npm ci instead of npm install
* Remove ts:check-all from TypeScript workflow
* Remove TS Check GitHub workflow
* Remove type-defs dir from TS include, and remove ts:check-all script
We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work.
* fix coupon loading issues
* include .ts files only from type-defs folder
Co-authored-by: Jon Surrell <jon.surrell@automattic.com>
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* add circular dependency check and fix it
* only throw error
* udpate error message
* only throw on production
* better defaults
* add variable to travis
* double echo
* echo with -e
* add plugin area
* add invisible errorBoundary
* introduce slot
* change name to OrderMeta
* fix rebase
* wip
* create checkout file
* Import ExperimentalOrderMeta from @woocommerce/checkout
* Rename wc-checkout-packages handle to wc-blocks-checkout
* Only import wc-blocks-checkout in the feature plugin
* Move checkout package to packages folder
* Add @woocommerce/blocks-checkout to tsconfig
* Move TotalsItem to @woocommerce/checkout
* Use Fragment short syntax
* Remove example code
* Honor renderError prop in BlockErrorBoundary
* Rename error boundary
* Add example code
This reverts commit 9b6af7178cbef05589779ef7f5a750d53e7fc8cf.
* Revert "Add example code"
This reverts commit 2f50349692f53c5bb143516365eee7a98d580dfd.
* Add @woocommerce/blocks-checkout to jest config
Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
* convert eslint config to use @woocommerce/eslint-plugin
- removes unnecessary dependencies
- adds e2e-tests/specs to eslint ignore (they are automatically generated)
- turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review).
- NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now.
* prettier fixes.
* remove obsolete plugin and fixes for eslint update
This branch brings an update to eslint which also changes some syntax with plugins. So this commit:
- fixes featuer-flag plugin syntax.
- removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration.
* add to-do comment
* fixes for test runs
- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.
* fixes for test runs
- this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run.
* include prettier alias as a dependency
This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import.
* another attempt at e2e-test-fix
* add some debugging and temporarily just add one e2e config test for travis
* more debugging
* try installing full puppeteer and see if fixes
* fix package-lock?
* setupSettings separately from other fixture loading
* add debugging of files
* add another console.log (hopefully trigger travis)
* split out blockPage creation to it’s own as well
* fixed! remove debugging and re-enable travis configs for entire test suite
* fix config and rename e2e-tests to e2e
- fixes the failing product-search test
- tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well).
* add todo for some eslint properties
* remove unnecessary early function execution
* revert earlier commit and remove duplicate call to createBlockPages
* mass-rename js/components => js/editor-components & update webpack
* mass-change import '@woocommerce/editor-components' +
+ jsprettier quotes fix
* more mass-rename @woocommerce/editor-components
* fix up references to js/editor-components in various places:
- docs/readmes
- jest config
- typescritp config
* fix story path to match new folder/alias 'editor-components'
* fix jest tests: use new alias for editor-components
* include renamed `editor-components` in editor stylesheet cache group
* 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>
* 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>