-
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
The Image Gallery lacks a zoom-in/out feature, and the default image display doesn't fit properly #2059
Comments
Hey @victors1682! Which |
@renatamottam 'center' |
@renatamottam The component is currently receiving the 'center' parameter directly because we're utilizing a custom PDP. I'll share the code changes via Slack. The issue here is that the gallery is currently using 'object-fit: cover,' which is causing the image to be rendered like this. We're considering overwriting the CSS to set the gallery to 'object-fit: contain.' However, note that this change might potentially interfere with the zoom in/out feature once it's implemented, this is why we're waiting to sole this this from the core. |
Update about this issue:
|
## 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: <img width="1792" alt="Screenshot 2023-11-06 at 9 49 27 PM" src="https://github.com/vtex/faststore/assets/42946693/97d137a4-80ae-448e-8ef8-618ae6675d2b"> After: <img width="1792" alt="Screenshot 2023-11-06 at 9 48 41 PM" src="https://github.com/vtex/faststore/assets/42946693/b3b793b9-5f28-4bcc-9d87-03a27762d689"> ## How it works? ~This PR makes the aspect ratio customizable by CMS.~ This PR changes the ImageGallery object-fit property from `cover` to `contain`. ## 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 <!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? ---> <!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->
The Image Gallery lacks a zoom-in/out feature, and the default image display doesn't fit properly
Continuation from the issue: #1894 to keep tracking this pending feature
This is the image uploaded
This is how it looks
The text was updated successfully, but these errors were encountered: