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

Image Block: Add lightbox support for image aspect ratio #52192

Closed
artemiomorales opened this issue Jun 30, 2023 · 5 comments
Closed

Image Block: Add lightbox support for image aspect ratio #52192

artemiomorales opened this issue Jun 30, 2023 · 5 comments
Labels
[Block] Image Affects the Image Block [Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Enhancement A suggestion for improvement.

Comments

@artemiomorales
Copy link
Contributor

What problem does this address?

The lightbox zoom animation is not compatible with the new image aspect ratio controls. We should add that support.

What is your proposed solution?

For now, we should disable the lightbox when an aspect ratio other than the original is defined in the image block settings, but we should also work on adding support.

@artemiomorales artemiomorales added [Type] Enhancement A suggestion for improvement. [Block] Image Affects the Image Block [Feature] Interactivity API API to add frontend interactivity to blocks. labels Jun 30, 2023
@artemiomorales
Copy link
Contributor Author

Regarding the behavior when the lightbox is opened, I think maintaining the aspect ratio specified in the image block settings makes sense.

@SantosGuillamot
Copy link
Contributor

I was testing how maintaining the aspect ratio could look like. There are a couple of things to fix but I believe we could get something like this working:

Lightbox.Aspect.Ratio.mp4

If we agree on this approach, I can take care of submitting a PR with the code.

@cbravobernal
Copy link
Contributor

That seems a good approach, better than disabling it.

have you tried in mobile devices?

@SantosGuillamot
Copy link
Contributor

have you tried in mobile devices?

I tested it in the mobile view and it seems to be working. I didn't test it in a real mobile environment.

Lightbox.lightbox.-.11.July.2023.mp4

@richtabor
Copy link
Member

Noting that this was resolved in #52292 and works well:

CleanShot.2023-10-04.at.12.13.54.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the 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

4 participants