* Product Query: First attempt at adding patterns
* Product Query: Update patterns and the default block template
* Product Query: And new and update existing patterns
* Product Query: Adjust layout of the Minimal Product Row pattern
* Product Query: Update pattern names
* Product Query: Polish spaces between blocks inside the patterns
* Product Query patterns: Link product titles and improve spacing between product elements
* Product Query patterns: Button font-size update
* Product Query patterns: Center the pagination
* Product Query patterns: Center the pagination for the default pattern
* Product Query patterns: Remove an empty column
* Product Query patterns: Remove an empty column from the product list with 1:1 images pattern
* 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
* Add margin support on the Product Image block woocommerce/woocommerce-blocks#5671
Add margin support on the Product Image block
* fix tests
* more specific selector
* update mixin
* Product title: add support global style woocommerce/woocommerce-blocks#4965
* add specific type
* add custom save function
* Rating Product block: add support for global style woocommerce/woocommerce-blocks#4965
Rating Product block: add support for global style
* add feature flag
* fix import after merge
* fix global style css generation
* restore css for classic product rating html element
* don't apply the global style to PHP blocks
* remove registration
* fixes products by category added to cart style
fixeswoocommerce/woocommerce-blocks#5285 - View cart after adding item to cart was squeezed
in on the same line as the Add to Cart button
* fixes products by category sale price styles
fixeswoocommerce/woocommerce-blocks#5286 - sale price was underlined because of the default
styles on the used ins HTML element
* add fallback screen reader styles
* use shared blocks screen-reader styles from mixin:
- tweak mixin to align with focus-reveal style
- add new mixin for focus-reveal style, since it is coupled to
visually-hidden mixin
* Reset product list padding
* Adjust placeholder color if css variable exists
This is 2021 specific but may become more prominant.
* FIx editor button styles in 2021
* Adjust button sizes based on columns
* Adjust padding
* 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>
* 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>
* 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
* Add alignButtons handling and styling to grid-base
* Add ToggleControl and alignButtons attribute to handpicked products
* Pass alignButtons to the blocks with sharedattributes
* Add alignButtons to shared-attributes.js
* Add alignButtons to products-by-attributes block
* Add alignButtons to attributes on the PHP side
* Add alignButtons control to grid-layout-control
* Remove alignButtons from deprecated definitions
* has-aligned-buttons
* Update comment
* package lock
* Add missing escape
* Revise product structure and introduce woocommerce_blocks_product_grid_item_html filter
* Add missing block-button/price styles
* Add a themename body class to allow per-theme styling
* Add WC style dependencies so block styles are loaded last
* Styles with greater specificicity, for 2019
* Default theme styling
* SF styles
* Ensure dependencies exist
* Split sale badge HTML to allow it to be moved more easily
* Load stylesheet via WooCommerce filters to ensure they load later than core styles
* Make structure in the editor match the product lists on frontend so styles are inherited
* Remove quotes around single fontnames (linting rules)
* Ensure there is spacing between blocks
* Use parent theme name in body class
* Fix column alignment in editor by removing inline max width
* Put back block styles
* Started adding shared styles
* Update default styles/add missing shared styles
* lint errors
* fix indent
* No longer a need for shared since we're loading style.css in the editor too
* Update tests
* Add grid block base class to handle rendering all grid blocks
Using code from the shortcode handler to create the query, subclass into newest product to show use
* Update preview content to match rendering from the new grid block handler
* Fix the categories query builder
* Update order of rating/price
* Remove center alignment
* Extract rating & button into separate functions
* Wrap the content in a link
* Add the current class names for better theme support
* Fix some styling in editor preview & frontend
* Add back the deprecated cols support for existing blocks
* Add multiple-rows class, style tweaks
* Switch Newest Products to dynamic rendering, deprecate existing shortcode method
* Add “On Sale” flag
* Switch “On Sale Products” to dynamic rendering
* Fix reusable block preview
* Add correct classes to On Sale Products
* Remove dynamic blocks from CSS hidden content rules
Content is not output to browser now, so we don’t need to hide it
* Fix undefined parameters
* Fix attributes for on sale
* Add deprecation comment, use more descriptive function name
* Addressing review feedback
* Update test: classnames have changed, image now wrapped in div
* Disable HTML editing for dynamic blocks
* Moved rendering logic into block library
* Update HTML rendering for products and remove core template functions
* Update styling
* Put the wp block class back
* Remove style import
* Move container classes to div not the ul
* Remove visibility classes
* Avoid rending non-visible items
* Revert style additons for visbility
* Fix CSS now that class names have shifted
* Add grid block base class to handle rendering all grid blocks
Using code from the shortcode handler to create the query, subclass into newest product to show use
* Update preview content to match rendering from the new grid block handler
* Fix the categories query builder
* Update order of rating/price
* Remove center alignment
* Extract rating & button into separate functions
* Wrap the content in a link
* Add the current class names for better theme support
* Fix some styling in editor preview & frontend
* Add back the deprecated cols support for existing blocks
* Add multiple-rows class, style tweaks
* Switch Newest Products to dynamic rendering, deprecate existing shortcode method
* Add “On Sale” flag
* Switch “On Sale Products” to dynamic rendering
* Fix reusable block preview
* Add correct classes to On Sale Products
* Remove dynamic blocks from CSS hidden content rules
Content is not output to browser now, so we don’t need to hide it
* Fix undefined parameters
* Fix attributes for on sale
* Add deprecation comment, use more descriptive function name
* Addressing review feedback
* Update test: classnames have changed, image now wrapped in div
* Disable HTML editing for dynamic blocks
* Moved rendering logic into block library
* Remove unnecessary !important on styles
* Component: GridContentControl for controlling visibility of product content
* Add the content control to all grid blocks
* Use CSS to hide the content on the front end
* Fix missing translation functions