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

Featured Image block: Lightbox / Expand use case #57849

Open
paaljoachim opened this issue Jan 15, 2024 · 6 comments
Open

Featured Image block: Lightbox / Expand use case #57849

paaljoachim opened this issue Jan 15, 2024 · 6 comments
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Jan 15, 2024

What problem does this address?

I went ahead and added the Featured Image block to the Single Posts Template.

Screenshot 2024-01-15 at 14 25 06

I made the image so high that it would be possible for people to see the contents and read the words if needed.

If I had made the image small it would not be possible to see the contents or read the words.

What is your proposed solution?

Add "Expand on click" (lightbox) also to the Featured Image block.

Screenshot 2024-01-15 at 14 28 31

So that one can add a smaller image and still making it possible for a user to click the image and see more details of the image.

@artemiomorales

@paaljoachim paaljoachim added [Type] Enhancement A suggestion for improvement. [Block] Post Featured Image Affects the Post Featured Image Block labels Jan 15, 2024
@paaljoachim
Copy link
Contributor Author

Linking to Tracking issue:
#51132

@paulm
Copy link

paulm commented Feb 24, 2024

As a web user, often it's expected that clicking on images in a blog post will open larger. In using Featured Image, it would be highly preferrable to have a native control for enabling this ability, rather than modifying the PHP.

@vcanales
Copy link
Member

I see a potential opportunity to rethink the implementation of the Featured Image block entirely. Instead of creating and maintaining a separate logic for the Featured Image block, we could leverage the existing capabilities of the Core Image block.

Proposal

Transform the Featured Image block into a wrapper for the Core Image block. By using the Core Image block as an inner block within the Featured Image block, we can take full advantage of the advanced features and ongoing improvements that the Core Image block offers. This approach minimizes redundant code and maintenance while enhancing the functionality and user experience of the Featured Image block.

Benefits

  • Unified Functionality: The Core Image block already supports various features like lightbox expansion, aspect ratios, and conversion to other block types (e.g., Cover Block). By embedding the Core Image block, the Featured Image block inherits these features.

  • Consistent Updates: As enhancements are made to the Core Image block, the Featured Image block will automatically benefit from these updates, ensuring consistency and reducing the need for duplicated effort.

These thoughts also stem from the fact that in order to implement lightbox on the Featured Image block, a lot of the logic already written for the Image Block would have to be duplicated, or we would have to find a good way to share it.

@mikachan
Copy link
Member

This is a high-level comment as I'm not too familiar with the interactivity API or the featured image block 😅

we could leverage the existing capabilities of the Core Image block.

I really like this idea - it makes sense to use the Image block wherever possible to avoid duplicating code/logic. I'm not sure if there are any hidden limitations or reasons why this hasn't been done before.

cc @artemiomorales for any input on this approach to sharing the lightbox logic via using the Image block as any inner block 🙇

@gziolo gziolo added the [Feature] Interactivity API API to add frontend interactivity to blocks. label May 24, 2024
@desrosj
Copy link
Contributor

desrosj commented Oct 21, 2024

Just wanted to note that I would love this feature. On my site currently, the featured image block for the single posts template is set to full width with cover as the scale. This sometimes results in the image being partially concealed. Having the ability to click on it and view the entire thing would be really nice.

My initial wish was for a switch setting identical to "Link to Post" that just toggled "Expand on Click".

@gyurmey2
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants