Skip to content

Conversation

@mkucmus
Copy link
Contributor

@mkucmus mkucmus commented Jan 15, 2026

Description

use config defined in cms to show gallery navigation

@vercel
Copy link

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment Jan 15, 2026 1:03pm
frontends-vue-starter-template Building Building Preview, Comment Jan 15, 2026 1:03pm
old-frontends-demo Building Building Preview, Comment Jan 15, 2026 1:03pm
shopware-frontends-docs Ready Ready Preview Jan 15, 2026 1:03pm

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for CMS-configurable gallery navigation controls to the image gallery component, allowing administrators to control the visibility and positioning of navigation arrows and dots.

Changes:

  • Added support for minHeight, navigationArrows, and navigationDots CMS configuration values in CmsElementImageGallery
  • Extended SwProductGallery to accept an optional config prop for customizing gallery behavior
  • Updated changeset documentation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
CmsElementImageGallery.vue Implements CMS config reading for gallery navigation controls and applies dynamic styling based on config values
SwProductGallery.vue Adds optional config prop and merges it with default configuration before passing to CmsElementImageGallery
beige-chicken-win.md Documents the changes in the changeset

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 137 to 140
<div
v-if="mediaGallery.length > 1"
v-if="mediaGallery.length > 1 && navigationArrows !== 'none'"
class="absolute inset-0 flex items-center justify-between px-2 sm:px-4 pointer-events-none"
>
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Navigation arrows with navigationArrows === 'outside' are still positioned with absolute inset-0 inside the image container, causing them to overlay the image. When arrows are 'outside', they should be positioned outside the image container. Reference SwSlider.vue line 287 which adds px-10 padding to the container when arrows are outside. Consider restructuring the layout to add padding to a wrapping container when navigationArrows === 'outside' and positioning arrows absolutely relative to that container instead of the image container.

Copilot uses AI. Check for mistakes.
const { getConfigValue } = useCmsElementConfig(props.content);
const minHeight = computed(() => getConfigValue("minHeight") || "500px");
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default minHeight value is '500px' here, but in SwProductGallery.vue (line 20) it's '300px'. These inconsistent defaults could lead to unexpected behavior. Consider using the same default value across both components or explicitly documenting why they differ.

Suggested change
const minHeight = computed(() => getConfigValue("minHeight") || "500px");
const minHeight = computed(() => getConfigValue("minHeight") || "300px");

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants