Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

add archive template and posts-grid pattern #5994

Merged
merged 7 commits into from
Jun 3, 2022
Merged

Conversation

madhusudhand
Copy link
Contributor

@madhusudhand madhusudhand commented May 11, 2022

Changes proposed in this Pull Request:

image

Related issue(s):

Fixes: #5932

Issues to resolve

This PR has the following problems that needs to be solved. Need suggestions.

  1. When there are not tags, UI starts with the separator dot (.). Is there a way to conditionally add it?

image

  1. Is there a block to add the title Search: search term? Archive title isn't working in search template

image

@madhusudhand madhusudhand mentioned this pull request May 11, 2022
8 tasks
@madhusudhand madhusudhand marked this pull request as ready for review May 11, 2022 12:42
@madhusudhand madhusudhand requested a review from a team May 11, 2022 12:42
@madhusudhand madhusudhand added the [Theme] Vivre Automatically generated label for Vivre. label May 11, 2022
@madhusudhand madhusudhand self-assigned this May 11, 2022
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.

When there are not tags, UI starts with the separator dot (.). Is there a way to conditionally add it?

Not with block templates, it would have to be in the block options somehow. I wonder if we should just remove the separator dot for now, unless we are okay with how it looks when there are no tags.

Is there a block to add the title Search: search term? Archive title isn't working in search template

I think it would be useful if the archive title block supported rendering the search term, or something along those lines.

In the meantime though, maybe this template could match our other block themes' search templates where the input is rendered at the top of the results page, for example:

Screen Shot 2022-05-11 at 11 01 48 AM

What do you think @beafialho ?

<div class="wp-block-group alignfull"><!-- wp:query {"queryId":0,"query":{"perPage":6,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:post-template -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"20px","right":"20px","bottom":"20px","left":"20px"}}},"layout":{"inherit":false}} -->
<div class="wp-block-group" style="padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px"><!-- wp:post-featured-image {"isLink":true} /-->
Copy link
Contributor

Choose a reason for hiding this comment

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

The spacing here seems a little off from the designs, maybe a little more space below the featured image, or reducing the space between the post terms and post title:

Screen Shot 2022-05-11 at 10 53 38 AM

@beafialho
Copy link
Collaborator

beafialho commented May 12, 2022

Not with block templates, it would have to be in the block options somehow. I wonder if we should just remove the separator dot for now, unless we are okay with how it looks when there are no tags.

Yeah 😞 unfortunately removing the dot might be the only option. Will it look like this with the category then? This is also not ideal.

Captura de ecrã 2022-05-12, às 09 14 43

I think it would be useful if the archive title block supported rendering the search term, or something along those lines.

Absolutely. I keep designing Search: "term" for every theme but it isn't possible... Would be great if it could be achieved. In the meantime, showing the search field like you suggested works @jffng.

@madhusudhand
Copy link
Contributor Author

Adjusted spacing, and used search block in the search page.

image

image

@madhusudhand madhusudhand added the [Status] Needs Design Approval This task needs a designer to approve the changes before it can be merged or marked complete. label May 23, 2022
@jffng
Copy link
Contributor

jffng commented May 23, 2022

Will it look like this with the category then? This is also not ideal.

Yes. Is that acceptable? Also just noting what happens when there is more than one category:

Screen Shot 2022-05-23 at 10 58 06 AM

@beafialho
Copy link
Collaborator

Yes. Is that acceptable? Also just noting what happens when there is more than one category:

I'm not sure this is a good alternative. If there are more categories it'll look quite full and the dot really helped separating the information.

Maybe whenever posts are showing up as a grid it works better if we use the Tiny paragraph size (14px) in post date with 10px spacing in the Stack block. Can you try it?

Captura de ecrã 2022-05-24, às 12 16 16

@jffng
Copy link
Contributor

jffng commented May 25, 2022

Maybe whenever posts are showing up as a grid it works better if we use the Tiny paragraph size (14px) in post date with 10px spacing in the Stack block. Can you try it?

Sure thing, I tried that here: 900d744

Screen Shot 2022-05-25 at 10 58 50 AM

What do you think @beafialho ? Using 10px as the block gap makes it appear bigger than the spacing suggested in the comps, but I left it there for your consideration.

@beafialho
Copy link
Collaborator

Thanks @jffng, can you try 5px instead of 10px please?

@jffng
Copy link
Contributor

jffng commented May 25, 2022

Sure thing:

0px 5px 10px
Screen Shot 2022-05-25 at 11 35 49 AM Screen Shot 2022-05-25 at 11 36 04 AM Screen Shot 2022-05-25 at 11 36 13 AM

@beafialho
Copy link
Collaborator

Thank you, that was just what I needed! 0px seems to look the best to me.

@beafialho
Copy link
Collaborator

I love how this is looking! I have spotted a few things to be polished:

  • Navigation should look like this (both in Archive as in Search templates):

Captura de ecrã 2022-05-27, às 12 24 04

Keep in mind that it shouldn't be underlined by default.

  • Is there a way to avoid this? Right before it stacks for the mobile layout, the content, more specifically the post titles look quite tight.

Captura de ecrã 2022-05-27, às 12 25 43

@madhusudhand
Copy link
Contributor Author

@beafialho

Navigation should look like this (both in Archive as in Search templates):

Navigation styling is in progress as part of the other PR #5987
Once it gets merged we will be consuming the same component here.

Is there a way to avoid this? Right before it stacks for the mobile layout, the content, more specifically the post titles look quite tight.

Gutenberg is supporting only mobile breakpoints and we might need custom styles to adjust to 2 column layout. However, because the grid is a pattern, it will break the page when theme switched.

Following is the UI for iPad Mini device size.

image

@madhusudhand
Copy link
Contributor Author

Created #6059 to add pagination once the single page PR is merged.

Merging this PR to reduce inter dependencies. Please add if these pages need more changes.

@madhusudhand madhusudhand merged commit 8ee1e83 into trunk Jun 3, 2022
@madhusudhand madhusudhand deleted the curator/archive branch June 3, 2022 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Status] Needs Design Approval This task needs a designer to approve the changes before it can be merged or marked complete. [Theme] Vivre Automatically generated label for Vivre.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Curator: Templates: Archive
3 participants