Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Adjust date formats in query patterns #146

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Oct 21, 2021

Addresses two of the checkboxes in #90:

  • Image grid posts: Post date can not be formatted into the "11.11.2021" format as originally designed.
  • Large post titles: Post date can not be formatted into the "Nov 11" format as originally designed.

Note that this uses custom (valid) markup in the block to get this to work. When you have one of these selected, the date format dropdown will show an incorrect value. There's an upstream bug filed for that here: WordPress/gutenberg#35854

Screenshots

Before After
Screen Shot 2021-10-21 at 3 21 08 PM Screen Shot 2021-10-21 at 3 17 45 PM
Before After
Screen Shot 2021-10-21 at 3 20 45 PM Screen Shot 2021-10-21 at 3 20 19 PM

@kjellr kjellr requested a review from jffng October 21, 2021 19:29
@kjellr kjellr self-assigned this Oct 21, 2021
@@ -13,7 +13,7 @@
<!-- wp:group {"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group"><!-- wp:post-title {"isLink":true,"style":{"typography":{"fontFamily":"var:preset|font-family|system-font","fontStyle":"normal","fontWeight":"400"}},"fontSize":"small"} /-->

<!-- wp:post-date {"format":"F j, Y","style":{"typography":{"fontStyle":"italic","fontWeight":"400"}},"fontSize":"small"} /--></div>
<!-- wp:post-date {"format":"m.d.y","style":{"typography":{"fontStyle":"italic","fontWeight":"400"}},"fontSize":"small"} /--></div>
Copy link
Collaborator

@jffng jffng Oct 21, 2021

Choose a reason for hiding this comment

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

When there are no featured images, this one looks a little off. But okay to address that in a follow-up.

Default alignment:
Screen Shot 2021-10-21 at 5 10 14 PM

Wide alignment:
Screen Shot 2021-10-21 at 5 11 49 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ugh yes, this is an issue the grid view for the query block in general. In any case, this is a non-default layout, and it's called "Image grid posts" so maybe folks won't choose it if it looks bad? 😅

@kjellr kjellr merged commit d6ab6fb into trunk Oct 25, 2021
@kjellr kjellr deleted the fix/date-formats-in-query-patterns branch October 25, 2021 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants