Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blocks-hydration-experiments blocks #80

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from
Open

Conversation

DAreRodz
Copy link
Collaborator

@DAreRodz DAreRodz commented Aug 11, 2022

As I posted in the tracking issue, I plan to write some blocks from scratch ― specifically the Checkout and inner blocks. That means creating new blocks.

This PR adds the blocks we already implemented in WordPress/block-hydration-experiments to understand better what is needed to include more blocks in the repo. This also includes the files needed to share context between blocks.

@DAreRodz
Copy link
Collaborator Author

DAreRodz commented Aug 11, 2022

Right now, it seems to work fine in the frontend, but not in the editor. It breaks when you reload a post with BHE blocks on it. 🤔

EDIT: it is this issue with the code editor. @c4rl0sbr4v0 has pointed it out below.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2022

Size Change: +10.3 kB (+1%)

Total Size: 882 kB

Filename Size Change
build/active-filters-frontend.js 7.33 kB +10 B (0%)
build/active-filters.js 7.99 kB +3 B (0%)
build/all-products-frontend.js 18.1 kB +18 B (0%)
build/all-products.js 33.8 kB -15 B (0%)
build/all-reviews.js 7.79 kB -3 B (0%)
build/attribute-filter-frontend.js 21.9 kB +13 B (0%)
build/attribute-filter.js 12.9 kB +2 B (0%)
build/cart-blocks/cart-express-payment-frontend.js 5.08 kB -6 B (0%)
build/cart-blocks/cart-items-frontend.js 299 B +1 B (0%)
build/cart-blocks/cart-order-summary-frontend.js 1.1 kB +1 B (0%)
build/cart-blocks/cart-totals-frontend.js 322 B +1 B (0%)
build/cart-blocks/empty-cart-frontend.js 347 B +2 B (+1%)
build/cart-blocks/filled-cart-frontend.js 783 B +1 B (0%)
build/cart-blocks/order-summary-coupon-form-frontend.js 2.65 kB -1 B (0%)
build/cart-blocks/order-summary-discount-frontend.js 2.14 kB -1 B (0%)
build/cart-blocks/order-summary-fee-frontend.js 273 B +1 B (0%)
build/cart-blocks/order-summary-heading-frontend.js 454 B -1 B (0%)
build/cart-blocks/order-summary-shipping--checkout-blocks/order-summary-shipping-frontend.js 6.39 kB -2 B (0%)
build/cart-blocks/order-summary-shipping-frontend.js 427 B +4 B (+1%)
build/cart-blocks/order-summary-subtotal-frontend.js 274 B +1 B (0%)
build/cart-blocks/order-summary-taxes-frontend.js 433 B +2 B (0%)
build/cart-blocks/proceed-to-checkout-frontend.js 1.15 kB +1 B (0%)
build/cart-frontend.js 47.1 kB +6 B (0%)
build/cart.js 43.2 kB -13 B (0%)
build/checkout-blocks/actions-frontend.js 1.4 kB -1 B (0%)
build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js 4.12 kB -3 B (0%)
build/checkout-blocks/billing-address-frontend.js 895 B +3 B (0%)
build/checkout-blocks/contact-information-frontend.js 2.84 kB +2 B (0%)
build/checkout-blocks/express-payment-frontend.js 5.38 kB -2 B (0%)
build/checkout-blocks/order-summary-cart-items-frontend.js 3.66 kB +1 B (0%)
build/checkout-blocks/order-summary-coupon-form-frontend.js 2.79 kB -2 B (0%)
build/checkout-blocks/order-summary-discount-frontend.js 2.26 kB -3 B (0%)
build/checkout-blocks/order-summary-fee-frontend.js 276 B +1 B (0%)
build/checkout-blocks/order-summary-subtotal-frontend.js 274 B +1 B (0%)
build/checkout-blocks/order-summary-taxes-frontend.js 432 B +2 B (0%)
build/checkout-blocks/shipping-address-frontend.js 1.03 kB +1 B (0%)
build/checkout-blocks/terms-frontend.js 1.22 kB +5 B (0%)
build/checkout-blocks/totals-frontend.js 324 B -1 B (0%)
build/checkout-frontend.js 49.2 kB -7 B (0%)
build/checkout.js 44.6 kB -17 B (0%)
build/featured-category.js 13.2 kB +3 B (0%)
build/featured-product.js 13.5 kB +10 B (0%)
build/handpicked-products.js 7.36 kB -7 B (0%)
build/mini-cart-component-frontend.js 16.8 kB +9 B (0%)
build/mini-cart-contents-block/empty-cart-frontend.js 366 B +1 B (0%)
build/mini-cart-contents-block/footer--mini-cart-contents-block/products-table-frontend.js 4.69 kB +4 B (0%)
build/mini-cart-contents-block/footer-frontend.js 6.98 kB -1 B (0%)
build/mini-cart-contents-block/items-frontend.js 236 B -1 B (0%)
build/mini-cart-contents-block/products-table-frontend.js 290 B +1 B (0%)
build/mini-cart-contents.js 22.9 kB +3 B (0%)
build/mini-cart-frontend.js 1.72 kB +1 B (0%)
build/mini-cart.js 4.58 kB -1 B (0%)
build/price-filter-frontend.js 13.1 kB -3 B (0%)
build/price-filter.js 9.03 kB +3 B (0%)
build/product-add-to-cart--product-button--product-image--product-title.js 2.66 kB +1 B (0%)
build/product-add-to-cart-frontend.js 6.95 kB +6 B (0%)
build/product-add-to-cart.js 6.88 kB +1 B (0%)
build/product-best-sellers.js 7.71 kB -2 B (0%)
build/product-button--product-category-list--product-image--product-price--product-rating--product-sale-b--e17c7c01.js 436 B -1 B (0%)
build/product-button-frontend.js 1.88 kB +1 B (0%)
build/product-button.js 1.57 kB -1 B (0%)
build/product-category-list-frontend.js 881 B +2 B (0%)
build/product-category-list.js 504 B +1 B (0%)
build/product-category.js 8.69 kB +2 B (0%)
build/product-image-frontend.js 1.89 kB +1 B (0%)
build/product-image.js 1.59 kB -8 B (-1%)
build/product-new.js 7.71 kB +1 B (0%)
build/product-on-sale.js 8.02 kB -1 B (0%)
build/product-price-frontend.js 1.9 kB +2 B (0%)
build/product-price.js 1.51 kB +2 B (0%)
build/product-rating-frontend.js 1.17 kB +3 B (0%)
build/product-sale-badge-frontend.js 1.13 kB +4 B (0%)
build/product-search.js 2.18 kB +3 B (0%)
build/product-sku-frontend.js 381 B +1 B (0%)
build/product-sku.js 381 B +1 B (0%)
build/product-stock-indicator-frontend.js 993 B -1 B (0%)
build/product-stock-indicator.js 626 B +2 B (0%)
build/product-summary-frontend.js 1.29 kB +2 B (0%)
build/product-tag-list-frontend.js 874 B -1 B (0%)
build/product-tag.js 8.09 kB +2 B (0%)
build/product-title.js 920 B +2 B (0%)
build/product-top-rated.js 7.95 kB -2 B (0%)
build/products-by-attribute.js 8.63 kB +2 B (0%)
build/reviews-by-category.js 11.2 kB +1 B (0%)
build/reviews-by-product.js 12.3 kB +3 B (0%)
build/reviews-frontend.js 7.02 kB +5 B (0%)
build/single-product-frontend.js 21.4 kB +12 B (0%)
build/single-product.js 10.1 kB -2 B (0%)
build/stock-filter-frontend.js 7.38 kB +6 B (0%)
build/stock-filter.js 7.29 kB -9 B (0%)
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--5b8feb0b-frontend.js 4.85 kB +2 B (0%)
build/vendors--mini-cart-contents-block/footer-frontend.js 6.86 kB +4 B (0%)
build/vendors--product-add-to-cart-frontend.js 7.53 kB +3 B (0%)
build/wc-blocks-style-rtl.css 23 kB +187 B (+1%)
build/wc-blocks-style.css 22.9 kB +188 B (+1%)
build/wc-blocks-vendors.js 54.9 kB +361 B (+1%)
build/wc-blocks.js 2.62 kB -1 B (0%)
build/interactive-child-frontend.js 2.52 kB +2.52 kB (new file) 🆕
build/interactive-child.js 1.19 kB +1.19 kB (new file) 🆕
build/interactive-parent-frontend.js 2.84 kB +2.84 kB (new file) 🆕
build/interactive-parent.js 1.53 kB +1.53 kB (new file) 🆕
build/non-interactive-parent.js 1.39 kB +1.39 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
build/blocks-checkout.js 17.4 kB
build/cart-blocks/cart-accepted-payment-methods-frontend.js 1.16 kB
build/cart-blocks/cart-line-items--mini-cart-contents-block/products-table-frontend.js 5.27 kB
build/cart-blocks/cart-line-items-frontend.js 430 B
build/checkout-blocks/fields-frontend.js 344 B
build/checkout-blocks/order-note-frontend.js 1.08 kB
build/checkout-blocks/order-summary-frontend.js 1.1 kB
build/checkout-blocks/order-summary-shipping-frontend.js 600 B
build/checkout-blocks/payment-frontend.js 7.69 kB
build/checkout-blocks/shipping-methods-frontend.js 4.78 kB
build/general-style-rtl.css 1.29 kB
build/general-style.css 1.29 kB
build/legacy-template.js 2.8 kB
build/mini-cart-contents-block/filled-cart-frontend.js 229 B
build/mini-cart-contents-block/shopping-button-frontend.js 288 B
build/mini-cart-contents-block/title-frontend.js 367 B
build/price-format.js 1.19 kB
build/product-add-to-cart--product-button--product-category-list--product-image--product-price--product-r--a0326d00.js 223 B
build/product-button--product-image--product-rating--product-sale-badge--product-title.js 302 B
build/product-categories.js 2.78 kB
build/product-rating.js 741 B
build/product-sale-badge.js 801 B
build/product-summary.js 921 B
build/product-tag-list.js 499 B
build/product-title-frontend.js 1.31 kB
build/vendors--cart-blocks/cart-line-items--cart-blocks/cart-order-summary--cart-blocks/order-summary-shi--c02aad66-frontend.js 5.26 kB
build/vendors--cart-blocks/cart-line-items--checkout-blocks/order-summary-cart-items--mini-cart-contents---233ab542-frontend.js 3.14 kB
build/vendors--cart-blocks/order-summary-shipping--checkout-blocks/billing-address--checkout-blocks/order--decc3dc6-frontend.js 19.1 kB
build/wc-blocks-data.js 9.87 kB
build/wc-blocks-editor-style-rtl.css 5.04 kB
build/wc-blocks-editor-style.css 5.04 kB
build/wc-blocks-google-analytics.js 1.56 kB
build/wc-blocks-middleware.js 930 B
build/wc-blocks-registry.js 2.7 kB
build/wc-blocks-shared-context.js 1.52 kB
build/wc-blocks-shared-hocs.js 1.14 kB
build/wc-blocks-vendors-style-rtl.css 1.95 kB
build/wc-blocks-vendors-style.css 1.95 kB
build/wc-payment-method-bacs.js 816 B
build/wc-payment-method-cheque.js 811 B
build/wc-payment-method-cod.js 909 B
build/wc-payment-method-paypal.js 837 B
build/wc-settings.js 2.6 kB

