Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Conversation

tarhi-saad
Copy link
Contributor

@tarhi-saad tarhi-saad commented Aug 17, 2023

In this PR, we added style controls (i.e., Typography, colors, border styles) on the settings sidebar of the Shipping Address and Billing Address blocks.

image

Fixes #10120

Other Checks

  • This PR has either a [type] label or a [skip-changelog] label.
  • This PR adds/removes a feature flag & I've updated this doc.
  • This PR adds/removes an experimental interfaces and I've updated this doc.
  • I tagged two reviewers because this PR makes queries to the database or I think it might have some security impact.

Testing

User Facing Testing

  1. Go to the Order Confirmation on the editor side
  2. Open the Settings sidebar
  3. Select the Billing Address or Shipping Address inner block
  4. Ensure the Color, Typography, and Border style controls are available
  5. Change the style of the Block, and save.
  6. Reload the page. Ensure the changes are still applied
  7. Place an order on the client side. Ensure we have the same style on the Order Confirmation page.
  • Do not include in the Testing Notes
  • Should be tested by the development team exclusively

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Performance Impact

@tarhi-saad tarhi-saad added type: new block Applied to work that introduces a new block (typically used on an epic issue). skip-changelog PRs that you don't want to appear in the changelog. focus: global styles Issues that involve styles/css/layout structure. labels Aug 17, 2023
@woocommercebot woocommercebot requested review from a team and nielslange and removed request for a team August 17, 2023 02:51
@tarhi-saad tarhi-saad requested a review from mikejolley August 17, 2023 02:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

The release ZIP for this PR is accessible via:

https://wcblocks.wpcomstaging.com/wp-content/uploads/woocommerce-gutenberg-products-block-10633.zip

Script Dependencies Report

The compare-assets action has detected some changed script dependencies between this branch and trunk. Please review and confirm the following are correct before merging.

Script Handle Added Removed
product-tag.js react 🎉
order-confirmation-summary.js wp-block-editor, wp-blocks, wp-element, wp-polyfill, wp-primitives, wp-server-side-render ⚠️
order-confirmation-totals.js wp-block-editor, wp-blocks, wp-element, wp-polyfill, wp-primitives, wp-server-side-render ⚠️
order-confirmation-downloads.js wp-block-editor, wp-blocks, wp-components, wp-element, wp-polyfill, wp-primitives, wp-server-side-render ⚠️
order-confirmation-billing-address.js wp-block-editor, wp-blocks, wp-element, wp-polyfill, wp-primitives ⚠️
order-confirmation-shipping-address.js wp-block-editor, wp-blocks, wp-element, wp-polyfill, wp-primitives ⚠️
order-confirmation-billing-wrapper.js wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
order-confirmation-shipping-wrapper.js wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️
order-confirmation-status.js wp-block-editor, wp-blocks, wp-element, wp-i18n, wp-polyfill, wp-primitives ⚠️

This comment was automatically generated by the ./github/compare-assets action.

TypeScript Errors Report

  • Files with errors: 485
  • Total errors: 2264

⚠️ ⚠️ This PR introduces new TS errors on 12 files:

assets/js/blocks/order-confirmation/billing-wrapper/index.tsx

assets/js/blocks/order-confirmation/downloads/edit.tsx

assets/js/blocks/order-confirmation/downloads/index.tsx

assets/js/blocks/order-confirmation/shipping-wrapper/index.tsx

assets/js/blocks/order-confirmation/status/index.tsx

assets/js/blocks/order-confirmation/summary/edit.tsx

assets/js/blocks/order-confirmation/summary/index.tsx

assets/js/blocks/order-confirmation/totals/edit.tsx

assets/js/blocks/order-confirmation/totals/index.tsx

assets/js/blocks/shared/scripts/migration-from-product-collection-to-products.tsx

assets/js/blocks/shared/scripts/migration-from-products-to-product-collection.tsx

assets/js/editor-components/product-tag-control/index.js

comments-aggregator

@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2023

Size Change: +409 B (0%)

Total Size: 1.44 MB

