* 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
* Make loading placeholder colors match the current font color
Currently, the loading placeholder effect has a default gray color. However, since users can modify their themes with the Site Editor and choose a different set of colors for their websites, it would be interesting to make those placeholders match the color palette.
In this commit, the idea was to modify the `placeholder` mixin to replace the transparent font color with the current color and also modify the background-color and the linear-gradient to match the current font color. Furthermore, transparency was added to the middle color of the linear-gradient so we can keep the loading animation close to what it currently is.
* Add opacity to placeholder mixin
Before our changes, when the font color was dark, we had a lighter placeholder background color. After the changes the color is currently darker than before so the idea for this commit is to change the opacity of the placeholder in a way that the current color blends with the background color set for the theme.
* Change placeholder mixin opacity
After testing different combinations of colors, we decided to change the opacity to 0.15 so when the font color is darker the placeholder will have a lighter background color.
* bot: update checkstyle.xml
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Set default style to link-button mixin
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
* Add new mixin for links in filter blocks
* Revert change to link-button mixin to prevent it to affect link buttons on Checkout page
* Add filter-link-button mixin that can be used in filter blocks
* Remove link-button styles that were moved to filter-link-button mixin
By default, link-button mixin styles should have only styles from the text-button mixin and also be underlined.
The styles for link button in filter blocks should reside in filter-link-button mixin.
It was identified that we currently have 3 different behaviors for links used in the application. In issue woocommerce/woocommerce-blocks#1778, it was discussed a set of good practices that we should follow in order to obtain consistency between links.
Currently, the link-button mixin is already used by the 'Clear all' button in the Active Filters block, so the idea was to increment it with a common pattern (font size small, font-weight normal, underlined by default and not underlined when on hover) that can be reused by other components (for example FilterResetButton).
* Change link-button mixin to make it attend the expected default style for links
* Replace text-button with link-button mixin in FilterResetButton component
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.
* Add support for overlay color and duotone
* Add support for custom inner padding
* Wrap all block experimental features in `isFeaturePluginBuild`
* Fix resizable container min height
The container now resizes if, e.g., padding is increased, and can't be resized down
with the handle to a height lower than it's minimum size determined by content and
padding box.
* Fix resizable handle not being fully visible
Previously, `overflow: hidden` was needed because the height constraint and
padding could push the content out of the container. Now this should not be
possible.
* Add an option to the block to decide how is the image fitted to the container
* 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
* Remove atom icon
* Swap icon usage to WordPress package
* remove unused icons from library
* Use @wordpress/primitives
* Product cats block to listView
* On-sale to use percent instead of tag icon
* add to cart button use button icon
* on sale products block icon
* Handpicked products use stack icon
* Products by stock box icon
* Make sparkles woo purple
* Fix icon name
* Correct more tag name
* fix path to icons
* Update snaps
* Update readme to explain updated usage
* Import SVG and path from primitives
* Missing isFeaturePluginBuild
* Update assets/js/icons/README.md
Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
* Update assets/js/icons/README.md
Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
* Update assets/js/icons/README.md
Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
* update lock
Co-authored-by: Raluca Stan <raluca.stan@automattic.com>
* Update icon of legacy template block
* Display legacy block template color in Woo purple
* Display icons in white when block being selected within list view
* Add Drawer component
* Use element dataset instead of a window global
* Rename miniCartOverlay to miniCartDrawerPlaceholder
* Refactor styles so screen overlay covers the entire screen
* Use rem instead of em for the drawer title size to keep it consistent between renders
* Keep focus when replacing the mini cart button
* Match overlay colors from designs
* Use is-loading class like several other blocks
* Add more doc comments
* Don't listen to clicks on Mini Cart button when it's open
* Update Drawer component styles
* 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
* Update cart/coupon/shipping design
* Add order summary heading
* Move and style discounts on checkout sidebar
* Add rate to tax lines
* Ensure the option to display taxes itemised is available to Cart block
* Output individual tax items below the total & add styles for this
* Add success notice under coupon input on successful coupon addition
* Add border to bottom of Totals footer
* Show success message when adding coupon
* Add padding to cart item rows
* Add preview data to cart for when taxes are enabled
* Add rate to cart response type
* Add showRateAfterTaxName attribute to Cart block
* Add control to cart block to show rate percentage after rate name
* Add rate % in cart totals only if option is toggled on
* Pass showRateAfterTaxName attribute down to TotalsTaxes
* Add showRateAfterTaxName to Checkout block
* Add control to block editor for showRateAfterTaxName on Checkout
* Pass showRateAfterTaxName down to TotalsTaxes in Checkout
* Change label for showing tax rates in cart and checkout blocks
* Add test to ensure Taxes section shows in Cart block
* Add tests for cart sidebar and rate percentages
* Remove order summary title from checkout sidebar
* Check if taxes are enabled before rendering the option to show rate %s
* Add ShippingVia component to show the selected rate in sidebar
* Remove value from individual tax rates
* Remove bold from Shipping via label
* Remove coupon added successfully message
* Ensure panel headings that are h2s are the same colour as others
* Clean up eslint warnings
* Show rate %s by default
* Update snapshots following design changes
Co-authored-by: Mike Jolley <mike.jolley@me.com>
* update input colors for dark and light mode + tweak padding and alignment
* update light input dropdown text color
* Fix lint errors
* Fix package lock.
* Use input-text-active for select options
* Make sizes responsive in radio control
* Unify border colors of text inputs, checkboxes and radio controls
* Unify radio control sizes in mobile/desktop
Co-authored-by: David Levin <davidlevin@Davids-MacBook-Pro-2.local>
Co-authored-by: budzanowski <bartosz.budzanowski@gmail.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* 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
* Update @wordpress/components and @wordpress/base-styles
* Fix JS warning in Select/downshift
* Remove color definitions that are now imported from @wordpress/base-styles. Fixeswoocommerce/woocommerce-blocks#3311
* Use -unit values from @wordpress/base-styles. Fixeswoocommerce/woocommerce-blocks#3313
* Update snapshots
* Fix payment methods test
* Don't extract dependencies that are not available in WP 5.3
* Avoid extracting @wordpress/compose since last version doesn't have resize observer
* Remove unnecessary uses of @wordpress/compose in a frontend scripts
* Add missing spaces
* 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
* 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
* 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
* 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
* 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