This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
Add single product block #8610
Merged
thealexandrelara
merged 97 commits into
trunk
from
feat/add-single-product-block-server-side
Apr 6, 2023
Merged
Add single product block #8610
Changes from 95 commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
a963247
Add block minimal structure
thealexandrelara 150e090
Add Single Product block icon
thealexandrelara c4376f3
Add usesContext to block.json
thealexandrelara f168cf8
Add Save function to Single Product Block registration settings
thealexandrelara 558da33
Add InnerBlocks template to Editor for Single Product Block
thealexandrelara 270ed81
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara cf5e905
Add Product selector to Single Product block
thealexandrelara ad7b3d1
Add withProduct HOC to the block editor
thealexandrelara bddcba8
Add save function to the Single Product block
thealexandrelara f7ffd01
Add renderOnServerSide attribute to Product image
thealexandrelara 85975ee
Add renderOnServerSide attribute to Product Category List block
thealexandrelara 9683707
Add renderOnServerSide attribute to Product Price block
thealexandrelara aea6171
Add renderOnServerSide attribute to Product Rating block
thealexandrelara 810e578
Add renderOnServerSide attribute to Product Stock Indicator block
thealexandrelara af44329
Add renderOnServerSide attribute to Product Summary block
thealexandrelara 134673c
Add renderOnServerSide attribute to Product Tag List block
thealexandrelara 44f8d48
Add renderOnServerSide attribute to Product Title block
thealexandrelara c597452
Add renderOnServerSide attribute to Product Add to Cart, Sales Badge …
thealexandrelara 2b2e967
Reuse editor code for Single Product block
thealexandrelara e8f0485
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 6aa5dcd
Add Props interface to Single Product Server Side Editor
thealexandrelara b662d51
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara a9865ab
Add render_block_context hook to SingleProductServerSide block
thealexandrelara b926dbc
Fix Single Product Server Side block that was not appearing in the bl…
thealexandrelara 09d22b9
Fix bug where the correct product was not being displayed on the fron…
thealexandrelara b41c45d
Remove Single Product Block
gigitux d48885e
Merge branch 'trunk' into fix/remove-single-product-block
gigitux 7ce210b
Add Product title and product summary variations
thealexandrelara daeb00c
Add Add To Cart Form and Product Meta blocks to the Single Product Block
thealexandrelara bdc22ad
remove more files that belong the Single Product block
gigitux c57f265
Merge branch 'fix/remove-single-product-block' of https://github.com/…
gigitux 8298400
fix php linter error
gigitux 321b3d7
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-bl…
gigitux 79b86bc
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 5492bd5
Merge branch 'fix/remove-single-product-block' into feat/add-single-p…
gigitux 4fffeb5
wrap up Single Product Block
gigitux 2567373
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 5cf6e9e
Fix issue preventing the block from working on the Single Product Tem…
thealexandrelara 9af8b21
Fix update context function for Single Product block
thealexandrelara 422423b
Replace Single Product block title
thealexandrelara 2c2b34b
Replace global $post only for Single Product inner blocks
thealexandrelara 5b2334a
Remove unnecessary var_dump statement
thealexandrelara 15f46e8
Improve documentation for the Single Product block
thealexandrelara e32db09
fix registration: add-to-cart-form and product-meta blocks
gigitux aabd3f2
Improve documentation for Single Product block
thealexandrelara 8d9f3bd
Fix lint error related to imports
thealexandrelara 583e49e
Remove query monitor debug code
thealexandrelara b28d10e
Remove unnecessary `renderOnServerSide` attribute from product elements
thealexandrelara 650cb93
Fix return type for the Save function of the Product Elements blocks
thealexandrelara 4c93233
Fix return type for the Save function of the Product Title block
thealexandrelara 0a94903
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara b5a6591
Add scss file for Single Product block
thealexandrelara 815f6d1
Fix PHP coding standards
thealexandrelara 317145e
Fix php coding standards
thealexandrelara 9b024ce
Remove internal dependencies section duplication
thealexandrelara b877f79
Replace .wc-block with .wc-block-editor- styles
thealexandrelara adbe4e9
Solve style for the Edit card component in the Single Product block
thealexandrelara 14c87c7
Fix error preventing Block Control from being displayed
thealexandrelara 64aec59
Make the Product title to be a link by default
thealexandrelara 7dfa554
Fix PHP Coding Standards
thealexandrelara 3596e22
Fix PHP Code Standards
thealexandrelara 930a814
Fix php cs issues
thealexandrelara 9095527
Fix issue with php cs
thealexandrelara 07ab19e
Remove unnecessary comment
thealexandrelara b97bd02
Remove unused Icon import
thealexandrelara e3fe1c0
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara ecaadec
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 3b66307
Remove unnecessary dot from the className attributes in the Single Pr…
thealexandrelara 3610324
Replace metadata.name with metadata.title in the Editor file
thealexandrelara c9233af
Ignore phpcs rule
thealexandrelara 83bb365
Add new attributes to the Attributes interface of the Price block
thealexandrelara 6d9dab8
Fix typescript errors on the Product Meta block
thealexandrelara 6e6ecd8
Fix ts errors on Single Product editor
thealexandrelara 8cc11a4
Fix ts errors on layout-editor.tsx
thealexandrelara 561dc19
Fix ts errors in Single Product index file
thealexandrelara 9f83f35
Fix ts errors on add to cart form index file
thealexandrelara f77ecee
Fix unsupported block error when using inner blocks outside the Singl…
thealexandrelara 2f824f3
Fix unsupported block error for the Single Product block when editing…
thealexandrelara 675f3b1
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara b87d0a5
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara fe807b9
Remove unnecessary JSDoc types
thealexandrelara 31ad081
Remove unnecessary APIError component
thealexandrelara cd9f9f8
Replace global $post only when rendering a `core/post-excerpt` block
thealexandrelara 8bb4d52
Fix php cs errors
thealexandrelara 667827c
Put the Single Product block behind an experimental flag
thealexandrelara dadf2dc
Fix error occurring when trying to access ancestor of an undefined bl…
thealexandrelara d32d65e
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 7d61f35
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara ab6a2bb
Remove JS Doc from shared-product-control.tsx
thealexandrelara e39d65e
Fix single-product-frontend.js 404 error
thealexandrelara 1e90f34
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 70dfe54
Fix error 'Block names must be string' when adding Single Product block
thealexandrelara 5703ec1
Add todo comment to state the temporary solution used in the Single P…
thealexandrelara c1bd5dc
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara 93e8698
Merge branch 'trunk' into feat/add-single-product-block-server-side
thealexandrelara a7f84c7
Move the wp_reset_postdata outside the block name check condition
thealexandrelara 70f2892
Add comments about why we need to unregister the block on Single Prod…
thealexandrelara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment be removed, now? Or what's missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Luigi was working on this component, I think he mentioned that this comment was there because in the future we could think about displaying the image for the selected product instead of the image placeholder; perhaps we should create an issue and remove the comment? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc'ing @gigitux for his thoughts on this. ☝️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least, for now, we decided to use the
Product Imageblock for the Single Product Block. In the future, we should add support for theProduct Image Gallery. (we don't have a dedicated roadmap) - related discussion ( p1678382112656919-slack-C02FL3X7KR6).It makes sense to open an issue and link it in this comment. What do you think?