-
Notifications
You must be signed in to change notification settings - Fork 221
Add "Just Arrived Full Hero" commerce adjacent pattern #7812
Conversation
The release ZIP for this PR is accessible via:
|
TypeScript Errors ReportFiles with errors: 428 🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 974 kB ℹ️ View Unchanged
|
a993ba2
to
9f1fe75
Compare
LGTM - I assume that pink border on the button is coming from that theme style? |
Yup |
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.
patterns/just-arrived-full-hero.php
Outdated
* Categories: WooCommerce | ||
*/ | ||
?> | ||
<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}},"elements":{"link":{"color":{"text":"var:preset|color|black"}}}},"textColor":"black","layout":{"inherit":true,"type":"constrained"}} --> |
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.
What is the advantage of setting color for this block over using default color from theme? Beside, the textColor is set to a fixed color (black
), which make this a bit harder to use on dark themes.
I think we should use the default color from theme when possible.
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.
Agreed. I'll remove the group and that will take care of that.
patterns/just-arrived-full-hero.php
Outdated
?> | ||
<!-- wp:group {"align":"full","style":{"spacing":{"margin":{"top":"0px","bottom":"0px"}},"elements":{"link":{"color":{"text":"var:preset|color|black"}}}},"textColor":"black","layout":{"inherit":true,"type":"constrained"}} --> | ||
<div class="wp-block-group alignfull has-black-color has-text-color has-link-color" style="margin-top:0px;margin-bottom:0px"><!-- wp:cover {"useFeaturedImage":true,"dimRatio":0,"minHeight":50,"minHeightUnit":"vw","contentPosition":"center center","isDark":false,"align":"full","style":{"spacing":{"padding":{"left":"50vw"}}}} --> | ||
<div class="wp-block-cover alignfull is-light" style="padding-left:50vw;min-height:50vw"><span aria-hidden="true" class="wp-block-cover__background has-background-dim-0 has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:heading {"style":{"spacing":{"margin":{"top":"0px","right":"0px","bottom":"0px","left":"0px"}},"typography":{"fontSize":"40px","fontStyle":"normal","fontWeight":"700"}}} --> |
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.
Instead of a fixed value (40px
), should we use a preset value here?
9f1fe75
to
7c2fe48
Compare
@dinhtungdu I removed the group block which I think also takes care of the other issues you pointed out. I also tested on mobile and tablet previews and it still looks okay. |
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the |
LGTM 👌 |
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.
Tested and I can confirm the difference between the editor and front end is fixed. I left some more comments about i18n and fixed value.
patterns/just-arrived-full-hero.php
Outdated
<!-- /wp:heading --> | ||
|
||
<!-- wp:paragraph {"style":{"typography":{"fontSize":"16px"}}} --> | ||
<p style="font-size:16px">Our early autumn collection is here.</p> |
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.
This string should be wrapped in a __()
call so it can be translated.
patterns/just-arrived-full-hero.php
Outdated
<h2 id="just-arrived" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-size:40px;font-style:normal;font-weight:700">Just arrived</h2> | ||
<!-- /wp:heading --> | ||
|
||
<!-- wp:paragraph {"style":{"typography":{"fontSize":"16px"}}} --> |
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.
This is another place we use a fixed value. I think a preset value is more versatile for a pattern.
Shoot, a really great catch in i18n Tung! I've merged the other patterns but I'll update there too. |
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 for the update! This is LGTM now! 🚀
Failed test is a flaky test and should be fixed by #7839. |
28dc74c
to
eebb596
Compare
If I don't need woocommerce patterns at all, is there any way to hide them from admin? |
The "Just Arrived Full Hero" commerce adjacent patterns is a straightforward hero block that can be used as inspiration for merchants on the home page to showcase an attention grabber image with simple callout text, and button block link to whatever page they want.
cc @vivialice for design review.
NOTE: The frontend screenshots were with images that won't ship with this pattern.
Screenshots
The following screenshots were with the Twenty Twenty Three theme and the "Whisper" style.
Editor
Pattern preview in Editor
Desktop frontend
Mobile frontend
Tablet frontend
Other Checks
Testing
Automated Tests
User Facing Testing

3. Verify the pattern inserted on the page. It may look different depending on the themeWooCommerce Visibility
Performance Impact
Changelog