* 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
* Product Categories List: add a placeholder on save
This is saved to the database so that we have a placeholder view while waiting for the categories component to render.
* Use `classList.remove` for better readability
Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>
* Add the hierarchy display to the dropdown
* Add navigation for when a category is selected in the dropdown
* Use forEach from lodash for ie11 compat
* Switch to a button-click navigation pattern for better keyboard support
* Try the hidden attribute on option
* Add `isPreview` prop to be used when in editor preview
* Add product category link to the categories object
* Add the link to the `a` if we're not in the preview mode
* Add initial work for Product Categories List block
* Add empty category toggle
* Add option to show list as a dropdown
* Fix console warnings
* Only show proptypes linter warning if the component declares proptypes
* Add frontend script to render the product categories
* Split wcSettings & wc_product_block_data globals so that the later can be used from the frontend
* Remove wp dependencies, these are added by the webpack script now
* Capture all "woo packages" into a separate script chunk
These require `wcSettings`, which can't be available on the frontend - but we do need vendors on the frontend.
* Rewrite component into a function
* Fix validation error on editor reload
* Use the `name` prop in place of writing out the string
* Pull out `orderby` schema into reusable function
* Correct version tag
* Extract some more schema property defs into shared functions
* Move the `print_script_settings` function so the schema-related functions follow the block registration
* Set all the schema functions to be `protected`
* Remove version tags from docs
* Fix default rows fallback value
* Move the contentVisibility schema into a separate function
This attribute is common even amongst blocks that don’t use shareAttributes, so we should make it reusable
* Add dynamic rendering + SSR to Hand-picked Products block
* Add block deprecation
* Update the posts_per_page to include all selected products
* remove php insertion of block category
* Add an SVG icon for the woo logo
* Add block-category.js to import into blocks
This creates the category icon complete with a Woo SVG icon
* Import block-category to all blocks that use it
* Style woocommerce blocks in woo purple
* Lint error
* fillRule case
* Update propTypes
* Use foreground prop instead of css
* Convert Woo Logo to ICON type component
* Add shared blocks.js to house the category code
* Calculate width from height
* 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
* Try using ServerSideRender component for preview
* Define the schema for contentVisibility
This ensures the API correctly uses boolean instead of “true”/“false” strings
* Move the star rating CSS to the general grid-blocks section
* Remove the list styling, which is added back by core GB styles
* Fix stylelint issues
* 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
* Add FocalPointPicker to featured product block
* Disable the media icon if no product is selected
* Use the focal point on the frontend display
* Check for `FocalPointPicker` before using it (compat for WP 5.1)
* Check if focalPoint attribue is an array before trying to use it
Checking the feature plugin version on `init` ensures the constant is defined before we get to it, which is not guaranteed in `__construct` due to potential different load orders.
* Move query path into constant
* Add catalog size as a preloaded setting
* Pass a search callback to SearchListControl
This will limit the number of products loaded, and update the product list via an API call, when there are over 200 products
* Extract the API requests into a separate file
* Fix proptype warning
* Only trigger the selected request if there are selected products
* Add new `@wordpress/*` dependencies from wc package bumps
* Move the "large catalog" check to the server side
* Update to components@2.0.0
* Update grid blocks preview to match width of products on the front end
* Remove max-width from CSS, set it on the preview itself so we can use the dynamic theme width
* Override block thumbnail width for multiple column layouts
Previously larger thumbnails would cause multiple column layouts to break and wrap early. This enforces the column width for those cases
* Add the thumbnail size to images, to prevent larger images in multiple col layouts
* Update snapshot to new preview markup
* Category block: open category panel when no categories
When no categories are selected, open the category panel on initial
render.
* Add check for editMode
Don't open categories if in edit mode because the block itself has a
category selection.
* Move block rendering class into assets
* Update package.json for npm
* Move script registration into publish-able file
* Fix phpcs issue
* Add note about source of file
* Add wcSettings back in
* Rename files to match class name
* Add languages & includes back, so we can use this for publishing zip files
* Update documentation, versions, and add hook for wc components settings
* Update wcSettings output to use fitler
* Update version to `alpha`
* Make block library class into a singleton
* Remove legacy block
This removes the legacy products block and sets the version to
v2.0.0-dev
* Remove legacy product block test
* Update plugin header version