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

Archeo: Add Layered images with headline pattern #5468

Merged
merged 11 commits into from
Feb 8, 2022
Merged

Conversation

mikachan
Copy link
Member

@mikachan mikachan commented Feb 7, 2022

Changes proposed in this Pull Request:

This adds the 'Layered images with headline' pattern for Archeo. I've used a full-width cover block with nested columns and then used spacer blocks to move the text and image down.

The background image is 861KB (it's a transparent png) - is this too large? (Part of #5477)

What should the alt text for these images be?

Related issue(s):

#5429

@mikachan mikachan added the [Theme] Archeo Automatically generated label for Archeo. label Feb 7, 2022
@mikachan mikachan added this to the Archeo milestone Feb 7, 2022
@mikachan mikachan self-assigned this Feb 7, 2022
@mikachan mikachan mentioned this pull request Feb 7, 2022
9 tasks
@mikachan mikachan marked this pull request as ready for review February 7, 2022 16:00
@mikachan mikachan requested review from kjellr and a team February 7, 2022 16:01
Copy link
Contributor

@jffng jffng left a comment

Choose a reason for hiding this comment

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

The code / blocks used make sense to me, I left some comments about the design.

<!-- /wp:spacer -->

<!-- wp:paragraph {"style":{"typography":{"textTransform":"uppercase","fontStyle":"normal","fontWeight":"300"}},"fontSize":"huge"} -->
<p class="has-huge-font-size" style="font-style:normal;font-weight:300;text-transform:uppercase">' . wp_kses_post( __( 'Palais Du <br>Cirque, à Chichen-Itza, bas-relief<br>des tigres.', 'archeo' ) ) . '</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

The font-size doesn't appear to match the comps (100px). Also I think the line height needs to be adjusted to 1.

Copy link
Member Author

Choose a reason for hiding this comment

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

I went with the largest font size we've set in theme.json, which is 72px (huge), but maybe we should set the font size manually here so it matches the comps? The problem with this is that it won't be dynamic/responsive, and 100px is pretty big at mobile. I've changed it for now so we can test it.

The adjusted line height looks much better, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

I've just made the font size responsive in the same way you did here, which I think works well!

return array(
'title' => __( 'Layered images with headline', 'archeo' ),
'categories' => array( 'pages' ),
'content' => '<!-- wp:cover {"url":"' . esc_url( get_template_directory_uri() ) . '/assets/images/palais-du-cirque-bg.png","dimRatio":0,"overlayColor":"background","contentPosition":"center center","isDark":false,"align":"full","style":{"spacing":{"padding":{"top":"0px","right":"0px","bottom":"0vw","left":"7vw"}}}} -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this pattern meant to take up the full page height i.e. 100vh?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah probably, I've added this. Thanks!

@kjellr
Copy link
Contributor

kjellr commented Feb 8, 2022

Is it possible to get the image on the right to stick to the right side, even on larger screens?

Screen Shot 2022-02-08 at 9 08 19 AM

Also, the font weight is set correctly, but it's way heavier than the comps. I know we addressed this once, but we might need to take another look in a separate ticket.

@mikachan
Copy link
Member Author

mikachan commented Feb 8, 2022

In my testing, the image seems to stick to the right side at large screens on the front end:

image

But in the editor, I've still got a gap between the image and the edge:

image

I think this is related to the div that's added on the front end when the image is left/right aligned, as discussed here WordPress/gutenberg#38613.

As an alternative, I tried making the same pattern with the media + text block instead of columns, but I couldn't get the vertical spacing correct (the spacing was being applied to both the text and the image, rather than just the text). I don't know if there's another way we could do this?

I also took a look at the fonts. It looks like we're using all the possible Chivo font weights that are available, with Light 300 being the lightest. I'll open up a separate issue to see if we can improve these.

@mikachan
Copy link
Member Author

mikachan commented Feb 8, 2022

Maggie pointed me in the right direction for the fonts, and I've now added a thin font weight, which lets us use a weight of 100. Does this look better for this pattern?

image

@kjellr
Copy link
Contributor

kjellr commented Feb 8, 2022

It does, but I think we'll want to tackle that problem globally so I think it's fine to leave at 300 and then deal with this over in #5478.

I think this is related to the div that's added on the front end when the image is left/right aligned, as discussed here WordPress/gutenberg#38613.

Ok, no problem. I think this is good to go if we switch back to the 300 weight for now.

@kjellr
Copy link
Contributor

kjellr commented Feb 8, 2022

Ok, no problem. I think this is good to go if we switch back to the 300 weight for now.

Actually on second thought, let's keep the 100. I think that's more in line with the comps, and I'll open a PR to swap out the 300 weight globally for 100 to close #5478.

@jffng jffng force-pushed the add/archeo-pattern-9 branch from 0903e4a to ebea575 Compare February 8, 2022 22:27
@jffng jffng merged commit 48f0426 into trunk Feb 8, 2022
@jffng jffng deleted the add/archeo-pattern-9 branch February 8, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Theme] Archeo Automatically generated label for Archeo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants