@shopbite-de/storefront 1.23.3 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +19 -0
- package/.github/workflows/build.yaml +1 -1
- package/.github/workflows/ci.yaml +6 -3
- package/CLAUDE.md +41 -3
- package/README.md +139 -40
- package/api-gen.config.json +9 -0
- package/api-types/storeApiSchema.shopbite.overrides.json +35 -0
- package/api-types/storeApiTypes.d.ts +95 -81
- package/app/app.vue +37 -53
- package/app/assets/css/main.css +20 -4
- package/app/components/Address/Fields.vue +2 -21
- package/app/components/AnimatedSection.vue +9 -4
- package/app/components/BottomNavi.vue +9 -2
- package/app/components/Cart/Item.vue +21 -10
- package/app/components/Category/Header.vue +9 -3
- package/app/components/Category/Listing.vue +51 -42
- package/app/components/Checkout/PaymentAndDelivery.vue +19 -3
- package/app/components/Checkout/Summary.vue +65 -1
- package/app/components/Cta.vue +4 -2
- package/app/components/Food/MarqueeItem.vue +20 -8
- package/app/components/Footer/Contact.vue +78 -0
- package/app/components/Footer/StoreStatus.vue +30 -0
- package/app/components/Footer.vue +2 -1
- package/app/components/Header/Body.vue +1 -1
- package/app/components/Header/Right.vue +27 -13
- package/app/components/Header/Title.vue +1 -0
- package/app/components/Header.vue +5 -15
- package/app/components/Hero.vue +45 -2
- package/app/components/ImageGallery.vue +11 -5
- package/app/components/Product/Card.vue +9 -3
- package/app/components/Product/CardFooter.vue +22 -12
- package/app/components/User/RegistrationForm.vue +0 -1
- package/app/components/Wishlist.vue +2 -15
- package/app/composables/useAddToCart.ts +13 -13
- package/app/composables/useAddressAutocomplete.ts +12 -19
- package/app/composables/useAddressSuggestionArea.ts +16 -0
- package/app/composables/useAddressValidation.ts +3 -19
- package/app/composables/useCartMutations.ts +168 -0
- package/app/composables/{useCategory.ts → useCategoryById.ts} +1 -1
- package/app/composables/useCategorySeo.ts +22 -25
- package/app/composables/useCheckoutMethodGuard.ts +201 -0
- package/app/composables/useMatomo.ts +25 -0
- package/app/composables/useMatomoConfig.ts +12 -0
- package/app/composables/useMenuSectionSchema.ts +55 -0
- package/app/composables/useNavigation.ts +12 -9
- package/app/composables/usePageSeo.ts +50 -0
- package/app/composables/useRestaurantSchema.ts +64 -0
- package/app/composables/useScrollAnimation.ts +39 -8
- package/app/composables/useSearchTracking.ts +33 -0
- package/app/composables/useSeoUrlRoute.ts +58 -0
- package/app/composables/useSortingSelection.ts +28 -0
- package/app/composables/useStoreStatus.ts +48 -0
- package/app/composables/useTrackEvent.ts +29 -23
- package/app/pages/[...all].vue +4 -4
- package/app/pages/account/recover/password/index.vue +1 -0
- package/app/pages/anmelden.vue +4 -0
- package/app/pages/bestellung/[id]/erfolg.vue +1 -5
- package/app/pages/bestellung/[id]/fehler.vue +2 -2
- package/app/pages/bestellung/[id]/index.vue +9 -3
- package/app/pages/bestellung/bestaetigen.vue +1 -5
- package/app/pages/bestellung/warenkorb.vue +1 -5
- package/app/pages/bestellung/zahlung-versand.vue +1 -5
- package/app/pages/c/[...all].vue +2 -35
- package/app/pages/index.vue +25 -13
- package/app/pages/kontakt.vue +4 -0
- package/app/pages/konto/adressen.vue +4 -0
- package/app/pages/konto/bestellung/[id].vue +4 -0
- package/app/pages/konto/bestellungen.vue +4 -0
- package/app/pages/konto/index.vue +4 -0
- package/app/pages/konto/profil.vue +4 -0
- package/app/pages/maintenance.vue +6 -0
- package/app/pages/merkliste.vue +1 -7
- package/app/pages/passwort-vergessen.vue +1 -0
- package/app/pages/registrierung/bestaetigen.vue +4 -0
- package/app/pages/registrierung/index.vue +4 -0
- package/app/pages/speisekarte/[...all].vue +2 -36
- package/app/pages/suche.vue +24 -21
- package/app/plugins/matomo.ts +35 -0
- package/app/utils/hydrateWhenVisible.ts +20 -0
- package/app/utils/media.ts +33 -0
- package/app/utils/openingHours.ts +67 -0
- package/app/utils/schema.ts +235 -0
- package/app/utils/seo.ts +56 -0
- package/app/utils/seoPath.ts +57 -0
- package/content/index.yml +10 -9
- package/content.config.ts +3 -0
- package/docs/notes/2026-07-05-issue-259-matomo-broken.md +7 -0
- package/docs/notes/2026-09-08-issue-240-shipping-method-blocked.md +83 -0
- package/docs/notes/2026-09-08-issue-241-cart-lock-conflicts.md +63 -0
- package/docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md +65 -0
- package/docs/notes/2026-09-08-issue-276-payment-method-blocked.md +39 -0
- package/docs/notes/2026-09-08-issue-277-typecheck.md +99 -0
- package/docs/notes/2026-09-10-issue-250-animated-section.md +23 -0
- package/docs/notes/2026-09-10-issue-251-shop-data-in-base-layer.md +30 -0
- package/docs/notes/2026-09-10-issue-272-restaurant-schema.md +27 -0
- package/docs/notes/2026-09-10-issue-273-performance-media.md +64 -0
- package/docs/notes/2026-09-10-issue-274-seo-basics.md +49 -0
- package/docs/notes/2026-09-10-issue-275-accessibility.md +46 -0
- package/docs/notes/2026-09-10-issue-290-footer-nap.md +28 -0
- package/docs/notes/2026-09-10-issue-291-seo-url-trailing-slash.md +24 -0
- package/docs/notes/2026-09-10-issue-294-matomo-without-config.md +33 -0
- package/docs/notes/2026-09-10-issue-295-search-hydration-mismatch.md +25 -0
- package/docs/notes/2026-09-10-issue-296-track-direct-search.md +19 -0
- package/docs/notes/2026-09-10-issue-312-store-api-criteria-post.md +64 -0
- package/docs/notes/2026-09-10-issue-313-wishlist-scoped-tailwind.md +29 -0
- package/docs/notes/2026-09-10-issue-314-mobile-js-cost.md +119 -0
- package/node.dockerfile +5 -2
- package/nuxt.config.ts +74 -15
- package/package.json +5 -3
- package/patches/@shopware__nuxt-module@1.5.1.patch +32 -0
- package/pnpm-workspace.yaml +2 -0
- package/public/hero-poster.webp +0 -0
- package/server/api/__sitemap__/urls.get.ts +49 -0
- package/server/api/category/[categoryId].get.ts +20 -9
- package/server/api/content/home.get.ts +14 -0
- package/server/api/content/page.get.ts +22 -0
- package/server/api/listing/[categoryId].get.ts +12 -18
- package/server/api/product/[productId]/cross-selling.get.ts +3 -9
- package/server/api/product/[productId].get.ts +4 -8
- package/server/plugins/site-url.ts +13 -0
- package/server/plugins/sitemap-trailing-slash.ts +26 -0
- package/server/utils/sitemap.ts +60 -0
- package/server/utils/storeApi.ts +34 -0
- package/shopware.d.ts +35 -11
- package/test/nuxt/AddressFields.test.ts +2 -73
- package/test/nuxt/AnimatedSection.test.ts +67 -0
- package/test/nuxt/CartItem.test.ts +95 -0
- package/test/nuxt/FooterContact.test.ts +102 -0
- package/test/nuxt/FooterStoreStatus.test.ts +48 -0
- package/test/nuxt/HeaderRight.test.ts +14 -10
- package/test/nuxt/Hero.test.ts +68 -0
- package/test/nuxt/PaymentAndDelivery.test.ts +67 -8
- package/test/nuxt/RegistrationForm.test.ts +3 -0
- package/test/nuxt/useAddToCart.test.ts +34 -1
- package/test/nuxt/useAddressAutocomplete.test.ts +2 -38
- package/test/nuxt/useAddressSuggestionArea.test.ts +27 -0
- package/test/nuxt/useBusinessHours.test.ts +1 -1
- package/test/nuxt/useCartMutations.test.ts +225 -0
- package/test/nuxt/useCheckoutMethodGuard.test.ts +386 -0
- package/test/nuxt/useScrollAnimation.test.ts +55 -49
- package/test/nuxt/useSearchTracking.test.ts +71 -0
- package/test/nuxt/useSeoUrlRoute.test.ts +93 -0
- package/test/nuxt/useStoreStatus.test.ts +77 -0
- package/test/nuxt/useTrackEvent.test.ts +112 -0
- package/test/unit/media.spec.ts +49 -0
- package/test/unit/openingHours.spec.ts +59 -0
- package/test/unit/schema.spec.ts +243 -0
- package/test/unit/seo.spec.ts +107 -0
- package/test/unit/seoPath.spec.ts +116 -0
- package/test/unit/sitemap.spec.ts +88 -0
- package/test/unit/useCategorySeo.spec.ts +40 -30
- package/test/unit/useSortingSelection.spec.ts +39 -0
- package/app/composables/useValidCitiesForDelivery.ts +0 -12
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Issue #276 — `payment-method-blocked` is not handled headlessly
|
|
2
|
+
|
|
3
|
+
Date: 2026-09-08 · Branch: `fix/issue-276-payment-method-blocked` · PR #280
|
|
4
|
+
(builds on #278, merged the same day)
|
|
5
|
+
|
|
6
|
+
## Background
|
|
7
|
+
|
|
8
|
+
Same mechanism as #240, see
|
|
9
|
+
`2026-09-08-issue-240-shipping-method-blocked.md`. Shopware's
|
|
10
|
+
`BlockedPaymentMethodSwitcher` only runs inside the Twig storefront
|
|
11
|
+
(`StorefrontCartFacade`). Via the Store API a payment method whose
|
|
12
|
+
availability rule stops matching leaves a `payment-method-blocked` cart
|
|
13
|
+
error (`PaymentMethodBlockedError`, `blockOrder() = true`) and
|
|
14
|
+
`POST /checkout/order` fails with `CHECKOUT__CART_INVALID`.
|
|
15
|
+
|
|
16
|
+
## Fix
|
|
17
|
+
|
|
18
|
+
`useShippingMethodGuard` was generalised into
|
|
19
|
+
`app/composables/useCheckoutMethodGuard.ts`:
|
|
20
|
+
|
|
21
|
+
- One internal `resolve(config)` handles both method types. The config
|
|
22
|
+
describes how to detect the blocked state, load the available methods
|
|
23
|
+
(`forceReload`), pick the sales-channel default
|
|
24
|
+
(`salesChannel.shippingMethodId` / `salesChannel.paymentMethodId`) and
|
|
25
|
+
select the replacement.
|
|
26
|
+
- Public API: `ensureAvailableShippingMethod()`,
|
|
27
|
+
`ensureAvailablePaymentMethod()` and `ensureAvailableCheckoutMethods()`.
|
|
28
|
+
The combined variant refreshes the cart once and resolves shipping
|
|
29
|
+
before payment, because payment availability rules may depend on the
|
|
30
|
+
shipping method. Exposes `isShippingMethodBlocked`,
|
|
31
|
+
`isPaymentMethodBlocked` and `isResolving`.
|
|
32
|
+
- `Checkout/Summary.vue` and `Checkout/PaymentAndDelivery.vue` use the
|
|
33
|
+
combined variant. The summary button label and the "nothing available"
|
|
34
|
+
toast name the affected method type ("Versandart" / "Zahlart").
|
|
35
|
+
- The payment radio on the "Zahlung & Versand" step is kept in sync with
|
|
36
|
+
the session like the shipping radio.
|
|
37
|
+
|
|
38
|
+
Tests: `test/nuxt/useCheckoutMethodGuard.test.ts` (replaces the shipping
|
|
39
|
+
guard test) and `test/nuxt/PaymentAndDelivery.test.ts`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Issue #277 — `pnpm typecheck` failed on `main` with 37 errors
|
|
2
|
+
|
|
3
|
+
Date: 2026-09-08 · Branch: `fix/issue-277-typecheck`
|
|
4
|
+
|
|
5
|
+
## Symptom
|
|
6
|
+
|
|
7
|
+
`pnpm typecheck` exited with 37 `error TS…` lines. CI did not run it, so
|
|
8
|
+
nobody noticed. 7 errors were in our test files, 30 in package sources
|
|
9
|
+
that Nuxt pulls into the type program:
|
|
10
|
+
|
|
11
|
+
| Source | Errors |
|
|
12
|
+
| ----------------------------------------------------- | ------ |
|
|
13
|
+
| `@shopware/composables/src/useB2bQuoteManagement.ts` | 14 |
|
|
14
|
+
| `@shopware/nuxt-module/plugin.ts` | 12 |
|
|
15
|
+
| `@shopware/composables/src/useListing.ts` | 2 |
|
|
16
|
+
| `@shopware/composables/src/useCartItem.ts` | 1 |
|
|
17
|
+
| `@shopware/composables/src/useNewsletter.ts` | 1 |
|
|
18
|
+
| our tests | 7 |
|
|
19
|
+
|
|
20
|
+
Why package sources are checked at all: `@shopware/composables` is
|
|
21
|
+
consumed as a Nuxt **layer**, so its `src/*.ts` are compiled as part of
|
|
22
|
+
the app, and `@shopware/nuxt-module` ships its plugin as `plugin.ts`.
|
|
23
|
+
`skipLibCheck` only skips `.d.ts` files, and `exclude` does not help
|
|
24
|
+
because the files are reached through imports.
|
|
25
|
+
|
|
26
|
+
## Root causes and fixes
|
|
27
|
+
|
|
28
|
+
### 1. Custom API types miss what the layer references (15 errors)
|
|
29
|
+
|
|
30
|
+
`shopware.d.ts` replaces the `#shopware` `operations`/`Schemas` with the
|
|
31
|
+
types generated from **our** Shopware instance. The layer also references
|
|
32
|
+
endpoints/schemas our instance does not expose (B2B `Quote`, newsletter
|
|
33
|
+
status responses).
|
|
34
|
+
|
|
35
|
+
Fix: `shopware.d.ts` now falls back to the api-client's default types for
|
|
36
|
+
keys missing in ours (`Omit<Default, keyof Custom> & Custom`). Ours always
|
|
37
|
+
win where both exist. One fallback operation
|
|
38
|
+
(`createOrderFromQuote`) has its response re-mapped to our `Order`
|
|
39
|
+
because the composable compares it against `Schemas["Order"]`.
|
|
40
|
+
|
|
41
|
+
### 2. `useListing` broke because we shadowed `useCategory` (2 errors)
|
|
42
|
+
|
|
43
|
+
Project composables override layer composables **everywhere**, including
|
|
44
|
+
inside the layer's own code. Our async `useCategory(categoryId)` was
|
|
45
|
+
picked up by the layer's `useListing`, which calls `useCategory()`
|
|
46
|
+
synchronously. This was also a latent runtime bug.
|
|
47
|
+
|
|
48
|
+
Fix: renamed ours to `useCategoryById`. Rule added to `CLAUDE.md`.
|
|
49
|
+
|
|
50
|
+
### 3. Shopware 6.7 schema differences (2 errors)
|
|
51
|
+
|
|
52
|
+
- `LineItem.payload` is required in the 6.7 OpenAPI schema; the layer
|
|
53
|
+
casts it as optional. Container/promotion/custom line items have no
|
|
54
|
+
product payload anyway, so `shopware.d.ts` keeps `payload` optional.
|
|
55
|
+
- `POST /newsletter/subscribe` is documented without a response body; the
|
|
56
|
+
layer reads `status` from it. `api-types/storeApiSchema.shopbite.overrides.json`
|
|
57
|
+
adds the response the default types declare.
|
|
58
|
+
|
|
59
|
+
`api-gen.config.json` now also applies the **upstream** schema patches
|
|
60
|
+
(`@shopware/api-client/api-types/storeApiSchema.overrides.json`) when
|
|
61
|
+
running `pnpm generate-types`, which is what the layer is written against.
|
|
62
|
+
Regenerating changed `customFields` typings (`GenericRecord` →
|
|
63
|
+
`CustomFields | null`) and a few required flags; app code typechecks
|
|
64
|
+
unchanged.
|
|
65
|
+
|
|
66
|
+
### 4. `@shopware/nuxt-module` plugin (12 errors)
|
|
67
|
+
|
|
68
|
+
Three upstream problems in `plugin.ts` of 1.5.1:
|
|
69
|
+
|
|
70
|
+
- `import type { ShopwareNuxtOptions } from "./src"` — `src` is not
|
|
71
|
+
published.
|
|
72
|
+
- No types for `js-cookie` → added `@types/js-cookie` as devDependency.
|
|
73
|
+
- Nuxt's generated `NuxtApp` augmentation infers the plugin's provided
|
|
74
|
+
type from `typeof import(plugin)`, while the plugin body reads
|
|
75
|
+
`NuxtApp.ssrContext`. With an untyped default export this is a cycle
|
|
76
|
+
("Type 'NuxtApp' recursively references itself") that cascades into
|
|
77
|
+
implicit `any` errors.
|
|
78
|
+
|
|
79
|
+
Fix: pnpm patch (`patches/@shopware__nuxt-module@1.5.1.patch`) that
|
|
80
|
+
imports the type from `./dist/index` and annotates the export as
|
|
81
|
+
`Plugin<{ shopwareApiClient: ApiClient }>`. **When Renovate bumps
|
|
82
|
+
`@shopware/nuxt-module`, the patch has to be re-created for the new
|
|
83
|
+
version** (`pnpm patch @shopware/nuxt-module@<version>`, apply the same
|
|
84
|
+
two changes, `pnpm patch-commit`). pnpm fails the install if the patch no
|
|
85
|
+
longer applies, so a stale patch cannot go unnoticed. Worth reporting
|
|
86
|
+
upstream (shopware/frontends).
|
|
87
|
+
|
|
88
|
+
### 5. Test typings (7 errors)
|
|
89
|
+
|
|
90
|
+
Small fixes: typed `onUpdate:modelValue` handler, removed a `global`
|
|
91
|
+
detour in `HeaderRight.test.ts`, `ref<unknown>(null)`, full
|
|
92
|
+
`IntersectionObserverCallback` arguments, and a typed `useCategorySeo`
|
|
93
|
+
holder with a cast helper in the unit spec.
|
|
94
|
+
|
|
95
|
+
## Process changes
|
|
96
|
+
|
|
97
|
+
- `typecheck` script is now `nuxt typecheck` (was `pnpx nuxt typecheck
|
|
98
|
+
--cwd=app`, which downloads a Nuxt via dlx instead of using the local one).
|
|
99
|
+
- CI lint job runs `pnpm typecheck` after ESLint.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Issue #250: AnimatedSection rendered content invisible in the SSR HTML
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/250-animated-section-ssr-visible`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
`useScrollAnimation` started with `isVisible = false`, and `AnimatedSection` rendered the initial animation classes (`opacity-0 translate-y-20`) for that state, on the server as well. Every product card, the features, the marquee and the top sellers were transparent until the `IntersectionObserver` fired after hydration: invisible for no-JS visitors and crawlers, and a flash of empty page on slow devices even above the fold. It also caused the remaining CLS of 0.028 on the home page (#273) once the sections faded in.
|
|
8
|
+
|
|
9
|
+
## Solution
|
|
10
|
+
|
|
11
|
+
The state is inverted to `isHidden`, default `false`:
|
|
12
|
+
|
|
13
|
+
- Server HTML and the client's first render carry the final classes (`opacity-100 translate-y-0`), so hydration matches (#239).
|
|
14
|
+
- After mount the observer's first callback decides: an element already in the viewport stays visible and is unobserved (no animation above the fold); an element below the fold gets the hidden classes and animates in when it scrolls into view. Nobody sees the switch to hidden, because it only happens off-screen.
|
|
15
|
+
- `prefers-reduced-motion: reduce`, a missing `IntersectionObserver` or a missing element: no observer, nothing is ever hidden.
|
|
16
|
+
- The observer is disconnected on unmount.
|
|
17
|
+
- The observer's root margin extends 100000 px above the viewport, so a section that a jump scrolled past (anchor link such as `#food`, End key, restored scroll position) counts as in view and is revealed too. Found with Playwright: after `mouse.wheel(0, 20000)` the last product card sat above the viewport and stayed at `opacity: 0`, with the old implementation as well.
|
|
18
|
+
|
|
19
|
+
Tests: `test/nuxt/useScrollAnimation.test.ts` (rewritten for the new state machine), `test/nuxt/AnimatedSection.test.ts` (SSR string contains the content without `opacity-0`; hide/reveal after mount).
|
|
20
|
+
|
|
21
|
+
## Verification
|
|
22
|
+
|
|
23
|
+
See the PR description.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Issue #251: shop-specific data hardcoded in the base layer
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/251-header-phone-from-config`.
|
|
4
|
+
|
|
5
|
+
## Audit of `app/` (base layer code)
|
|
6
|
+
|
|
7
|
+
| Place | Hardcoded | Now |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `Header/Right.vue` | `tel:+49610471427` (La Fattoria) | `site.telephone`, button hidden without a number |
|
|
10
|
+
| `BottomNavi.vue` (not used by any page, but exported by the layer) | OpenStreetMap directions to La Fattoria's coordinates, same phone number | `site.googleBusinessProfileUrl` for the route, `site.telephone` for the call; each button hidden without a value |
|
|
11
|
+
| `pages/bestellung/[id]/index.vue` | `tel:+4917623456789` ("call us" card) | `site.telephone`, card hidden without a number |
|
|
12
|
+
| `useValidCitiesForDelivery` | delivery cities `Obertshausen, Lämmerspiel, Hausen` and a Geoapify bounding box around Obertshausen | removed, see below |
|
|
13
|
+
|
|
14
|
+
`content/` (demo content that a shop overrides) still carries La Fattoria's phone number and gallery alt texts, the ShopBite demo's imprint and the "Kantstraße 6" pickup address in `zahlung-und-versand.md`. Left as is: it is content, not code, and every shop replaces it; worth a separate clean-up of the demo content.
|
|
15
|
+
|
|
16
|
+
## Decision on the delivery area (Lirim)
|
|
17
|
+
|
|
18
|
+
Where the shop delivers is decided by the Shopware cart rules, not by the storefront. The client-side city check is therefore gone entirely, not turned into a config:
|
|
19
|
+
|
|
20
|
+
- `useValidCitiesForDelivery`, the `validCities` option of `useAddressValidation`, `isInvalidCity` and the "An diese Adresse können wir leider nicht liefern" alert in `Address/Fields.vue` are removed; the address suggestions are no longer filtered by city.
|
|
21
|
+
- What remains is `useAddressSuggestionArea`: an optional Geoapify bounding box (`runtimeConfig.public.shopBite.addressAutocomplete.boundingBox`, `NUXT_PUBLIC_SHOP_BITE_ADDRESS_AUTOCOMPLETE_BOUNDING_BOX`) that narrows the address suggestions. Pure convenience, empty means no filter.
|
|
22
|
+
- A first version of this branch had made the cities configurable (`NUXT_PUBLIC_SHOP_BITE_DELIVERY_CITIES`); that variable does not exist.
|
|
23
|
+
|
|
24
|
+
## Behaviour change
|
|
25
|
+
|
|
26
|
+
The checkout no longer warns about cities outside the delivery area while typing; Shopware rejects such addresses through its rules as before (see #240 for how a blocked shipping method surfaces). The phone buttons need `NUXT_PUBLIC_SITE_TELEPHONE` (set with #290 anyway).
|
|
27
|
+
|
|
28
|
+
## Verification
|
|
29
|
+
|
|
30
|
+
See the PR description.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Issue #272: Restaurant and Menu schema
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `feature/272-restaurant-schema`.
|
|
4
|
+
|
|
5
|
+
## Decisions (agreed with Lirim)
|
|
6
|
+
|
|
7
|
+
- **Own builders + `useHead`** instead of `nuxt-schema-org`: the storefront already writes `CollectionPage` and `BreadcrumbList` JSON-LD by hand, the builders in `app/utils/schema.ts` are pure functions (unit-testable, an acceptance criterion), no new dependency, platform-neutral.
|
|
8
|
+
- **Menu split:** the home page carries `Restaurant` + `Menu` with one `MenuSection` per menu category (name, URL) from the menu navigation that is loaded anyway; each category page carries a `MenuSection` with its products as `MenuItem` incl. `offers.price` from the listing that is loaded anyway. A full menu on the home page would have meant ~41 listing requests during SSR and 60–80 KB more HTML for La Fattoria (#273).
|
|
9
|
+
- Data source is `runtimeConfig.public.site` (as for the footer, #290) plus two new keys: `address.country` (default `DE`) and `priceRange`. Later the plugin config (shopbite-de/shopware-plugin#15, #298) can feed the same builders.
|
|
10
|
+
- `Product` schema on product pages waits for #289 (there are no product pages yet).
|
|
11
|
+
|
|
12
|
+
## Implementation
|
|
13
|
+
|
|
14
|
+
- `buildOpeningHoursSpecification`: days with identical intervals share one entry (`dayOfWeek` array). `buildSpecialOpeningHoursSpecification`: closing days with `opens`/`closes` at `00:00` (Google's convention), dates taken from the first ten characters of the plugin's ISO timestamps (UTC; the admin enters local dates, which map to the same UTC date for CET/CEST).
|
|
15
|
+
- `useRestaurantSchema` (home page) prefetches business hours and holidays on the server (`onServerPrefetch`, same `useAsyncData` keys as `app.vue`/footer, so no duplicate requests) and reads the menu sections from `useNavigation(true).menuCardMenu`.
|
|
16
|
+
- `useMenuSectionSchema` (category listing) reads the loaded `elements`; currency from `useCommercePrice` (session context).
|
|
17
|
+
- Empty values are dropped (`compact`), so a shop without address or phone still emits a valid node.
|
|
18
|
+
|
|
19
|
+
## Pitfalls found on the first run
|
|
20
|
+
|
|
21
|
+
- Nuxt parses a numeric env value (`NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=63179`) into a number; `postalCode` is coerced to a string in the builder.
|
|
22
|
+
- `dayOfWeek` lists are sorted Monday to Sunday; the plugin returns Sunday (7) before Saturday in insertion order.
|
|
23
|
+
- Menu sections nest: `Nudeln` carries its nine pasta subcategories as `hasMenuSection`.
|
|
24
|
+
|
|
25
|
+
## Verification
|
|
26
|
+
|
|
27
|
+
Production build against the La Fattoria Store API with the NAP env variables set: the home page HTML carries one `Restaurant` node (3 KB) with address, phone, cuisine, price range, `sameAs`, two grouped `openingHoursSpecification` entries, two `specialOpeningHoursSpecification` entries (holidays from the plugin), and a `Menu` with nine sections, two of them nested. `/c/Pizza/` carries `CollectionPage`, `BreadcrumbList` and a `MenuSection` with 29 `MenuItem`s incl. `offers` in EUR (3 KB). The Rich Results Test and the Schema Markup Validator need a public URL, so that check happens after the deploy.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Issue #273: Hero video, image sizes and cache headers (mobile LCP 5.2 s)
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `feature/273-performance-hero-media`.
|
|
4
|
+
|
|
5
|
+
## Measurement (Lighthouse 12 on pizzeria-lafattoria.de, 2026-09-10)
|
|
6
|
+
|
|
7
|
+
| | Mobile | Desktop |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Performance | 68 | 88 |
|
|
10
|
+
| LCP | 5.3 s (the `<video>`) | 1.9 s (the `<video>`) |
|
|
11
|
+
| Page weight | 5.1 MB | 5.1 MB |
|
|
12
|
+
|
|
13
|
+
- Hero video `4518950-hd_1920_1080_25fps.mp4`: 3.4 MB, 1920×1080, 5 s, 4.9 Mbit/s, `autoplay` + `fetchpriority="high"`, no poster.
|
|
14
|
+
- CTA background: the category header image (4928×1400, 756 KB) from `content/index.yml`, rendered through `NuxtImg` without effect (the domain is not configured for the image provider, so no `srcset`).
|
|
15
|
+
- Gallery: six unsized, eagerly loaded images (Lighthouse `unsized-images`, `offscreen-images`).
|
|
16
|
+
- 11 requests without `Cache-Control` from `nbg1.your-objectstorage.com` (Hetzner Object Storage); the ShopBite demo Shopware (`shopware.shopbite.de`) sends `public, max-age=2592000, immutable`.
|
|
17
|
+
- bf-cache: "Internal error", not actionable (Chrome-internal, no `unload` listener in our code).
|
|
18
|
+
- The ShopBite demo's own hero video is worse: 27.6 MB, 2560×1440, 18 s.
|
|
19
|
+
|
|
20
|
+
## Decisions
|
|
21
|
+
|
|
22
|
+
- **Poster instead of video as LCP.** `hero.poster` (content) is server-rendered as `<img fetchpriority="high">` with a `<link rel="preload">`; the `<video>` is added after hydration only when `(min-width: 768px)` matches, with `preload="metadata"`, `poster` and without `fetchpriority`. Phones never request the video.
|
|
23
|
+
- **Shopware thumbnails instead of an image proxy.** Category media and product covers come with thumbnails (400/800/1920 px); `mediaSrcSet()`/`mediaSize()` (`app/utils/media.ts`) turn them into `srcset`/`width`/`height`. No `@nuxt/image` domains config: ipx would resize on the storefront container per request.
|
|
24
|
+
- Content images (CTA, marquee, gallery) are plain `<img loading="lazy">`; the gallery gets a fixed `aspect-[4/3]` box. Their size is the shop owner's responsibility, documented.
|
|
25
|
+
- The logo gets a `height` matching its aspect ratio.
|
|
26
|
+
- Cache headers on the object storage are a bucket setting, documented (Hetzner: `aws s3 cp --metadata-directive REPLACE --cache-control` or `s3cmd modify --add-header`).
|
|
27
|
+
|
|
28
|
+
## Media generated with ffmpeg (static binary via `ffmpeg-static`)
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
ffmpeg -ss 1 -i hero.mp4 -frames:v 1 -vf "scale=1280:-2" -c:v libwebp -quality 70 hero-poster.webp
|
|
32
|
+
ffmpeg -i hero.mp4 -vf "scale=1280:-2" -r 25 -c:v libx264 -crf 28 -preset medium -an -movflags +faststart hero-720p.mp4
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
| Shop | Original | 720p | Poster 1280 |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| La Fattoria | 3.4 MB | 713 KB | 65 KB |
|
|
38
|
+
| ShopBite demo | 27.6 MB | 6.0 MB | 60 KB (`public/hero-poster.webp`) |
|
|
39
|
+
|
|
40
|
+
The 720p files are not in a repository; they need to be uploaded to the respective Shopware media (no admin credentials in the storefront `.env`).
|
|
41
|
+
|
|
42
|
+
## Not covered
|
|
43
|
+
|
|
44
|
+
- `Wishlist.vue`, `CardKitchen.vue`, `FilterGroup.vue`, `ShippingMethod.vue`, `PaymentMethod.vue` still use `NuxtImg` for small icons; harmless without a provider domain.
|
|
45
|
+
- La Fattoria's `Kalam-Regular.ttf` (154 KB, `font-display: optional`) is the shop's own font.
|
|
46
|
+
- bf-cache "Internal error".
|
|
47
|
+
|
|
48
|
+
## Measuring locally: pitfalls
|
|
49
|
+
|
|
50
|
+
Lighthouse against the bare `node .output/server/index.mjs` is not comparable with production:
|
|
51
|
+
|
|
52
|
+
- Nitro does not compress SSR HTML (`compressPublicAssets` only covers static files); the reverse proxy in front of production does. Lighthouse then flags 130–480 KB of uncompressed HTML.
|
|
53
|
+
- Over HTTP/1.1 the ~110 `modulepreload` links Nuxt emits queue behind six connections and delay the CSS; production is HTTP/2. `scratchpad/h2-proxy.cjs` (TLS + h2 + gzip in front of :3099) fixes both.
|
|
54
|
+
- TTFB is 450–680 ms here (SSR calls the Store API in another data centre) vs 190 ms live.
|
|
55
|
+
- The observed (unthrottled) first paint of the local headless Chrome is ~1.5 s although HTML, CSS and poster are loaded at 0.45 s, while the live site paints at 0.4 s; nothing in the HTML hides the page. Simulated mobile FCP therefore stays around 3.2 s locally regardless of media, and mobile LCP (poster loaded at 1.6 s) is reported as 5.6 s ("render delay" ~4 s). The mobile acceptance numbers need a run against the deployed shop.
|
|
56
|
+
|
|
57
|
+
Local results (h2 proxy, La Fattoria Store API, demo content): desktop `/` 98 (LCP 1.0 s, was 88/1.9 s live), `/c/Pizza/` 98 (LCP 1.0 s); mobile `/` 66 (LCP element is the 19 KB poster, page weight 1.07 MB instead of 5.1 MB, no video request), `/c/Pizza/` 65 (category header 37 KB thumbnail instead of 756 KB, CLS 0).
|
|
58
|
+
|
|
59
|
+
The `blur-sm` on the poster made no measurable difference in the simulation; it was still removed in favour of a pre-blurred file (19 KB instead of 60 KB), which also saves the filter on real phones.
|
|
60
|
+
|
|
61
|
+
## Follow-ups worth an issue
|
|
62
|
+
|
|
63
|
+
- Mobile main-thread cost: 1.0–1.6 s script evaluation (`Bk-QZtQM.js`, the entry) and ~110 preloaded chunks; the category page ships a 541 KB (uncompressed) payload with 100 products.
|
|
64
|
+
- `AnimatedSection` renders content invisible until hydration (#250) and shifts the hero USP row (CLS 0.028 on `/`).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Issue #274: Sitemap, canonical, og:image, title template
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `feature/274-seo-sitemap-canonical-og`.
|
|
4
|
+
|
|
5
|
+
## Starting point (live, pizzeria-lafattoria.de)
|
|
6
|
+
|
|
7
|
+
- `/sitemap.xml` 404, robots.txt without `Sitemap:`.
|
|
8
|
+
- Home page: no canonical, no `og:image`, `twitter:card: summary`.
|
|
9
|
+
- Categories (`/c/Pizza/`) already had canonical, og:image and JSON-LD via `useCategorySeo`. The claim in the issue that categories have no URLs of their own was wrong.
|
|
10
|
+
- Products have no page. Shopware still generates 390 SEO URLs (`/Pizza-Margherita/21`) that return 404.
|
|
11
|
+
- `nuxt.config.ts` set `og:title` to the description (bug, fixed).
|
|
12
|
+
|
|
13
|
+
## Decisions (agreed with Lirim)
|
|
14
|
+
|
|
15
|
+
- Scope: only sitemap, canonical, og:image, title template. Product pages → #289, footer with address/phone/opening hours → #290.
|
|
16
|
+
- Product URLs later via catch-all fallback in `[...all].vue` (recorded in #289).
|
|
17
|
+
- og:image: static image via `site.ogImage`, no `nuxt-og-image`.
|
|
18
|
+
- City/cuisine (and later address, phone) via `runtimeConfig.public.site`, not via the plugin config.
|
|
19
|
+
|
|
20
|
+
## Implementation
|
|
21
|
+
|
|
22
|
+
- `@nuxtjs/sitemap` 8.5; sources: `/`, content pages (`defineSitemapSchema` in `landingpages`), `server/api/__sitemap__/urls.get.ts` (navigation `main-navigation` + menu category tree, flat via `buildTree: false`, otherwise subcategories are missing). App sources `nuxt:pages` and `nuxt:route-rules` are excluded (account/checkout, route rules like `/registrierung/bestaetigen`).
|
|
23
|
+
- `server/plugins/site-url.ts`: `storeUrl` becomes the nuxt-site-config URL so canonical, sitemap and robots.txt share one base (otherwise the request origin, which is internal behind a proxy).
|
|
24
|
+
- `app.vue`: title template (function, `%s`/`%siteName`), canonical from `route.path` (key `canonical`, categories override it with the SEO URL), `og:url`, `og:locale` from the session context, fallback `og:image`, `summary_large_image`.
|
|
25
|
+
- Page titles without the shop-name suffix; every page has its own title. `error.vue` keeps `404 | <shop name>` because `app.vue` is not rendered for error pages (no template).
|
|
26
|
+
- `usePageSeo` for the home page and content pages.
|
|
27
|
+
|
|
28
|
+
## Pitfalls
|
|
29
|
+
|
|
30
|
+
- **Trailing slash:** `@nuxtjs/sitemap` strips the trailing slash from every URL in `preNormalizeEntry` and only re-adds it globally via `site.trailingSlash`. Shopware category URLs (`/c/Pizza/`) return 404 without the slash (verified live), product URLs (`/Pizza-Margherita/21`) have none. A global `trailingSlash` therefore never fits. Solution: the source marks `_trailingSlash: true`, `server/plugins/sitemap-trailing-slash.ts` collects the paths in `sitemap:resolved` (per request in `event.context`) and re-appends the slash in `sitemap:output`. The 404 for the slashless URL is tracked as #291.
|
|
31
|
+
- For the same reason `toAbsoluteUrl` builds canonicals with `joinURL` instead of `createSitePathResolver`, which normalises slashes according to `site.trailingSlash`.
|
|
32
|
+
- **Nuxt Content** fills `seo.title`/`seo.description` automatically with `title`/`description`. A custom SEO title of the home page is therefore only detectable when it differs from `title`; otherwise `buildHomeTitle` applies.
|
|
33
|
+
- `@nuxtjs/sitemap` must come before `@nuxt/content` in `modules`; Content v3 needs the `sitemap` schema field per collection.
|
|
34
|
+
- nuxt-site-config reads all of `runtimeConfig.public.site` into its stack; the extra keys (`titleTemplate`, `ogImage`, `cuisine`, `address`) do no harm.
|
|
35
|
+
|
|
36
|
+
## Verification
|
|
37
|
+
|
|
38
|
+
Production build locally against the La Fattoria Shopware (Store API, public access key) with `NUXT_PUBLIC_STORE_URL=https://www.pizzeria-lafattoria.de`:
|
|
39
|
+
|
|
40
|
+
- robots.txt: `Sitemap: https://www.pizzeria-lafattoria.de/sitemap.xml`
|
|
41
|
+
- `/sitemap.xml` 200: home page, content pages, categories incl. subcategories with `/`, lastmod, category images
|
|
42
|
+
- Home page, `/c/Pizza/`, `/c/Nudeln/Penne/`, `/agb`, `/anmelden`, `/bestellung/warenkorb`: exactly one absolute canonical and one absolute `og:image` each, individual title
|
|
43
|
+
|
|
44
|
+
## After the release for Pizzeria La Fattoria
|
|
45
|
+
|
|
46
|
+
- Set `NUXT_PUBLIC_SITE_ADDRESS_CITY=Obertshausen`, `NUXT_PUBLIC_SITE_CUISINE`.
|
|
47
|
+
- Remove `seo.title`/`seo.description` in `content/index.yml` or fill them with search terms (currently "Pizzeria La Fattoria Obertshausen", which takes precedence over the new default).
|
|
48
|
+
- `public/card.png` exists; check it is 1200 × 630 px. Run the Facebook Sharing Debugger.
|
|
49
|
+
- The `robots.disallow` for `/impressum`, `/datenschutz`, `/agb` keeps those pages out of the sitemap.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Issue #275: Lighthouse accessibility, contrast and `aria-hidden-focus`
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/275-accessibility-contrast-aria-hidden`.
|
|
4
|
+
|
|
5
|
+
## Findings (Lighthouse 12 on pizzeria-lafattoria.de, score 92 mobile and desktop)
|
|
6
|
+
|
|
7
|
+
The issue guessed at light backgrounds and a carousel; both audits point elsewhere.
|
|
8
|
+
|
|
9
|
+
- **color-contrast** happens in the **dark mode** (the shop's default): the brand green `#4d7c0f` (`brand-500`, the `--ui-primary` of both modes) on `#171717` is 3.59:1, both as `text-primary` (`data-slot="headline"`) and as dark `text-inverted` on solid primary buttons (hero, section and CTA links). In light mode `#4d7c0f` on white is 4.99:1 and passes.
|
|
10
|
+
- **aria-hidden-focus** is not a carousel: the two `span[aria-hidden="true"][tabindex="0"]` sit before and after the toast viewport (`<ol data-slot="viewport">`). They are Reka UI's toast `FocusProxy` (`VisuallyHidden` with feature `focusable`, which sets `aria-hidden="true"` on a tabbable span), rendered while a toast is open. The store-status toast "Wir haben geschlossen!" had `duration: 0`, so the proxies existed on every page for the whole session.
|
|
11
|
+
|
|
12
|
+
Contrast of the palettes in use (WCAG ratio, target ≥ 4.5; "tint" is the 10 % tint of the colour on white that subtle buttons and badges use):
|
|
13
|
+
|
|
14
|
+
| Palette | 500 on white | 600 on white / tint | 400 on #171717 | 500 on #171717 |
|
|
15
|
+
| --- | --- | --- | --- | --- |
|
|
16
|
+
| ShopBite orange (storefront default) | 3.11 | old `#e64d00` 3.87; new `#c23d00` 5.30 / 4.59 | 6.89 | 5.76 |
|
|
17
|
+
| La Fattoria green | 4.99 | 7.12 / 6.12 | 9.07 | 3.59 |
|
|
18
|
+
| Tailwind rose (hey-amore) | 3.67 | 4.70 / ~4.1 | 6.66 | 4.88 |
|
|
19
|
+
| Tailwind red (masala-mio) | 3.76 | 4.83 / ~4.2 | 6.48 | 4.76 |
|
|
20
|
+
|
|
21
|
+
So the storefront default and both demos fail in light mode as well; nobody had run Lighthouse there. Nuxt UI's `success` green (`green-500`, `#00c950`) on the diet badges is 2.22 on white.
|
|
22
|
+
|
|
23
|
+
## Decisions (agreed with Lirim)
|
|
24
|
+
|
|
25
|
+
- Contrast: Nuxt UI convention. `--ui-primary` is `brand-600` in light mode and `brand-400` in dark mode; the storefront's own `brand-600` becomes `#c23d00` (5.30 on white, 4.59 on its tint). `--ui-success` is `green-800` light / `green-400` dark. Rule for demos: `brand-600` ≥ 5:1 on white (covers the tint), `brand-400` ≥ 4.5:1 on `#171717`.
|
|
26
|
+
- Toast proxies: instead of patching `reka-ui` (tried first: a pnpm patch of `dist/Toast/FocusProxy.{js,cjs}` without `aria-hidden` cleared the audit), the **status toasts are gone**. A permanent "closed" toast was a misuse of a transient notification; the status is now a line above the opening hours in the footer (`components/Footer/StoreStatus.vue`, `useStoreStatus`). A chip next to the logo was tried first: on phones only the dot fit, on the desktop the text ran into the navigation, and inside the logo link it broke the link's accessible name. Transient toasts stay on Nuxt UI; their proxies only exist for seconds. Upstream issue for the proxy still worth filing.
|
|
27
|
+
- The status line is client only (`ClientOnly` with a placeholder of the same size): the open/closed state depends on the current time, and the server's clock/time zone is not the shop's. Server-rendered status would need a configured time zone; separate issue if wanted.
|
|
28
|
+
- La Fattoria keeps its own `main.css`; the same `--ui-primary` and `--ui-success` changes went there as veliu/pizzerialafattoria#346.
|
|
29
|
+
|
|
30
|
+
## Implementation
|
|
31
|
+
|
|
32
|
+
- `app/assets/css/main.css`: `--ui-primary` and `--ui-success` per mode, orange `brand-600` = `#c23d00`, `brand-700` = `#a83500`.
|
|
33
|
+
- `Product/Card.vue` and `Wishlist.vue` used `text-brand-500` / `text-primary-600` for product numbers and prices; they now use `text-primary`, so they follow the mode-aware token.
|
|
34
|
+
- `useStoreStatus`: open → closing time of the current interval; closed → `getNextOpeningTime`. Refreshes the clock every minute. `app.vue` keeps loading business hours and holidays on mount but no longer shows toasts.
|
|
35
|
+
- `Footer/StoreStatus.vue`: "Geöffnet bis 23:00 Uhr" or "Geschlossen, wir öffnen wieder …", no link (the old toast's "Zur Speisekarte" action was dropped on purpose). `role="status"`, placeholder of the same height while unknown.
|
|
36
|
+
- `--ui-text-muted` in light mode is `#6b6b6b` (was `#737373`, 4.38:1 on `--ui-bg-elevated`, the header navigation background). `UHeader` gets `:title="site.name"`: Nuxt UI's default made the logo link read "Nuxt UI".
|
|
37
|
+
- Docs: contrast rule in `homepage/content/{de,en}/docs/8.storefront/2.configuration.md` and the demo-shop checklist in the root `CLAUDE.md`.
|
|
38
|
+
|
|
39
|
+
## Not covered
|
|
40
|
+
|
|
41
|
+
- `error`, `warning` and `info` keep Nuxt UI's 500 step in light mode (`red-500` on white is 3.81); form validation text would need the same treatment.
|
|
42
|
+
- The demos `hey-amore` and `masala-mio` map `brand-600` to `rose-600`/`red-600` (4.70/4.83 on white, below 5:1 on the tint). Their scales should move `brand-600` to the 700 step of their Tailwind colour.
|
|
43
|
+
|
|
44
|
+
## Verification
|
|
45
|
+
|
|
46
|
+
See the PR description.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Issue #290: Address, phone, opening hours and Google link in the footer
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `feature/290-footer-nap`.
|
|
4
|
+
|
|
5
|
+
## Decisions (agreed with Lirim)
|
|
6
|
+
|
|
7
|
+
- Data comes from `runtimeConfig.public.site` (platform-neutral, via env): `address.street`, `address.postalCode`, `address.city` (since #274), `telephone`, `googleBusinessProfileUrl`. The same values will later feed the `Restaurant` schema from #272. Long-term the values move to the Shopware plugin config (shopbite-de/shopware-plugin#15, storefront #298), env stays as fallback.
|
|
8
|
+
- A dedicated contact block above the Shopware footer navigation (not extra columns), so it stays readable regardless of the number of navigation columns.
|
|
9
|
+
- Opening hours: consecutive days with identical intervals are grouped, days without hours show as "Ruhetag". No holidays/closing days in the footer.
|
|
10
|
+
- La Fattoria: only a note in the PR, no special handling (see below).
|
|
11
|
+
|
|
12
|
+
## Implementation
|
|
13
|
+
|
|
14
|
+
- `app/components/Footer/Contact.vue` (`<address>` for NAP, `<dl>` for hours), rendered in the `#top` slot of `Footer.vue`. Empty values are hidden; without contact data and without opening hours the block renders nothing.
|
|
15
|
+
- `app/utils/openingHours.ts`: `groupOpeningHours` (weekdays 1 = Mon … 7 = Sun, seconds stripped, intervals sorted by opening time) and `toTelHref`.
|
|
16
|
+
- **SSR:** `useBusinessHours` uses `immediate: false`; `app.vue` only loads the hours `onMounted` (open/closed toast). To get the hours into the HTML, the footer calls `onServerPrefetch(() => refresh())`. The data lands in the payload under the key `business-hours`, the client hydrates with it, and `app.vue` refreshes on mount as before. Costs one Store API call per SSR render.
|
|
17
|
+
- Fixed the "Bestellsystm" typo in the footer.
|
|
18
|
+
|
|
19
|
+
## Pitfalls
|
|
20
|
+
|
|
21
|
+
- A `mockNuxtImport("useRuntimeConfig")` without `app.baseURL` breaks the router setup of the Nuxt test environment (`useRouter()` undefined, see #294; `HeaderRight.test.ts` mocks with `app.baseURL` and works). `test/nuxt/FooterContact.test.ts` sets the real runtime config via `Object.assign` instead.
|
|
22
|
+
- After switching branches across #292, `@nuxtjs/sitemap` was missing from `node_modules` (`nuxt prepare`: "Cannot resolve module"). Run `pnpm install --frozen-lockfile` after every switch to a newer `main`.
|
|
23
|
+
|
|
24
|
+
## After the release for Pizzeria La Fattoria
|
|
25
|
+
|
|
26
|
+
- Set env: `NUXT_PUBLIC_SITE_ADDRESS_STREET="Kantstr. 6"`, `NUXT_PUBLIC_SITE_ADDRESS_POSTAL_CODE=63179`, `NUXT_PUBLIC_SITE_ADDRESS_CITY=Obertshausen`, `NUXT_PUBLIC_SITE_TELEPHONE`, `NUXT_PUBLIC_SITE_GOOGLE_BUSINESS_PROFILE_URL`.
|
|
27
|
+
- **Clarify the phone number:** imprint says `+49 6104 71427`, the Shopware footer navigation `tel:+491726723920`. For NAP consistency use one number, identical to the Google Business Profile.
|
|
28
|
+
- Remove the link categories "Kantstraße 6" and "Tel: …" in the Shopware folder "Unternehmen", otherwise address and phone appear twice in the footer.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Issue #291: SEO URLs with a missing or extra trailing slash
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/291-seo-url-trailing-slash`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
`c/[...all].vue` and `speisekarte/[...all].vue` resolve the path via `useNavigationSearch().resolvePath`. That filters `/store-api/seo-url` exactly on `seoPathInfo`. Shopware stores category URLs with a trailing slash (`c/Pizza/`) and product URLs without (`Pizza-Margherita/21`). The fallback `getRouteFromPathInfo` from `@shopware/helpers` only handles technical paths (`/navigation/<id>`, `/detail/<id>`, ...) and returns `null` otherwise. Result: `/c/Pizza` → 404 (verified live).
|
|
8
|
+
|
|
9
|
+
## Solution
|
|
10
|
+
|
|
11
|
+
- `app/utils/seoPath.ts` → `resolveSeoPath(path, resolve)`: exact lookup; on a miss exactly one second lookup with the trailing slash toggled. Hits yield `redirectPath` from `seoPathInfo` (not the toggled path), so the redirect always targets the backend SEO URL. Hits without `seoPathInfo` (technical routes) do not count, `/` is not toggled.
|
|
12
|
+
- `app/composables/useSeoUrlRoute.ts` bundles resolution, 404 and `navigateTo(..., { redirectCode: 301, replace: true })` incl. query parameters. Both category pages use it; the product pages from #289 can reuse it for their URLs.
|
|
13
|
+
- The `useAsyncData` value now has the shape `{ seoUrl, redirectPath }` (key unchanged: `cmsResponse<path>`).
|
|
14
|
+
- On the side: removed a stray `H` before `<script>` in `speisekarte/[...all].vue`.
|
|
15
|
+
|
|
16
|
+
## Cost
|
|
17
|
+
|
|
18
|
+
Only paths that do not match exactly trigger a second Store API call (unknown paths from bots: 2 calls instead of 1, then 404).
|
|
19
|
+
|
|
20
|
+
## Not covered
|
|
21
|
+
|
|
22
|
+
- Non-canonical SEO URLs (old URLs after a rename, `isCanonical: false`) are still served instead of redirected to the canonical one.
|
|
23
|
+
- Technical URLs (`/navigation/<id>`) are not routed at all (they hit the content catch-all and 404); see #289 and `docs/notes/2026-09-08-issue-244-category-url-trailing-slash.md`.
|
|
24
|
+
- Differently cased paths: covered by #244 (same note).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Issue #294: Matomo without configuration loads `cdn.matomo.cloud/undefined`
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/294-matomo-without-config`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
- `$production.scripts.registry.matomoAnalytics: { trigger: "onNuxtReady" }` made the plugin generated by `@nuxt/scripts` call `useScriptMatomoAnalytics()` on every page, regardless of the configuration.
|
|
8
|
+
- The registry implementation (`runtime/registry/matomo-analytics.js`, 1.3.9) falls back to the Matomo cloud without `matomoUrl`: `https://cdn.matomo.cloud/${cloudId}/`. Without `cloudId` that becomes `.../undefined/matomo.js`.
|
|
9
|
+
- `useTrackEvent` also called `useScriptMatomoAnalytics()` unconditionally. In the dev server (no registry entry there) that loaded the script on the first tracking call with the default trigger `client`.
|
|
10
|
+
- Result without Matomo env (demo shops, new customers): a 404 in the console and a request carrying the visitor's IP to a third party without consent.
|
|
11
|
+
|
|
12
|
+
## Solution
|
|
13
|
+
|
|
14
|
+
- Registry entry removed. `app/composables/useMatomo.ts` only creates the script when `matomoUrl` and `siteId` are set in `runtimeConfig.public.scripts.matomoAnalytics`, otherwise `null`.
|
|
15
|
+
- `app/plugins/matomo.ts` (universal, so the preload stays in the SSR HTML) calls `useMatomo()` on every page; it replaces the generated registry plugin incl. page view tracking.
|
|
16
|
+
- `useTrackEvent` pushes through `useMatomo()?.proxy._paq`; without configuration tracking is a no-op.
|
|
17
|
+
- No option values are passed: `useRegistryScript` merges `runtimeConfig.public.scripts.matomoAnalytics` itself via `defu`. Plugin and `useTrackEvent` therefore get the same script instance (same key, same `src`). The rule from #259 still holds: no placeholder values in options that get inlined into the build.
|
|
18
|
+
|
|
19
|
+
## Pitfalls
|
|
20
|
+
|
|
21
|
+
- The build warning `env var NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL is set but matomoAnalytics is not registered in scripts.registry` is a false positive: the `@nuxt/scripts` validator only checks the registry entry. The values still arrive via `runtimeConfig.public.scripts.matomoAnalytics` (see verification).
|
|
22
|
+
- A `mockNuxtImport("useRuntimeConfig")` without `app.baseURL` breaks the router setup of the Nuxt test environment (`useRouter()` in `@nuxt/test-utils` is then `undefined`; `HeaderRight.test.ts` mocks with `app.baseURL` and works). `test/nuxt/useTrackEvent.test.ts` therefore sets the real runtime config.
|
|
23
|
+
|
|
24
|
+
## Verification
|
|
25
|
+
|
|
26
|
+
Production build locally against the La Fattoria Store API, three scenarios, Playwright records every request containing `matomo`:
|
|
27
|
+
|
|
28
|
+
- Without Matomo env and with `MATOMO_URL` only: no `matomo.js` reference in the SSR HTML, no request (neither `cdn.matomo.cloud` nor anything else).
|
|
29
|
+
- With URL + site ID: preload and request to `<matomoUrl>/matomo.js`, `_paq` contains `setTrackerUrl`, `setSiteId`, `trackPageView`. A client-side search from `/c/Pizza/` to `/suche?q=salat` pushes `trackSiteSearch` through the same instance (only one script request).
|
|
30
|
+
|
|
31
|
+
## Behaviour change
|
|
32
|
+
|
|
33
|
+
Matomo now depends only on the configuration, no longer on `$production`. A dev server with a complete Matomo env therefore loads Matomo from the first page view (previously only on the first tracking event).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Issue #295: Hydration mismatch on direct load of `/suche`
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/295-search-hydration-mismatch`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
Vue (dev server) named the element:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Hydration text mismatch in <SelectValue>
|
|
11
|
+
- rendered on server: "Sortieren"
|
|
12
|
+
- expected on client: "Top results"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`suche.vue` snapshotted the sorting select at setup: `ref(currentSortingOrder.value ?? "Sortieren")`. On the server the listing (`useLazyAsyncData`) resolves after setup and watchers do not run during SSR, so the server rendered the placeholder. The client hydrates with the payload present and rendered the actual sorting. Same defect as #239, which was fixed in `Category/Listing.vue` only.
|
|
16
|
+
|
|
17
|
+
## Solution
|
|
18
|
+
|
|
19
|
+
- `app/composables/useSortingSelection.ts` holds the pattern from #239 once: `currentSorting` is a writable computed that follows the listing data and keeps the user's choice as an override; setting the placeholder clears the override. Exported `SORTING_PLACEHOLDER`.
|
|
20
|
+
- `suche.vue` and `Category/Listing.vue` use it. In `suche.vue` a new search term also resets the override (as #249 did for filters), because `applySearch` sends no order and the response falls back to the default sorting.
|
|
21
|
+
- Unit test `test/unit/useSortingSelection.spec.ts` covers the setup-before-data case.
|
|
22
|
+
|
|
23
|
+
## Verification
|
|
24
|
+
|
|
25
|
+
Dev server against the demo Shopware, Playwright collecting Vue hydration warnings: before the fix `/suche?q=pizza` reported the mismatch above; after it `/suche?q=pizza`, `/suche?q=salat` and `/speisekarte/pizza/` report none. Changing the sorting on `/suche` still triggers a search request with `order` and updates the select. Production build checks in the PR.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Issue #296: Search not tracked on direct load of `/suche`
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/296-track-direct-search`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
`useListingSearch` fetches the results during SSR via `useLazyAsyncData`; they end up in the payload. On a direct load the client hydrates with them, `elements` never changes, and the `watch(elements, …)` in `suche.vue` (not `immediate`) never fires. Only a search that re-fetches on the client (query change, sorting) triggered `trackSiteSearch`. Verified on a production build: direct load of `/suche?q=pizza` → `_paq` only had `trackPageView`.
|
|
8
|
+
|
|
9
|
+
## Solution
|
|
10
|
+
|
|
11
|
+
`app/composables/useSearchTracking.ts` replaces the inline watcher:
|
|
12
|
+
|
|
13
|
+
- Watches `[elements, showSkeleton]` with `immediate: import.meta.client`, so results already present at setup are tracked as well. On the server the watcher does not fire.
|
|
14
|
+
- Tracks once per search term (`lastTrackedTerm`). A sorting change re-fetches the same term and is no longer reported again (previously it produced a second `trackSiteSearch`).
|
|
15
|
+
- Client-side navigation: the skeleton is shown until the fetch completes, so the empty initial `elements` are not tracked.
|
|
16
|
+
|
|
17
|
+
## Verification
|
|
18
|
+
|
|
19
|
+
Production build against the La Fattoria Store API with Matomo configured: direct load of `/suche?q=pizza` pushes exactly one `trackSiteSearch`; a client-side search from `/c/Pizza/` to `/suche?q=salat` still pushes one.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Issue #312: Store API criteria as POST body
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/312-store-api-criteria-post`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
The server routes for listing, category, product and cross-selling sent their
|
|
8
|
+
criteria as `_criteria` query parameters (`encodeForQuery` from
|
|
9
|
+
`@shopware/api-client/helpers`), and `useNavigation` used the
|
|
10
|
+
`readNavigationGet` operation the same way. Shopware applies `associations`
|
|
11
|
+
and `limit` from the query string, but not the `includes` projection: every
|
|
12
|
+
entity came back with all of its fields. Measured on the La Fattoria Store
|
|
13
|
+
API (category "Pizza", 100 products): the listing route returned 285 KB with
|
|
14
|
+
92 fields per product; the same criteria as a POST body returns 147 KB with
|
|
15
|
+
the 11 requested fields. `/api/category/<id>` returned 40 fields incl.
|
|
16
|
+
`cmsPage`, `children` and `translations` although the route asked for five.
|
|
17
|
+
The category page shipped 546 KB of HTML (393 KB Nuxt payload).
|
|
18
|
+
|
|
19
|
+
## Solution
|
|
20
|
+
|
|
21
|
+
- `server/utils/storeApi.ts`: `storeApiPost(path, body, { headers })` for
|
|
22
|
+
the Store API, plus `MEDIA_INCLUDES` (`media`, `media_thumbnail`,
|
|
23
|
+
`product_media`) so category and product images keep the URL, thumbnails
|
|
24
|
+
and intrinsic size that `mediaSrcSet`/`mediaSize` need (#273).
|
|
25
|
+
- Listing, category, product and cross-selling routes send their criteria as
|
|
26
|
+
the POST body; the category route lists the fields the header,
|
|
27
|
+
`useCategorySeo` and the menu-section schema read (`media`, `description`,
|
|
28
|
+
`metaTitle`, `metaDescription`, `active`, `type`, …), which used to arrive
|
|
29
|
+
only because the projection was ignored.
|
|
30
|
+
- `useNavigation` uses `readNavigation post /navigation/{activeId}/{rootId}`
|
|
31
|
+
with the criteria as body (plus `id` in the includes).
|
|
32
|
+
- Cache keys of the `defineCachedEventHandler`s are unchanged.
|
|
33
|
+
- `useNavigationSearch` (project copy of the layer composable, older) still
|
|
34
|
+
sends `_criteria` on GET for the SEO URL lookup; it uses no `includes`, so
|
|
35
|
+
nothing to gain there.
|
|
36
|
+
|
|
37
|
+
## Verification
|
|
38
|
+
|
|
39
|
+
Production build against the La Fattoria Store API (category "Pizza", 100
|
|
40
|
+
products), uncompressed sizes:
|
|
41
|
+
|
|
42
|
+
| Response | Before | After |
|
|
43
|
+
| ------------------------- | ------ | ------------------------- |
|
|
44
|
+
| `/api/listing/<id>` | 285 KB | 147 KB (11 fields/product) |
|
|
45
|
+
| `/api/category/<id>` | 40 fields | 13 fields, 1 KB |
|
|
46
|
+
| `/` HTML (Nuxt payload) | 163 KB | 111 KB (32 KB) |
|
|
47
|
+
| `/c/Pizza/` HTML (payload) | 546 KB (393 KB) | 314 KB (134 KB) |
|
|
48
|
+
|
|
49
|
+
Category media keeps `url`, `thumbnails` (400/800/1920) and `metaData`.
|
|
50
|
+
Playwright category navigation (SSR, client link navigation, redirect,
|
|
51
|
+
back) shows the same product counts and no hydration warnings. Lighthouse
|
|
52
|
+
mobile on `/c/Pizza/` is unchanged on the CPU side (TBT 600 ms, main
|
|
53
|
+
thread 3.9 s): the gain is transfer size only; script cost is #314.
|
|
54
|
+
|
|
55
|
+
The product cover projection could not be checked on La Fattoria: 39 of
|
|
56
|
+
100 products carry a `coverId`, but none of them resolves to a `cover`,
|
|
57
|
+
with or without `includes` (the media rows are gone; a data problem of that
|
|
58
|
+
instance, unrelated to this change). Verified against Shopware's public
|
|
59
|
+
demo Store API instead: the product route's criteria return 17 product
|
|
60
|
+
fields with `cover.media.{url,alt,thumbnails,metaData}`, and the listing
|
|
61
|
+
criteria return the 11 product fields with the same media shape. Option
|
|
62
|
+
images only read `media.url`, which `MEDIA_INCLUDES` keeps.
|
|
63
|
+
|
|
64
|
+
235 unit tests, Prettier, ESLint, typecheck and build pass.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Issue #313: Wishlist.vue re-imported Tailwind and Nuxt UI
|
|
2
|
+
|
|
3
|
+
As of 2026-09-10, branch `fix/313-wishlist-scoped-tailwind`.
|
|
4
|
+
|
|
5
|
+
## Cause
|
|
6
|
+
|
|
7
|
+
`app/components/Wishlist.vue` ended with a `<style scoped>` block that
|
|
8
|
+
started with `@import "tailwindcss"` and `@import "@nuxt/ui"` to make two
|
|
9
|
+
`@apply` rules for `h1`/`h2` resolve. Tailwind v4 emits the complete base
|
|
10
|
+
and the Nuxt UI theme into that scoped stylesheet, so the build shipped a
|
|
11
|
+
second `merkliste.*.css` of 288 KB (32 KB gzipped) next to the global
|
|
12
|
+
`entry.css` (253 KB). The component renders no `h1`/`h2`; the rules
|
|
13
|
+
matched nothing.
|
|
14
|
+
|
|
15
|
+
## Solution
|
|
16
|
+
|
|
17
|
+
Remove the `<style>` block. No other component imports Tailwind inside a
|
|
18
|
+
`<style>` (`Contact/Form.vue` has a plain scoped rule). If a component
|
|
19
|
+
needs `@apply` in the future, use `@reference "tailwindcss"` (Tailwind v4)
|
|
20
|
+
instead of `@import`; it resolves utilities without re-emitting the base.
|
|
21
|
+
|
|
22
|
+
## Verification
|
|
23
|
+
|
|
24
|
+
- Production build: the `merkliste.*.css` chunk is gone; the remaining
|
|
25
|
+
chunks are `entry.css` (253 KB) and `kontakt.css` (117 B).
|
|
26
|
+
- `/merkliste` on the production build against the La Fattoria Store API
|
|
27
|
+
loads only `entry.css` (25 KB gzipped), renders the empty-wishlist state
|
|
28
|
+
as before, no console errors.
|
|
29
|
+
- Prettier and ESLint pass.
|