This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
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.
Can we move it to css at https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/d67e5191f0265a9ea8eb02aa274b9d3f459335ff/assets/js/blocks/cart-checkout/mini-cart-contents/editor.scss#L1-L6
We already have the
max-width
styles and other editor specific styles living there.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.
@tomasztunik Hey there 👋🏽 , #5813 is caused by a race condition related to loading CSS files. When we switch to edit the Mini Cart template part, the Site Editor calculates the height of the editor based on the height of template content, the editor style of the Mini Cart Contents block hasn't been loaded yet, which causes the issue we're fixing in this PR. I have to use the inline style to avoid the race condition so the Site Editor can calculate the correct height every time the template part is loaded.
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.
On
trunk
, if you switch back and forth editing the template part, the editor height is correct the second time.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.
Ah, I see. I didn't understand the full context properly. Would it be worth to document it with a comment so whoever stumbles upon it doesn't move it to styles in the future?
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.
@tomasztunik I added the comment explaining the usage of the inline style.
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.
thanks!