Skip to content

Conversation

@mdanilowicz
Copy link
Contributor

… across examples and packages

This pull request introduces an improvement to how product images are handled in the cart component, ensuring more consistent and simplified access to image data. The main change is in how the cover property is referenced and used for cart items, both in the API schema and the Vue component.

API Schema Update:

  • Added a cover property to the LineItem schema, referencing the Media schema to standardize how media is attached to cart items.

Component Logic Simplification:

  • Updated the product image rendering logic in ProductItem.vue to directly use cartItem.cover instead of accessing a nested media property, aligning with the updated API schema and reducing complexity.

@vercel
Copy link

vercel bot commented Nov 19, 2025

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

Project Deployment Preview Updated (UTC)
frontends-demo Building Building Preview Nov 20, 2025 7:50pm
frontends-vue-starter-template Building Building Preview Nov 20, 2025 7:50pm
shopware-frontends-docs Ready Ready Preview Nov 20, 2025 7:50pm

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 19, 2025

CodSpeed Performance Report

Merging #2127 will create unknown performance changes

Comparing fix/product-types (8617d7f) with main (61a60a0)1

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.
Please ensure that your benchmarks are correctly instrumented with CodSpeed.

Check out the benchmarks creation guide

⏩ 8 skipped2

Footnotes

  1. No successful run was found on main (efe125e) during the generation of this report, so 61a60a0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

@patzick patzick left a comment

Choose a reason for hiding this comment

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

Very nice!

One question though - isn't the cover supposed to be a required property? What are the cases that it's missing, are you able to reproduce that case?

@mdanilowicz
Copy link
Contributor Author

Very nice!

One question though - isn't the cover supposed to be a required property? What are the cases that it's missing, are you able to reproduce that case?

Cover shouldn’t be required because the coupon code has the property set to null
Screenshot 2025-11-20 at 20 55 26

Copy link
Contributor

@mkucmus mkucmus left a comment

Choose a reason for hiding this comment

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

image

Copy link
Contributor

@patzick patzick left a comment

Choose a reason for hiding this comment

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

so should be
cover: components["schemas"]["Media"] | null
as the result

@patzick patzick changed the title fix(api-types): update LineItem cover type from ProductMedia to Media… fix(api-types): update LineItem cover type from ProductMedia to Media across examples and packages Nov 21, 2025
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.

4 participants