Remove product images duplication#18380
Conversation
Glancu
commented
Sep 17, 2025
| Q | A |
|---|---|
| Branch? | 1.14 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Related tickets | fixes #16771 |
| License | MIT |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
Rafikooo
left a comment
There was a problem hiding this comment.
Here are the issues I encountered:
- If a product has only one image, it cannot be clicked to open in full-screen mode, even though the
cursor: pointerCSS class suggests that interaction is possible. - Sylius provides a mechanism to bind images to specific variants (see the configurable product edit page in the admin panel). For example, if variant 1 is linked to image 1 and variant 2 to image 2, when you visit the product page, switch to variant 2, and then click the image, the lightbox still opens image 1 instead of image 2.
- It would be more robust to use delegated events on
documentinstead of binding directly to#main-image, and the code can be simplified without wrapping it in an extra named function.