Skip to content

feat(vue-starter-template): add template improvements#2320

Merged
Maciej D (mdanilowicz) merged 4 commits intomainfrom
feeat/GH-2319
Mar 9, 2026
Merged

feat(vue-starter-template): add template improvements#2320
Maciej D (mdanilowicz) merged 4 commits intomainfrom
feeat/GH-2319

Conversation

@mdanilowicz
Copy link
Contributor

This pull request introduces a minor update to the @shopware/helpers package, specifically improving the getSmallestThumbnailUrl function by adding a fallback to media.url when thumbnails are missing or empty. Additionally, several accessibility and UI improvements are made across Vue components, including enhanced alt text for images, improved border styling for menu elements, and better accessibility for quantity selection controls.

Helper function improvements

  • Enhanced getSmallestThumbnailUrl in packages/helpers/src/media/getSmallestThumbnailUrl.ts to return media.url as a fallback when thumbnails are missing or empty, with corresponding tests added in getSmallestThumbnailUrl.test.ts. [1] [2] [3]

Accessibility enhancements

  • Added descriptive alt attributes to payment and shipping method images in PaymentMethods.vue and ShippingMethods.vue for improved accessibility. [1] [2]
  • Improved accessibility in QuantitySelect.vue by adding aria-label attributes to quantity buttons and input, and using unique input IDs. [1] [2] [3]

UI improvements

  • Refined border styling and spacing in account menu and menu element components for more consistent appearance and active state indication (AccountMenu.vue, element.vue). [1] [2]

closes: #2319

@vercel
Copy link

vercel bot commented Mar 9, 2026

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

Project Deployment Actions Updated (UTC)
frontends-starter-template-extended Ready Ready Preview, Comment Mar 9, 2026 10:06am
frontends-vue-starter-template Building Building Preview, Comment Mar 9, 2026 10:06am
old-frontends-demo Building Building Preview, Comment Mar 9, 2026 10:06am
shopware-frontends-docs Ready Ready Preview, Comment Mar 9, 2026 10:06am

Request Review

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 addresses issue #2319 by making UI improvements to the Vue starter template: fixing jumping menu hover behavior, adding product thumbnail URL fallback, and improving accessibility in checkout components.

Changes:

  • Enhanced getSmallestThumbnailUrl helper to fall back to media.url when thumbnails are missing or empty, with corresponding tests.
  • Added descriptive alt attributes to payment/shipping method images and aria-label attributes to quantity select controls for improved accessibility.
  • Fixed jumping hover behavior in account menu and menu elements by using a transparent border as default instead of adding a border on hover (preventing layout shift).

Reviewed changes

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

Show a summary per file
File Description
packages/helpers/src/media/getSmallestThumbnailUrl.ts Added url property to the type constraint and media.url fallback when thumbnails are absent
packages/helpers/src/media/getSmallestThumbnailUrl.test.ts Added tests for the new fallback behavior
templates/vue-starter-template/app/components/form/QuantitySelect.vue Added type="button", aria-label, unique id/name for accessibility
templates/vue-starter-template/app/components/checkout/ShippingMethods.vue Added descriptive alt attribute to shipping method image
templates/vue-starter-template/app/components/checkout/PaymentMethods.vue Added descriptive alt attribute to payment method image
templates/vue-starter-template/app/components/layout/AccountMenu.vue Fixed hover border jump by using transparent border as default
templates/vue-starter-template/app/components/account/menu/element.vue Fixed hover border jump by using transparent border as default
.changeset/orange-chicken-smoke.md Changeset for the helpers package update

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

Comment on lines +15 to +21
url?: string;
},
>(media?: T): string | undefined {
if (!media || !media?.thumbnails?.length) {
if (media?.url) {
return media.url;
}
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The JSDoc comment says "Returns the smallest thumbnail url from the media object" but the function now also returns media.url as a fallback when thumbnails are missing. Consider updating the docstring to mention this fallback behavior, e.g., "Returns the smallest thumbnail url from the media object, or falls back to media.url when thumbnails are missing or empty."

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,5 @@
---
"@shopware/helpers": minor
Copy link
Contributor

Choose a reason for hiding this comment

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

this is more like a patch change, other than that all good

@mdanilowicz Maciej D (mdanilowicz) deleted the feeat/GH-2319 branch March 9, 2026 10:13
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.

vue-starter-template UI improvements

4 participants