-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: Image behavior in ImageGallery #2090
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit da6b008:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I don't think customizing it will reflect in the layout as expected. |
5aaa8ff
to
c0c514e
Compare
c0c514e
to
5aae63b
Compare
@Gmantiqueira Since image position does not work with this scenario, we should remove those examples from the doc. Can you remove it pls 👍 |
fbd7299
to
da6b008
Compare
What's the purpose of this pull request?
As related to #2059, we need more customization in our ImageGallery so we can show the image properly, with a good image position.
We tried to use Aspect Ratio for that customization, but it was breaking our layout and the property
object-fit
can fix that problem properly.Before:
After:
OBS: This might be a braking change - the
imagePosition
prop is now deprecate, if you are using it in your implementation you'll need to adapt it.How it works?
This PR makes the aspect ratio customizable by CMS.This PR changes the ImageGallery object-fit property from
cover
tocontain
.How to test it?
https://sfj-8088db8--starter.preview.vtex.app/apple-magic-mouse-99988212/p
Starters Deploy Preview
https://sfj-8088db8--starter.preview.vtex.app/
References