Filename Size Change
build/order-confirmation-billing-address-rtl.css 252 B +2 B (+1%)
build/order-confirmation-billing-address.css 251 B +2 B (+1%)
build/order-confirmation-billing-address.js 1.55 kB +193 B (+14%) ⚠️
build/order-confirmation-shipping-address-rtl.css 252 B +2 B (+1%)
build/order-confirmation-shipping-address.css 252 B +3 B (+1%)
build/order-confirmation-shipping-address.js 1.56 kB +192 B (+14%) ⚠️
build/wc-all-blocks-style-rtl.css 29.6 kB +8 B (0%)
build/wc-all-blocks-style.css 29.5 kB +7 B (0%)
ℹ️ View Unchanged
Filename Size
build/active-filters-frontend.js 8.57 kB
build/active-filters-rtl.css 1.99 kB
build/active-filters-wrapper--mini-cart-contents-block/cart-button--mini-cart-contents-block/checkout-but--e791dc6c-style.js 929 B
build/active-filters-wrapper-frontend.js 7.58 kB
build/active-filters-wrapper-rtl.css 1.85 kB
build/active-filters-wrapper.css 1.85 kB
build/active-filters.css 1.99 kB
build/active-filters.js 7.51 kB
build/add-to-cart-form-rtl.css 355 B
build/add-to-cart-form.css 354 B
build/all-products-frontend.js 9.95 kB
build/all-products-rtl.css 4.39 kB
build/all-products.css 4.38 kB
build/all-products.js 41.3 kB
build/all-reviews-rtl.css 1.79 kB
build/all-reviews.css 1.79 kB
build/all-reviews.js 7.77 kB
build/attribute-filter-frontend.js 22.9 kB
build/attribute-filter-rtl.css 4.14 kB
build/attribute-filter-wrapper-frontend.js 8.01 kB
build/attribute-filter-wrapper-rtl.css 4.01 kB
build/attribute-filter-wrapper.css 4.01 kB
build/attribute-filter.css 4.14 kB
build/attribute-filter.js 13.1 kB
build/blocks-checkout.js 35.1 kB
build/breadcrumbs-rtl.css 232 B
build/breadcrumbs.css 232 B
build/breadcrumbs.js 2.15 kB
build/cart-blocks/cart-accepted-payment-methods-frontend.js 1.34 kB
build/cart-blocks/cart-accepted-payment-methods-style.js 137 B
build/cart-blocks/cart-cross-sells-frontend.js 250 B
build/cart-blocks/cart-cross-sells-products--product-price-frontend.js 2.89 kB
build/cart-blocks/cart-cross-sells-products-frontend.js 3.73 kB
build/cart-blocks/cart-cross-sells-products-style.js 137 B
build/cart-blocks/cart-cross-sells-style.js 249 B
build/cart-blocks/cart-express-payment--checkout-blocks/express-payment-frontend.js 5 kB
build/cart-blocks/cart-express-payment-frontend.js 711 B
build/cart-blocks/cart-express-payment-style.js 137 B
build/cart-blocks/cart-items-frontend.js 284 B
build/cart-blocks/cart-items-style.js 219 B
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 5.34 kB
build/cart-blocks/cart-line-items-frontend.js 1.04 kB
build/cart-blocks/cart-line-items-style.js 137 B
build/cart-blocks/cart-order-summary-frontend.js 1.24 kB
build/cart-blocks/cart-order-summary-style.js 319 B
build/cart-blocks/cart-totals-frontend.js 287 B
build/cart-blocks/cart-totals-style.js 228 B
build/cart-blocks/empty-cart-frontend.js 343 B
build/cart-blocks/empty-cart-style.js 336 B
build/cart-blocks/filled-cart-frontend.js 651 B
build/cart-blocks/filled-cart-style.js 310 B
build/cart-blocks/order-summary-coupon-form-frontend.js 1.57 kB
build/cart-blocks/order-summary-coupon-form-style.js 137 B
build/cart-blocks/order-summary-discount-frontend.js 2.04 kB
build/cart-blocks/order-summary-discount-style.js 136 B
build/cart-blocks/order-summary-fee-frontend.js 271 B
build/cart-blocks/order-summary-fee-style.js 136 B
build/cart-blocks/order-summary-heading-frontend.js 325 B
build/cart-blocks/order-summary-heading-style.js 325 B
build/cart-blocks/order-summary-shipping-frontend.js 12 kB
build/cart-blocks/order-summary-shipping-style.js 178 B
build/cart-blocks/order-summary-subtotal-frontend.js 271 B
build/cart-blocks/order-summary-subtotal-style.js 136 B
build/cart-blocks/order-summary-taxes-frontend.js 433 B
build/cart-blocks/order-summary-taxes-style.js 178 B
build/cart-blocks/proceed-to-checkout-frontend.js 1.41 kB
build/cart-blocks/proceed-to-checkout-style.js 1.09 kB
build/cart-frontend.js 29.7 kB
build/cart-rtl.css 9.71 kB
build/cart.css 9.7 kB
build/cart.js 45 kB
build/catalog-sorting-rtl.css 256 B
build/catalog-sorting.css 256 B
build/catalog-sorting.js 1.71 kB
build/checkout-blocks/actions--checkout-blocks/terms-style.js 485 B
build/checkout-blocks/actions-frontend.js 1.81 kB
build/checkout-blocks/actions-style.js 681 B
build/checkout-blocks/billing-address-frontend.js 4.3 kB
build/checkout-blocks/billing-address-style.js 531 B
build/checkout-blocks/contact-information-frontend.js 2.03 kB
build/checkout-blocks/contact-information-style.js 606 B
build/checkout-blocks/express-payment-frontend.js 1.12 kB
build/checkout-blocks/fields-frontend.js 301 B
build/checkout-blocks/fields-style.js 250 B
build/checkout-blocks/order-note-frontend.js 1.1 kB
build/checkout-blocks/order-summary-cart-items-frontend.js 3.64 kB
build/checkout-blocks/order-summary-cart-items-style.js 137 B
build/checkout-blocks/order-summary-coupon-form-frontend.js 1.73 kB
build/checkout-blocks/order-summary-coupon-form-style.js 137 B
build/checkout-blocks/order-summary-discount-frontend.js 2.22 kB
build/checkout-blocks/order-summary-discount-style.js 137 B
build/checkout-blocks/order-summary-fee-frontend.js 274 B
build/checkout-blocks/order-summary-fee-style.js 137 B
build/checkout-blocks/order-summary-frontend.js 1.24 kB
build/checkout-blocks/order-summary-shipping-frontend.js 12 kB
build/checkout-blocks/order-summary-shipping-style.js 137 B
build/checkout-blocks/order-summary-style.js 318 B
build/checkout-blocks/order-summary-subtotal-frontend.js 272 B
build/checkout-blocks/order-summary-subtotal-style.js 138 B
build/checkout-blocks/order-summary-taxes-frontend.js 433 B
build/checkout-blocks/order-summary-taxes-style.js 177 B
build/checkout-blocks/payment-frontend.js 9.13 kB
build/checkout-blocks/payment-style.js 461 B
build/checkout-blocks/pickup-options-frontend.js 4.13 kB
build/checkout-blocks/pickup-options-style.js 439 B
build/checkout-blocks/shipping-address-frontend.js 4.28 kB
build/checkout-blocks/shipping-address-style.js 475 B
build/checkout-blocks/shipping-method-frontend.js 2.59 kB
build/checkout-blocks/shipping-method-style.js 1.35 kB
build/checkout-blocks/shipping-methods-frontend.js 5.68 kB
build/checkout-blocks/shipping-methods-style.js 415 B
build/checkout-blocks/terms-frontend.js 1.51 kB
build/checkout-blocks/terms-style.js 673 B
build/checkout-blocks/totals-frontend.js 333 B
build/checkout-blocks/totals-style.js 275 B
build/checkout-frontend.js 31.6 kB
build/checkout-rtl.css 9.08 kB
build/checkout.css 9.07 kB
build/checkout.js 47.7 kB
build/combobox-control-style-rtl.css 585 B
build/combobox-control-style.css 585 B
build/custom-select-control-style-rtl.css 479 B
build/custom-select-control-style.css 479 B
build/customer-account-rtl.css 388 B
build/customer-account.css 387 B
build/customer-account.js 3.18 kB
build/featured-category-rtl.css 971 B
build/featured-category.css 970 B
build/featured-category.js 14.9 kB
build/featured-product-rtl.css 1.02 kB
build/featured-product.css 1.02 kB
build/featured-product.js 15.1 kB
build/filter-wrapper-frontend.js 14.1 kB
build/filter-wrapper-rtl.css 375 B
build/filter-wrapper.css 375 B
build/filter-wrapper.js 2.39 kB
build/form-token-field-style-rtl.css 1.23 kB
build/form-token-field-style.css 1.22 kB
build/handpicked-products.js 7.97 kB
build/legacy-template-rtl.css 238 B
build/legacy-template.css 238 B
build/legacy-template.js 8.23 kB
build/mini-cart-component-frontend.js 30.7 kB
build/mini-cart-contents-block/cart-button--mini-cart-contents-block/checkout-button--mini-cart-contents---358acf4e-style.js 249 B
build/mini-cart-contents-block/cart-button--mini-cart-contents-block/checkout-button--mini-cart-contents---a5b7fa58-style.js 930 B
build/mini-cart-contents-block/cart-button-frontend.js 1.69 kB
build/mini-cart-contents-block/cart-button-style.js 383 B
build/mini-cart-contents-block/checkout-button-frontend.js 1.77 kB
build/mini-cart-contents-block/checkout-button-style.js 465 B
build/mini-cart-contents-block/empty-cart-frontend.js 358 B
build/mini-cart-contents-block/empty-cart-style.js 355 B
build/mini-cart-contents-block/filled-cart-frontend.js 267 B
build/mini-cart-contents-block/filled-cart-style.js 267 B
build/mini-cart-contents-block/footer-frontend.js 3.77 kB
build/mini-cart-contents-block/footer-rtl.css 400 B
build/mini-cart-contents-block/footer-style.js 2.34 kB
build/mini-cart-contents-block/footer.css 400 B
build/mini-cart-contents-block/items-frontend.js 228 B
build/mini-cart-contents-block/items-style.js 228 B
build/mini-cart-contents-block/products-table--product-image--product-title-style.js 316 B
build/mini-cart-contents-block/products-table-frontend.js 549 B
build/mini-cart-contents-block/products-table-rtl.css 2.12 kB
build/mini-cart-contents-block/products-table-style.js 5.31 kB
build/mini-cart-contents-block/products-table.css 2.11 kB
build/mini-cart-contents-block/shopping-button-frontend.js 487 B
build/mini-cart-contents-block/shopping-button-style.js 396 B
build/mini-cart-contents-block/title-frontend.js 1.86 kB
build/mini-cart-contents-block/title-items-counter-frontend.js 1.58 kB
build/mini-cart-contents-block/title-items-counter-style.js 302 B
build/mini-cart-contents-block/title-label-frontend.js 1.51 kB
build/mini-cart-contents-block/title-label-style.js 301 B
build/mini-cart-contents-block/title-style.js 439 B
build/mini-cart-contents-rtl.css 2.66 kB
build/mini-cart-contents.css 2.65 kB
build/mini-cart-contents.js 17.6 kB
build/mini-cart-frontend.js 2.79 kB
build/mini-cart-rtl.css 2.56 kB
build/mini-cart.css 2.56 kB
build/mini-cart.js 6.34 kB
build/order-confirmation-billing-wrapper.js 1.4 kB
build/order-confirmation-downloads-rtl.css 331 B
build/order-confirmation-downloads.css 329 B
build/order-confirmation-downloads.js 1.39 kB
build/order-confirmation-shipping-wrapper.js 1.4 kB
build/order-confirmation-status-rtl.css 250 B
build/order-confirmation-status.css 250 B
build/order-confirmation-status.js 1.56 kB
build/order-confirmation-summary-rtl.css 360 B
build/order-confirmation-summary.css 359 B
build/order-confirmation-summary.js 1.54 kB
build/order-confirmation-totals-rtl.css 378 B
build/order-confirmation-totals.css 377 B
build/order-confirmation-totals.js 1.92 kB
build/packages-style-rtl.css 3.55 kB
build/packages-style.css 3.55 kB
build/price-filter-frontend.js 14.5 kB
build/price-filter-rtl.css 2.67 kB
build/price-filter-wrapper-frontend.js 8.57 kB
build/price-filter-wrapper-rtl.css 2.53 kB
build/price-filter-wrapper.css 2.53 kB
build/price-filter.css 2.67 kB
build/price-filter.js 8.51 kB
build/price-format.js 1.15 kB
build/product-add-to-cart--product-average-rating--product-button--product-image--product-price--product---1d132d69.js 271 B
build/product-add-to-cart--product-button--product-rating--product-rating-counter--product-rating-stars.js 150 B
build/product-add-to-cart--product-image--product-title.js 319 B
build/product-add-to-cart-frontend.js 8.5 kB
build/product-add-to-cart-rtl.css 1.35 kB
build/product-add-to-cart.css 1.36 kB
build/product-add-to-cart.js 8.54 kB
build/product-average-rating--product-button--product-image--product-price--product-rating--product-ratin--e23975b5.js 933 B
build/product-average-rating-frontend.js 1.71 kB
build/product-average-rating.js 403 B
build/product-best-sellers.js 8.32 kB
build/product-button-frontend.js 4.87 kB
build/product-button-interactivity-frontend.js 9.51 kB
build/product-button-rtl.css 1.1 kB
build/product-button.css 1.1 kB
build/product-button.js 3.88 kB
build/product-categories-rtl.css 651 B
build/product-categories.css 649 B
build/product-categories.js 2.71 kB
build/product-category.js 9.29 kB
build/product-collection.js 13.8 kB
build/product-details-rtl.css 394 B
build/product-details.css 391 B
build/product-gallery-large-image-rtl.css 295 B
build/product-gallery-large-image.css 295 B
build/product-gallery-large-image.js 2.02 kB
build/product-gallery-rtl.css 371 B
build/product-gallery-thumbnails-rtl.css 272 B
build/product-gallery-thumbnails.css 271 B
build/product-gallery-thumbnails.js 3.91 kB
build/product-gallery.css 373 B
build/product-gallery.js 6.02 kB
build/product-image-frontend.js 2.65 kB
build/product-image-gallery-rtl.css 304 B
build/product-image-gallery.css 303 B
build/product-image-rtl.css 922 B
build/product-image.css 920 B
build/product-image.js 1.51 kB
build/product-new.js 8.6 kB
build/product-on-sale.js 8.61 kB
build/product-price-frontend.js 247 B
build/product-price-rtl.css 667 B
build/product-price.css 665 B
build/product-price.js 1.66 kB
build/product-query-rtl.css 347 B
build/product-query.css 347 B
build/product-query.js 12.8 kB
build/product-rating-counter-frontend.js 2.01 kB
build/product-rating-counter.js 689 B
build/product-rating-frontend.js 2.35 kB
build/product-rating-rtl.css 244 B
build/product-rating-stars-frontend.js 2.25 kB
build/product-rating-stars-rtl.css 895 B
build/product-rating-stars.css 897 B
build/product-rating-stars.js 939 B
build/product-rating.css 244 B
build/product-rating.js 1.04 kB
build/product-results-count-rtl.css 228 B
build/product-results-count.css 228 B
build/product-results-count.js 1.66 kB
build/product-reviews-rtl.css 456 B
build/product-reviews.css 455 B
build/product-sale-badge-frontend.js 1.8 kB
build/product-sale-badge-rtl.css 369 B
build/product-sale-badge.css 370 B
build/product-sale-badge.js 672 B
build/product-search-rtl.css 415 B
build/product-search.css 415 B
build/product-search.js 2.62 kB
build/product-sku-frontend.js 1.84 kB
build/product-sku-rtl.css 237 B
build/product-sku.css 237 B
build/product-sku.js 524 B
build/product-stock-indicator-frontend.js 2.02 kB
build/product-stock-indicator-rtl.css 229 B
build/product-stock-indicator.css 229 B
build/product-stock-indicator.js 711 B
build/product-summary-frontend.js 2.18 kB
build/product-summary-rtl.css 546 B
build/product-summary.css 546 B
build/product-summary.js 917 B
build/product-tag.js 8.79 kB
build/product-template-rtl.css 418 B
build/product-template.css 418 B
build/product-template.js 3.43 kB
build/product-title-frontend.js 2.21 kB
build/product-title-rtl.css 688 B
build/product-title.css 689 B
build/product-title.js 966 B
build/product-top-rated.js 8.87 kB
build/products-by-attribute.js 9.63 kB
build/rating-filter-frontend.js 21.4 kB
build/rating-filter-rtl.css 4.2 kB
build/rating-filter-wrapper-frontend.js 6.62 kB
build/rating-filter-wrapper-rtl.css 4.07 kB
build/rating-filter-wrapper.css 4.07 kB
build/rating-filter.css 4.19 kB
build/rating-filter.js 6.88 kB
build/reviews-by-category-rtl.css 1.79 kB
build/reviews-by-category.css 1.79 kB
build/reviews-by-category.js 12 kB
build/reviews-by-product-rtl.css 1.79 kB
build/reviews-by-product.css 1.79 kB
build/reviews-by-product.js 13.1 kB
build/reviews-frontend.js 7.06 kB
build/single-product-rtl.css 375 B
build/single-product.css 375 B
build/single-product.js 11.2 kB
build/snackbar-notice-style-rtl.css 672 B
build/snackbar-notice-style.css 671 B
build/stock-filter-frontend.js 21.6 kB
build/stock-filter-rtl.css 4.01 kB
build/stock-filter-wrapper-frontend.js 6.82 kB
build/stock-filter-wrapper-rtl.css 3.88 kB
build/stock-filter-wrapper.css 3.88 kB
build/stock-filter.css 4.01 kB
build/stock-filter.js 7.6 kB
build/store-notices.js 1.69 kB
build/vendors--active-filters-wrapper--attribute-filter-wrapper--mini-cart-contents-block/cart-button--mi--d6bb29e6-style.js 605 B
build/vendors--attribute-filter-wrapper--cart-blocks/order-summary-coupon-form--cart-blocks/order-summary--48e1e4bb-frontend.js 6.84 kB
build/vendors--attribute-filter-wrapper--rating-filter-wrapper--stock-filter-wrapper-frontend.js 8.31 kB
build/vendors--cart-blocks/cart-cross-sells-products--cart-blocks/cart-line-items--cart-blocks/cart-order--3c5fe802-frontend.js 5.28 kB
build/vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542-frontend.js 3.55 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6-frontend.js 19.4 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping--checkout-block--24d3fc0c-frontend.js 8.22 kB
build/vendors--cart-blocks/proceed-to-checkout-style.js 180 B
build/vendors--checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 5.6 kB
build/vendors--checkout-blocks/shipping-method-frontend.js 12.4 kB
build/vendors--checkout-blocks/shipping-method-style.js 11.7 kB
build/vendors--mini-cart-contents-block/products-table--price-filter-wrapper--product-price-style.js 5.27 kB
build/vendors--mini-cart-contents-block/products-table-style.js 3.16 kB
build/vendors--product-add-to-cart-frontend.js 7.52 kB
build/wc-blocks-classic-template-revert-button-style-rtl.css 237 B
build/wc-blocks-classic-template-revert-button-style.css 236 B
build/wc-blocks-classic-template-revert-button.js 1.53 kB
build/wc-blocks-data.js 21.9 kB
build/wc-blocks-editor-style-rtl.css 6.39 kB
build/wc-blocks-editor-style.css 6.39 kB
build/wc-blocks-google-analytics.js 1.55 kB
build/wc-blocks-middleware.js 934 B
build/wc-blocks-registry.js 3.19 kB
build/wc-blocks-rtl.css 2.46 kB
build/wc-blocks-shared-context.js 1.1 kB
build/wc-blocks-shared-hocs.js 1.63 kB
build/wc-blocks-vendors-style-rtl.css 1.95 kB
build/wc-blocks-vendors-style.css 1.95 kB
build/wc-blocks-vendors.js 65.8 kB
build/wc-blocks.css 2.46 kB
build/wc-blocks.js 2.62 kB
build/wc-interactivity.js 10.8 kB
build/wc-payment-method-bacs.js 817 B
build/wc-payment-method-cheque.js 813 B
build/wc-payment-method-cod.js 914 B
build/wc-payment-method-paypal.js 852 B
build/wc-settings.js 2.68 kB
build/wc-shipping-method-pickup-location.js 30.4 kB

compressed-size-action

Copy link
Member

@nielslange nielslange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, @tarhi-saad. Below, I left a few comments.

Apart from the comments, I wonder why this PR is so big. I wonder because other PRs that added style controls, only touched a handful of files, e.g. https://github.com/woocommerce/woocommerce-blocks/pull/10185/files.

@@ -0,0 +1,9 @@
.wc-block-order-confirmation-shipping-address {
address {
width: 100% !important;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using width: 100% !important; instead of width: 100%; here? I'm asking as !important should only be used as last option. In this case, even when removing width: 100% !important; completely, I do not see a change on the site.

Comment on lines 9 to 14
a {
margin-right: $gap;
}
a.has-link-color {
color: inherit;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we fully utilise SCSS in the following case:

Suggested change
a {
margin-right: $gap;
}
a.has-link-color {
color: inherit;
}
a {
margin-right: $gap;
&.has-link-color {
color: inherit;
}
}

Comment on lines 23 to 26
// Remove style because its handled by the server-side render.
const { style, ...blockProps } = useBlockProps( {
className: 'wc-block-order-confirmation-summary',
} );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this part? The comment says "Remove style [...]", but the code looks like we're adding a class.

Comment on lines 18 to 20
border-style: solid;
border-color: currentColor;
border-width: 0 0 1px 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use the shorthand syntax here:

Suggested change
border-style: solid;
border-color: currentColor;
border-width: 0 0 1px 0;
border: 0 0 1px 0 solid currentColor;

Comment on lines 169 to 251
/**
* Get the frontend script handle for this block type.
*
* @param string $key Data to get, or default to everything.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return type seems to be missing here:

Suggested change
/**
* Get the frontend script handle for this block type.
*
* @param string $key Data to get, or default to everything.
*/
/**
* Get the frontend script handle for this block type.
*
* @param string $key Data to get, or default to everything.
* @return null
*/

/**
* Get a fake order for previews.
*
* @return \WC_Order Fake order.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a fullstop behind the return type. This is only required for comments, not for return values.

Suggested change
* @return \WC_Order Fake order.
* @return \WC_Order Fake order

protected function render_content( $order, $permission = false, $attributes = [] ) {
if ( ! $permission ) {
// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
return '<p>' . wp_kses_post( apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woo-gutenberg-products-block' ), null ) ) . '</p>';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your thoughts on formatting this section similar to the next one for readability-reasons:

Suggested change
return '<p>' . wp_kses_post( apply_filters( 'woocommerce_thankyou_order_received_text', esc_html__( 'Thank you. Your order has been received.', 'woo-gutenberg-products-block' ), null ) ) . '</p>';
return '<p>' . wp_kses_post(
apply_filters(
'woocommerce_thankyou_order_received_text',
esc_html__( 'Thank you. Your order has been received.', 'woo-gutenberg-products-block' ),
null
)
) . '</p>';

* @return string
*/
protected function render_content_fallback() {
// phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the purpose of // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment in this case? It seems there's no hook that needs commenting.

* @return string
*/
protected function render_summary_row( $name, $value ) {
return $value ? '<li class="wc-block-order-confirmation-summary-list-item"><span class="wc-block-order-confirmation-summary-list-item__key">' . esc_html( $name ) . '</span> <span class="wc-block-order-confirmation-summary-list-item__value">' . wp_kses_post( $value ) . '</span></li>' : '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your thoughts on splitting the code into multiple lines to increase the readability:

Suggested change
return $value ? '<li class="wc-block-order-confirmation-summary-list-item"><span class="wc-block-order-confirmation-summary-list-item__key">' . esc_html( $name ) . '</span> <span class="wc-block-order-confirmation-summary-list-item__value">' . wp_kses_post( $value ) . '</span></li>' : '';
if ( $value ) {
return '<li class="wc-block-order-confirmation-summary-list-item">'
. '<span class="wc-block-order-confirmation-summary-list-item__key">'
. esc_html( $name )
. '</span> '
. '<span class="wc-block-order-confirmation-summary-list-item__value">'
. wp_kses_post( $value )
. '</span>'
. '</li>';
} else {
return '';
}

@mikejolley
Copy link
Member

@tarhi-saad please change the base from trunk to the feature branch. That will cause the diff to be smaller (cc @nielslange)

@tarhi-saad tarhi-saad changed the base branch from trunk to feature/blockify-order-confirmation August 17, 2023 11:52
@tarhi-saad tarhi-saad requested a review from nielslange August 17, 2023 11:53
@tarhi-saad
Copy link
Contributor Author

@nielslange, @mikejolley, I changed the base branch! Now you can see only my changes!

@woocommerce woocommerce deleted a comment from github-actions bot Aug 17, 2023
@mikejolley
Copy link
Member

@tarhi-saad the default has padding but no border now:

Screenshot 2023-08-17 at 17 02 32

I think it would be good to add spacing controls (to control padding) if we're leaving the border off. I wonder if its also possible to set defaults, so we have the border and padding (as originally designed) by default?

@tarhi-saad
Copy link
Contributor Author

@mikejolley, would you mind reviewing the adjustments? I've moved the padding and border styles to the top-level HTML element rather than the address tag. This ensures that any modifications via the style controls will override the initial styles!

Copy link
Member

@nielslange nielslange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work as expected and the requirements of #10120 are met.

However, I noticed that the PR introduces various TS errors, which might be coming from the underlying branch feature/blockify-order-confirmation. In addition, all E2E tests and the JS Unit Tests are failing. Before merging this PR, we should ensure that all tests are passing.

@tarhi-saad
Copy link
Contributor Author

tarhi-saad commented Aug 18, 2023

@nielslange, thank you for the review! 🙌

However, I noticed that the PR introduces various TS errors, which might be coming from the underlying branch feature/blockify-order-confirmation. In addition, all E2E tests and the JS Unit Tests are failing. Before merging this PR, we should ensure that all tests are passing.

This PR is set to merge into the feature branch. We can proceed with the merge even if the E2E test fails, as we intend to address those failures within the feature branch itself. (See @mikejolley's status update: pdFofs-17q-p2#comment-1590)

@nielslange
Copy link
Member

This PR is set to merge into the feature branch. We can proceed with the merge even if the E2E test fails, as we intend to address those failures within the feature branch itself. (See @mikejolley's status update: pdFofs-17q-p2#comment-1590)

Sounds good, as long as we ensure all tests are green before merging the featured branch into trunk.

The wrapper border will be the one being updated. So, having another
inner border is a styling issue!
@tarhi-saad tarhi-saad force-pushed the add/10120-style-controls-for-order-shipping-billing-blocks branch from 83f6e24 to 36a7abf Compare August 21, 2023 14:22
@tarhi-saad tarhi-saad merged commit 4508fc7 into feature/blockify-order-confirmation Aug 21, 2023
@tarhi-saad tarhi-saad deleted the add/10120-style-controls-for-order-shipping-billing-blocks branch August 21, 2023 14:23
@nefeline nefeline added this to the 11.0.0 milestone Aug 28, 2023
mikejolley added a commit that referenced this pull request Sep 20, 2023
* Main block types for confirmation

* Initial blocks

* Styling and placeholders

* Make blocks experimental

* Update summary icon

* Add name/description for status block and missing text descriptions in the block.

Closes #10057

* Order confirmation: Convert Order Details Templates to Blocks (#10095)

* Move code from templates into the details block

* Details -> Totals

* Downloads block

* Sample content for downloads block

* Add block icon

* Add conversion template (#10077)

* Update inner block name

* Add default title constant

* Revert "Add default title constant"

This reverts commit 1dd3bbf.

* Add global styles for order confirmation status block (#10164)

* Implement style controls

* Prevent link color spilling over onto wrapper

* Add styles and remove class names

* Remove __experimentalWritingMode

* Add global styles for order confirmation summary block (#10179)

* Styles for summary

* Remove __experimentalWritingMode

* Add table styles for order details (#10185)

* Add table styles for order details

* __experimentalFontWeight

* Add link styles

* Handle preview link styles

* Unauthenticated views for Order Confirmation template (#10414)

* Different views by permission

* check user id matches when logged out

* Add order confirmation wrapper block (#10286)

* Add a heading wrapper block

* Register the BillingWrapper Block server side

* Fix exception 'render_content' error

* Add the Billing Wrapper Block to the template

* Fix wrong block name error

* Fix php error

* Conditionally render Billing Address within the Wrapper

* Fix parent rendering

* Clean up code (remove billing address from the template)

* Update titles, descriptions, and icons of the billing Block and inner block

* Fix broken block by removing the "parent" keyword

* Use a user-friendly title and description for the Billing Wrapper

* Update Billing Wrapper Block's title case

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Fix PHP failing unit test

---------

Co-authored-by: Mike Jolley <mike.jolley@me.com>

* Remove "thanks" for authenticated page

* Introduce shipping wrapper based on billing wrapper

Closes #10053

* Order confirmation block: Verify email address for guest customers (#10567)

* Add verify step for guest orders

* Render content to pass through block content

* Revert package changes

* Customer orders cannot use email to verify

* Add style controls for order shipping and billing address blocks (#10633)

* Order confirmation block styling (#10780)

* Add missing heading to order details

* Summary block spacing

* Update css variables

* table styles

* Inherit border styles for cells

* Alignment and address styles

* Add downloads wrapper

* Style controls

* Fix typo

* Update Download Wrapper's Icon

* Fix TS error

* Disable Download Block's server side rendering in the editor

This fixes the loading after each style change from the style controls

* Clean up Downloads render functions

* Fix client side Downloads Block's table border

* Download + Total wrappers and tables styling

* small screen

* Remove server side render for previews

---------

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>

* Shorten template description

* Update test address data

* Avoid leaking order key in permission form

* Remove todo

* Make email form required.

* Remove edit page link

* Remove empty columns from address wrapper

* Remove IIFE

* typo

* Update description to mention billing

* Adjust link scss

* Fix wrapper markup and spacing controls

* Add link preview in editor

* Add initial E2E setup for the Order Confirmation Block (#10840)

* Fix WC_DateTime check

* Move form outside of block markup

* Add additional information block (#10842)

* Add block which contains hooks

* Use skeleton for placeholder instead of illustration

* Remove duplicate methods

* Remove duplicate align tag

* Update meta styles

* Tests for order confirmation conditional blocks (#10972)

* Add tests for conditional blocks

* Move setup into test

* Add E2E to the the Order Confirmation Block (#10863)

* Add editor util functions

* Update editor template E2E test

* Add the "exact" property for consistency

* Skip test

Can't get the element in the page. More investigation needed! Skipping
for now.

* Fix "transformIntoBlocks" logic

* Add tests for logged in user

* Fix "beforeAll" config

* Confirm downloads section is visible when logged in

* Create "verifyOrderConfirmationDetails" util function

* Add logged in test case

* Add Guest user test case

* Fix editor e2e testing

* Apply a proper teardown

* Fix failing tests after logout

* Ensure we are logged in before visiting the editor

* Ensure to have shipping selected

* Wait for changes to be saved on the editor

* Ensure shipping options is selected

* Remove comment

* Ensure we are logged in before going to the admin page

* Mark the Order Confirmation as a side effect test

* OrderConfirmation blocks are not experimental

* resolve merge conflict

* Revert package lock changes

* Fix enqueue_assets

* Fix CSS 404s

* Make template tests more robust

* Fix page URL for default confirmation page

* Try afterEach to log back in

* Skip guest/logout use cases

Login out causes other tests to fail. We will implement these case when
the multiple sign in roles are introduced in the codebase.

* Remove tests requiring login out & add comments

* Remove unused util functions

* Hide confirmation blocks from post editor

---------

Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: global styles Issues that involve styles/css/layout structure. skip-changelog PRs that you don't want to appear in the changelog. type: new block Applied to work that introduces a new block (typically used on an epic issue).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add style controls for Order Shipping + Billing Address Blocks
4 participants