compressed-size-action

@DAreRodz DAreRodz mentioned this pull request Aug 11, 2022
5 tasks
@cbravobernal
Copy link
Collaborator

Right now, it seems to work fine in the frontend, but not in the editor. It breaks when you reload a post with BHE blocks on it. 🤔

Could be for this reason?

@DAreRodz
Copy link
Collaborator Author

Could be for this reason?

That must be it. I haven't noticed that I left the code editor enabled, so it crashed every time I tried to edit the post with the BHE blocks. It works with the regular block editor. Thanks, @c4rl0sbr4v0. 🙂

@github-actions
Copy link
Contributor

github-actions bot commented Aug 11, 2022

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
interactive-child.js react-dom, wp-block-editor, wp-blocks, wp-element, wp-polyfill ⚠️
interactive-parent.js react-dom, wp-block-editor, wp-blocks, wp-element, wp-polyfill ⚠️
non-interactive-parent.js react-dom, wp-block-editor, wp-blocks, wp-element, wp-polyfill ⚠️

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

@DAreRodz
Copy link
Collaborator Author

It turned out that the recent problem I'd experienced in this branch was the already-known race-condition issue. 😅

@github-actions
Copy link
Contributor

This PR has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface pull requests that have slipped through review.

If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label - otherwise it will automatically be closed after 10 days.

@github-actions github-actions bot added the stale label Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants