Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

[Latest Posts Block] Gallery block not displaying properly on the page #88833

Open rw-ye opened 7 months ago

rw-ye commented 7 months ago

Quick summary

When displaying full posts in the Latest Posts Block, posts with a Gallery block do not display properly and appear stacked on the page.

This is how the Gallery block is displayed in the Latest posts block

Screenshot 2024-03-24 at 12 15 37 PM

How the Gallery block is displayed on the actual post

Screenshot 2024-03-24 at 12 11 30 PM

Steps to reproduce

  1. Create a new post
  2. Add a Gallery Block to the post with multiple images (2 or more)
  3. Publish the post
  4. Create a new page
  5. Add the Latest Posts Block to the page.
  6. In the Latest Posts block settings, enable Post content and select Full Post under Show
  7. View the page on the front-end and the gallery images will show stacked

What you expected to happen

For the Gallery block to display properly across the page, as it does on the post

What actually happened

The Gallery block is stacked

Impact

Most (> 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple, Atomic

Logs or notes

The workaround is to use the Query Loop Block instead.

rw-ye commented 7 months ago

User report -- 7934235-zd-a8c

github-actions[bot] commented 7 months ago

Support References

This comment is automatically generated. Please do not edit it.

maciejpilarski commented 7 months ago

📌 REPRODUCTION RESULTS – Tested on Simple – Replicated – Tested on Atomic – Replicated

📌 FINDINGS/SCREENSHOTS/VIDEO I was able to reproduce the issue on any theme by following the exact steps.

📌 ACTIONS – Triage

mpkelly commented 6 months ago

Hi @rw-ye, I can no longer reproduce this at wordpress.com. I believe Lego team hid some of the core blocks and I can't see how I can insert a Latest Posts block. However, I don't think this is a bug anyway. How the gallery displays in a post and how a post with a gallery block displays in a Latest Posts block don't necessarily need to match. I think the issue here is that there is only one post in the Latest Posts block, which will always look a bit weird.

This is a core block too so it would be an issue for Dotorg if anything.

Here is how it looks in core when there are three posts. It looks a bit odd because there is a different level of content but it's not easy to make it look good in all cases.

Image

So, I would say this is working as expected and can probably be closed. FYI I am going to make the priority normal.

rw-ye commented 6 months ago

Hey @mpkelly 👋

How the gallery displays in a post and how a post with a gallery block displays in a Latest Posts block don't necessarily need to match

I think the expectation from customers (such as in 7934235-zd-a8c) is that using the Full posts option in Latest posts block will display the full posts and match how it displays in the post itself. If it is true, that certain blocks won't display the same as in the post, I think that's something that would need to be clarified as to why that would be the case. It'll also help when explaining to customers if more reports about this come up as well.

I think the issue here is that there is only one post in the Latest Posts block, which will always look a bit weird.

I reproduced the issue on multiple posts and the formatting is odd. The same issue also occurs with the Columns Block and Row Blocks as well, and the content will show stacked on top of each other instead of in a row or columns (video below).

Here is a link to my page with the Latest posts block which displays 2 posts that utilize the gallery, columns and row block: https://webrw.blog/test-2/

https://github.com/Automattic/wp-calypso/assets/21261509/cef0c1e2-33b0-4218-a192-0a134136b788