From f50607ade83de582d7c50eff44199d489c9384eb Mon Sep 17 00:00:00 2001 From: Kevin Stederoth <43753494+ksted@users.noreply.github.com> Date: Wed, 5 Jun 2024 09:52:49 +0200 Subject: [PATCH 1/5] refactor: nuxt config (#486) - Extract i18n config - Standardize module config structure --- apps/web/i18n.config.ts | 22 +++- apps/web/nuxt.config.ts | 217 ++++++++++++++++++---------------------- 2 files changed, 117 insertions(+), 122 deletions(-) diff --git a/apps/web/i18n.config.ts b/apps/web/i18n.config.ts index 0c7c880b3..eb85d6dd6 100644 --- a/apps/web/i18n.config.ts +++ b/apps/web/i18n.config.ts @@ -1,4 +1,6 @@ -export default defineI18nConfig(() => ({ +import type { NuxtI18nOptions } from '@nuxtjs/i18n'; + +export default { fallbackLocale: 'en', detectBrowserLanguage: false, numberFormats: { @@ -17,4 +19,20 @@ export default defineI18nConfig(() => ({ }, }, }, -})); +}; + +export const nuxtI18nOptions: NuxtI18nOptions = { + locales: [ + { + code: 'en', + file: 'en.json', + }, + { + code: 'de', + file: 'de.json', + }, + ], + langDir: 'lang', + defaultLocale: 'en', + strategy: 'prefix_and_default', +}; diff --git a/apps/web/nuxt.config.ts b/apps/web/nuxt.config.ts index b33b53d34..f6382d530 100644 --- a/apps/web/nuxt.config.ts +++ b/apps/web/nuxt.config.ts @@ -1,6 +1,7 @@ // https://nuxt.com/docs/api/configuration/nuxt-config import { validateApiUrl } from './utils/pathHelper'; import cookieConfig from './cookie.config'; +import { nuxtI18nOptions } from './i18n.config'; export default defineNuxtConfig({ telemetry: false, @@ -35,96 +36,6 @@ export default defineNuxtConfig({ dirs: ['composables', 'composables/**', 'utils/**'], }, css: ['~/assets/style.scss'], - image: { - screens: { - '4xl': 1920, - '3xl': 1536, - '2xl': 1366, - xl: 1280, - lg: 1024, - md: 768, - sm: 640, - xs: 376, - '2xs': 360, - }, - }, - modules: [ - [ - '@nuxtjs/google-fonts', - { - families: { - 'Red Hat Display': { wght: [400, 500, 700] }, - 'Red Hat Text': { wght: [300, 400, 500, 700] }, - }, - }, - ], - '@nuxtjs/turnstile', - '@nuxtjs/sitemap', - [ - '@nuxtjs/tailwindcss', - { - configPath: '~/tailwind.config.ts', - }, - ], - [ - '@nuxtjs/i18n', - { - locales: [ - { - code: 'en', - file: 'en.json', - }, - { - code: 'de', - file: 'de.json', - }, - ], - langDir: 'lang', - defaultLocale: 'en', - strategy: 'prefix_and_default', - }, - ], - [ - '@vee-validate/nuxt', - { - autoImports: true, - componentNames: { - Form: 'VeeForm', - Field: 'VeeField', - FieldArray: 'VeeFieldArray', - ErrorMessage: 'VeeErrorMessage', - }, - }, - ], - [ - 'nuxt-viewport', - { - breakpoints: { - sm: 640, - md: 640, - lg: 1024, - }, - defaultBreakpoints: { - mobile: 'sm', - tablet: 'md', - desktop: 'lg', - }, - fallbackBreakpoint: 'lg', - cookie: { - expires: 365, - name: 'plenty-viewport', - path: '/', - sameSite: 'Strict', - secure: true, - }, - }, - ], - '@nuxt/image', - '@vite-pwa/nuxt', - '@nuxt/test-utils/module', - 'nuxt-lazy-hydrate', - 'nuxt-svgo', - ], // eslint-disable-next-line unicorn/expiring-todo-comments // TODO: build is consistently failing because of this. check whether we need pre-render check. nitro: { @@ -133,9 +44,6 @@ export default defineNuxtConfig({ }, compressPublicAssets: true, }, - turnstile: { - siteKey: process.env?.CLOUDFLARE_TURNSTILE_SITE_KEY, - }, routeRules: { '/_ipx/**': { headers: { 'cache-control': `public, max-age=31536000, immutable` } }, '/icons/**': { headers: { 'cache-control': `public, max-age=31536000, immutable` } }, @@ -144,18 +52,76 @@ export default defineNuxtConfig({ site: { url: '', }, + hooks: { + 'pages:extend'(pages) { + pages.push({ + name: 'product', + path: '/:slug?/:slug_2?/:slug_3?/:slug_4?/:slug_5?/:slug_6?_:itemId', + file: __dirname + '/pages/product/[slug].vue', + }); + }, + }, + runtimeConfig: { + public: { + domain: validateApiUrl(process.env.API_URL) ?? process.env.API_ENDPOINT, + apiUrl: validateApiUrl(process.env.API_URL) ?? 'http://localhost:8181', + apiEndpoint: process.env.API_ENDPOINT ?? 'https://mevofvd5omld.c01-14.plentymarkets.com', + cookieGroups: cookieConfig, + showNetPrices: true, + turnstileSiteKey: process.env?.CLOUDFLARE_TURNSTILE_SITE_KEY ?? '', + newsletterFromShowNames: process.env?.NEWSLETTER_FORM_SHOW_NAMES === '1' ?? false, + useAvif: process.env?.USE_AVIF === '1' ?? false, + useWebp: process.env?.USE_WEBP === '1' ?? false, + validateReturnReasons: process.env.VALIDATE_RETURN_REASONS === '1' ?? false, + enableQuickCheckoutTimer: process.env.ENABLE_QUICK_CHECKOUT_TIMER === '1' ?? false, + }, + }, + modules: [ + '@nuxt/image', + '@nuxt/test-utils/module', + '@nuxtjs/google-fonts', + '@nuxtjs/i18n', + '@nuxtjs/sitemap', + '@nuxtjs/tailwindcss', + '@nuxtjs/turnstile', + 'nuxt-lazy-hydrate', + 'nuxt-svgo', + 'nuxt-viewport', + '@vee-validate/nuxt', + '@vite-pwa/nuxt', + ], + image: { + screens: { + '4xl': 1920, + '3xl': 1536, + '2xl': 1366, + xl: 1280, + lg: 1024, + md: 768, + sm: 640, + xs: 376, + '2xs': 360, + }, + }, + googleFonts: { + families: { + 'Red Hat Display': { wght: [400, 500, 700] }, + 'Red Hat Text': { wght: [300, 400, 500, 700] }, + }, + }, + i18n: nuxtI18nOptions, sitemap: { + autoLastmod: true, + xsl: '/sitemap_style.xsl', xslColumns: [ // URL column must always be set, no value needed { label: 'URL', width: '75%' }, { label: 'Last Modified', select: 'sitemap:lastmod', width: '25%' }, ], - autoLastmod: true, - xsl: '/sitemap_style.xsl', sitemaps: { 'sitemap/content': { exclude: [ - '/en/**', // default language + `/${nuxtI18nOptions.defaultLocale}/**`, '/search', '/offline', '/my-account/**', @@ -174,28 +140,43 @@ export default defineNuxtConfig({ }, }, }, - hooks: { - 'pages:extend'(pages) { - pages.push({ - name: 'product', - path: '/:slug?/:slug_2?/:slug_3?/:slug_4?/:slug_5?/:slug_6?_:itemId', - file: __dirname + '/pages/product/[slug].vue', - }); + tailwindcss: { + configPath: '~/tailwind.config.ts', + }, + turnstile: { + siteKey: process.env?.CLOUDFLARE_TURNSTILE_SITE_KEY, + }, + svgo: { + global: false, + componentPrefix: 'plenty', + }, + viewport: { + breakpoints: { + sm: 640, + md: 640, + lg: 1024, + }, + defaultBreakpoints: { + mobile: 'sm', + tablet: 'md', + desktop: 'lg', + }, + fallbackBreakpoint: 'lg', + cookie: { + expires: 365, + name: 'plenty-viewport', + path: '/', + sameSite: 'Strict', + secure: true, }, }, - runtimeConfig: { - public: { - domain: validateApiUrl(process.env.API_URL) ?? process.env.API_ENDPOINT, - apiUrl: validateApiUrl(process.env.API_URL) ?? 'http://localhost:8181', - apiEndpoint: process.env.API_ENDPOINT ?? 'https://mevofvd5omld.c01-14.plentymarkets.com', - cookieGroups: cookieConfig, - showNetPrices: true, - turnstileSiteKey: process.env?.CLOUDFLARE_TURNSTILE_SITE_KEY ?? '', - newsletterFromShowNames: process.env?.NEWSLETTER_FORM_SHOW_NAMES === '1' ?? false, - useAvif: process.env?.USE_AVIF === '1' ?? false, - useWebp: process.env?.USE_WEBP === '1' ?? false, - validateReturnReasons: process.env.VALIDATE_RETURN_REASONS === '1' ?? false, - enableQuickCheckoutTimer: process.env.ENABLE_QUICK_CHECKOUT_TIMER === '1' ?? false, + veeValidate: { + autoImports: true, + componentNames: { + Form: 'VeeForm', + Field: 'VeeField', + FieldArray: 'VeeFieldArray', + ErrorMessage: 'VeeErrorMessage', }, }, pwa: { @@ -250,8 +231,4 @@ export default defineNuxtConfig({ }, registerWebManifestInRouteRules: true, }, - svgo: { - global: false, - componentPrefix: 'plenty', - }, }); From 4435c7c9bb2d2c8d244f61790e5d18de17cc4b56 Mon Sep 17 00:00:00 2001 From: doproiescu-plenty <126688988+doproiescu-plenty@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:06:31 +0300 Subject: [PATCH 2/5] test: add product attributes test (#467) * feat: add product attributes test * fix: Add product fixture * Update useProductAttributes.spec.ts * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> * Update apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> --------- Co-authored-by: Kevin Stederoth <43753494+ksted@users.noreply.github.com> --- .../__tests__/useProductAttributes.spec.ts | 56 ++++++ .../composables/useProductAttributes/types.ts | 2 + .../utils/__tests__/__fixtures__/Product.ts | 183 ++++++++++++++++++ 3 files changed, 241 insertions(+) create mode 100644 apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts create mode 100644 apps/web/utils/__tests__/__fixtures__/Product.ts diff --git a/apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts b/apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts new file mode 100644 index 000000000..f8a51ba99 --- /dev/null +++ b/apps/web/composables/useProductAttributes/__tests__/useProductAttributes.spec.ts @@ -0,0 +1,56 @@ +import ProductFixture from "./../../../utils/__tests__/__fixtures__/Product"; + +describe('useProductAttributes', () => { + it('should initialize state correctly', () => { + const { attributes, attributeValues, combinations, itemId, variationId } = useProductAttributes(); + + expect(attributes.value).toEqual([]); + expect(attributeValues.value).toEqual({}); + expect(combinations.value).toEqual([]); + expect(itemId.value).toBe(0); + expect(variationId.value).toBe(0); + }); + + it('should update attribute values', () => { + const { setAttribute, updateValue, attributeValues } = useProductAttributes(); + setAttribute(ProductFixture, true); + updateValue(1, 1); + + expect(attributeValues.value).toEqual({ 1: 1 }); + }); + + + it('should should return empty object if value is not found during update', () => { + const { setAttribute, updateValue, attributeValues } = useProductAttributes(); + setAttribute(ProductFixture, true); + updateValue(1, 2); + + expect(attributeValues.value).toEqual({}); + }); + + it('should get the correct combination of attributes', () => { + const { setAttribute, getCombination } = useProductAttributes(); + + setAttribute(ProductFixture, true); + const combination = getCombination(); + + expect(combination).toEqual({ + attributes: [], + isSalable: true, + unitCombinationId: 9, + unitId: 5, + unitName: "2 liter", + variationId: 1100, + }); + }); + + it('should get the correct attribute value', () => { + const { setAttribute, updateValue, getValue } = useProductAttributes(); + setAttribute(ProductFixture, true); + updateValue(1, 1); + + const value = getValue(1); + + expect(value).toBe(1); + }); +}); diff --git a/apps/web/composables/useProductAttributes/types.ts b/apps/web/composables/useProductAttributes/types.ts index 7e89bbc8d..c575ab5e3 100644 --- a/apps/web/composables/useProductAttributes/types.ts +++ b/apps/web/composables/useProductAttributes/types.ts @@ -15,6 +15,8 @@ export type GetCombination = () => VariationMapProductVariation | null; export interface UseProductAttributesReturn { attributes: Readonly>; + itemId: Readonly>; + variationId: Readonly>; attributeValues: Ref; combinations: Readonly>; setAttribute: SetAttribute; diff --git a/apps/web/utils/__tests__/__fixtures__/Product.ts b/apps/web/utils/__tests__/__fixtures__/Product.ts new file mode 100644 index 000000000..f63b155b4 --- /dev/null +++ b/apps/web/utils/__tests__/__fixtures__/Product.ts @@ -0,0 +1,183 @@ +import type { Product } from "@plentymarkets/shop-api"; + +export const ProductFixture: Product = { + defaultCategories: [ + { + id: 73, + parentCategoryId: null, + level: 1, + type: 'item', + linklist: true, + right: 'all', + sitemap: true, + updatedAt: '2024-01-01T00:00:00+02:00', + manually: true, + plentyId: 60796 + } + ], + filter: { + hasManufacturer: false, + isSalable: true, + isSalableAndActive: true, + hasActiveChildren: false + }, + images: { + all: [ + { + path: 'S3:157:gear-headphones-01.png', + names: [], + position: 0, + url: 'https://cdn02.plentymarkets.com/mevofvd5omld/item/images/157/full/gear-headphones-01.png', + urlSecondPreview: 'https://cdn02.plentymarkets.com/mevofvd5omld/item/images/157/secondPreview/gear-headphones-01.png', + urlPreview: 'https://cdn02.plentymarkets.com/mevofvd5omld/item/images/157/preview/gear-headphones-01.png', + urlMiddle: 'https://cdn02.plentymarkets.com/mevofvd5omld/item/images/157/middle/gear-headphones-01.png', + cleanImageName: 'gear-headphones-01.png', + height: 1430, + width: 1430 + } + ], + variation: [] + }, + item: { + id: 157, + add_cms_page: '0', + condition: { + id: 0, + names: { + lang: 'en', + name: 'New' + } + }, + storeSpecial: null, + manufacturerId: 0, + producingCountryId: 1, + revenueAccount: 0, + conditionApi: { + id: 0, + names: { + lang: 'en', + name: 'New' + } + }, + ageRestriction: 0, + itemType: 'default', + producingCountry: { + storehouseId: 0, + names: { + name: 'Germany', + lang: 'en' + }, + lang: 'de', + shippingDestinationId: 101, + id: 1, + isoCode3: 'DEU', + isCountryStateMandatory: null, + isoCode2: 'DE', + name: 'Germany', + active: 1 + }, + manufacturer: [], + rebate: 0, + salableVariationCount: 1, + customsTariffNumber: '' + }, + variation: { + position: 1, + number: '1145', + model: '', + externalId: '', + availabilityId: 1, + maximumOrderQuantity: null, + minimumOrderQuantity: 1, + intervalOrderQuantity: 1, + availableUntil: null, + releasedAt: null, + name: '', + weightG: 0, + weightNetG: 0, + widthMM: 0, + lengthMM: 0, + heightMM: 0, + unitsContained: 51, + vatId: 0, + bundleType: null, + mayShowUnitPrice: true, + customsTariffNumber: '', + availability: { + id: 1, + icon: 'av1.gif', + averageDays: 2, + createdAt: '2022-06-27 09:20:16', + updatedAt: '2022-06-27 09:20:16', + names: { + id: 42, + availabilityId: 1, + lang: 'en', + name: 'Ready for shipping, delivery in 48h', + createdAt: '2022-06-27 09:20:16', + updatedAt: '2022-06-27 09:20:16' + }, + iconPath: '/tpl/availability/av1.gif' + }, + id: 1100, + unitCombinationId: 9, + availabilityUpdatedAt: '2022-02-15T16:56:01+01:00' + }, + texts: { + name2: '', + id: 258, + description: '

Our most elegant piece

Crafted from a blend of organic pineapple peels and eucalyptus fibers this item resembles the most sustainable and yet elegant component in our collection. It comes in three different colors that were inspired by the Mongolian landscapes. Charcoal, Sand and Berry Red. 

 
 

Sustainable

 
 

Hand-crafted

 
 

Material science

Hand-crafted with love

Every thread and every fibre is carefully manufactured in our local facilities. In addition, each piece goes through our strict quality assurance processes, so that you can enjoy flawless products, every time.

', + itemId: 157, + name3: '', + lang: 'en', + metaDescription: '', + urlPath: 'headphones-capybara', + technicalData: '

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.   

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.   

Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.   

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis.   

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur

', + name1: 'Headphones Capybara', + shortDescription: '', + keywords: '' + }, + unit: { + names: { + unitId: 5, + lang: 'en', + name: 'liter' + }, + unitOfMeasurement: 'LTR', + content: 2 + }, + properties: [], + hasOrderProperties: false, + hasRequiredOrderProperty: false, + facets: [], + variationAttributeMap: { + variations: [ + { + variationId: 1100, + isSalable: true, + unitCombinationId: 9, + unitId: 5, + unitName: '2 liter', + attributes: [] + } + ], + attributes: [ + { + attributeId: 1, + position: 1, + name: '', + type: '', + values: [ + { + attributeValueId: 1, + position: 1, + name: '', + imageUrl: '', + } + ] + } + ] + } +}; + +export default ProductFixture; From b96c3df2c22bfb3a17cd82f44f01dbd7fd754fd3 Mon Sep 17 00:00:00 2001 From: Cristian Sandru <149154151+csandru-plenty@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:19:46 +0300 Subject: [PATCH 3/5] feat: extend sficonbase (#487) * feat: custom icon * feat: custom icon support * feat: custom icon support * feat: custom icon support * chore: changelog updated --- apps/web/assets/icons/edit.svg | 5 ----- apps/web/components/ui/Review/Review.vue | 18 ++++++++++++++++-- apps/web/nuxt.config.ts | 5 ----- docs/changelog/changelog_de.md | 2 +- docs/changelog/changelog_en.md | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 apps/web/assets/icons/edit.svg diff --git a/apps/web/assets/icons/edit.svg b/apps/web/assets/icons/edit.svg deleted file mode 100644 index aea583403..000000000 --- a/apps/web/assets/icons/edit.svg +++ /dev/null @@ -1,5 +0,0 @@ - - -pen - - \ No newline at end of file diff --git a/apps/web/components/ui/Review/Review.vue b/apps/web/components/ui/Review/Review.vue index 82e7e8f4f..e488937ee 100644 --- a/apps/web/components/ui/Review/Review.vue +++ b/apps/web/components/ui/Review/Review.vue @@ -12,7 +12,11 @@ - + + + @@ -57,7 +61,16 @@ - + + +
@@ -164,6 +177,7 @@ import { SfIconClose, SfTooltip, useDisclosure, + SfIconBase, } from '@storefront-ui/vue'; import type { ReviewProps } from './types'; import ReviewForm from '~/components/ReviewForm/ReviewForm.vue'; diff --git a/apps/web/nuxt.config.ts b/apps/web/nuxt.config.ts index f6382d530..831c8fc78 100644 --- a/apps/web/nuxt.config.ts +++ b/apps/web/nuxt.config.ts @@ -85,7 +85,6 @@ export default defineNuxtConfig({ '@nuxtjs/tailwindcss', '@nuxtjs/turnstile', 'nuxt-lazy-hydrate', - 'nuxt-svgo', 'nuxt-viewport', '@vee-validate/nuxt', '@vite-pwa/nuxt', @@ -146,10 +145,6 @@ export default defineNuxtConfig({ turnstile: { siteKey: process.env?.CLOUDFLARE_TURNSTILE_SITE_KEY, }, - svgo: { - global: false, - componentPrefix: 'plenty', - }, viewport: { breakpoints: { sm: 640, diff --git a/docs/changelog/changelog_de.md b/docs/changelog/changelog_de.md index 906249278..98d799e35 100644 --- a/docs/changelog/changelog_de.md +++ b/docs/changelog/changelog_de.md @@ -4,7 +4,7 @@ ### Hinzugefügt -- Unterstützung für benutzerdefinierte SVG-Symbole hinzufügen +- Benutzerdefiniertes SVG-Symbol hinzugefügt - Lazy Load-Bilder - eine Gast-Anmeldeseite vor der Kasse - Auswahl für die gespeicherten Adressen an der Kasse diff --git a/docs/changelog/changelog_en.md b/docs/changelog/changelog_en.md index b4ba5362b..2b000d24f 100644 --- a/docs/changelog/changelog_en.md +++ b/docs/changelog/changelog_en.md @@ -4,7 +4,7 @@ ### New -- Add custom SVG icon support +- Added custom SVG icon - Lazy-load images - a guest login page before going to checkout - Width and height attributes to images on category and product view From 1a821a2a813dc4456451e066ac67885f563a3f26 Mon Sep 17 00:00:00 2001 From: Fabian Gerke <124085586+FabianGerke@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:48:05 +0200 Subject: [PATCH 4/5] chore: german registration texts (#489) * chore: german registration texts * Update de.json * fix: image attribute path * Update de.json --- .../ProductAttributes/AttributeImage/AttributeImage.vue | 3 ++- apps/web/lang/de.json | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/web/components/ProductAttributes/AttributeImage/AttributeImage.vue b/apps/web/components/ProductAttributes/AttributeImage/AttributeImage.vue index fd719b8c2..667767155 100644 --- a/apps/web/components/ProductAttributes/AttributeImage/AttributeImage.vue +++ b/apps/web/components/ProductAttributes/AttributeImage/AttributeImage.vue @@ -56,7 +56,8 @@ const getLabel = (item: VariationMapProductAttributeValue): string => { }; const getImagePath = (item: VariationMapProductAttributeValue): string => { - return domain + productAttributeGetters.getAttributeValueImageUrl(item); + const path = productAttributeGetters.getAttributeValueImageUrl(item); + return path.startsWith('http') ? path : domain + path; }; const validationSchema = toTypedSchema( diff --git a/apps/web/lang/de.json b/apps/web/lang/de.json index b3fb305e2..c4317ef28 100644 --- a/apps/web/lang/de.json +++ b/apps/web/lang/de.json @@ -560,10 +560,10 @@ "imageAlt": "Bild zum Bestätigen der erfolgreichen Anmeldung" }, "benefits": { - "saveAddresses": "Save multiple addresses", - "orderTracking": "Keep track of your orders", - "wishlist": "Save items for later everywhere you go", - "orderHistory": "Your complete order history in one place" + "saveAddresses": "Speichern Sie mehrere Adressen", + "orderTracking": "Behalten Sie den Überblick über Ihre Bestellungen", + "wishlist": "Speichern Sie Ihre Artikel für später", + "orderHistory": "Ihre komplette Bestellhistorie an einem Ort" }, "passwordValidation": { "characters": "Das Passwort muss mindestens 8 Zeichen lang sein.", From 97e5bfcee87c32a52a8fd046d4a1a0cc525d8cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20R=C3=B6ll?= <30629157+maxiroellplenty@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:54:37 +0200 Subject: [PATCH 5/5] chore: changelog 1.4.1 (#485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: changelog 1.4.1 * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_de.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * chore: adjust changelog * Update docs/changelog/changelog_en.md Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> * chore: update changelog * chore: change date * chore: typo * Update changelog_de.md * Update changelog_de.md * Update changelog_en.md * Update changelog_de.md * Update changelog_en.md * Update changelog_de.md * fix: format --------- Co-authored-by: Tim Müller-Späth <11943448+Tim-M-S@users.noreply.github.com> Co-authored-by: Franz Mutschler <36404400+fmutschler@users.noreply.github.com> --- docs/changelog/changelog_de.md | 84 ++++++++++++++++---------------- docs/changelog/changelog_en.md | 87 ++++++++++++++++------------------ 2 files changed, 82 insertions(+), 89 deletions(-) diff --git a/docs/changelog/changelog_de.md b/docs/changelog/changelog_de.md index 98d799e35..a11fdd456 100644 --- a/docs/changelog/changelog_de.md +++ b/docs/changelog/changelog_de.md @@ -1,58 +1,56 @@ # Changelog plentyshopPWA -## v1.4.1 (2024-xx-xx) +## v1.4.1 (2024-06-05) ### Hinzugefügt -- Benutzerdefiniertes SVG-Symbol hinzugefügt -- Lazy Load-Bilder -- eine Gast-Anmeldeseite vor der Kasse -- Auswahl für die gespeicherten Adressen an der Kasse -- Breiten- und Höhenattribute für Bilder in der Kategorie- und Produktansicht -- Artikelbewertung -- Anpassung des Produktnamens in den Dokumentationsdateien. -- Schnellkasse-Funktionalität hinzugefügt. -- Menge zum Produktnamen der Schnellkasse hinzugefügt. -- Übersetzungen von Cookiebar +- Benutzerdefinierte SVG-Symbole werden jetzt unterstützt. +- Bilder außerhalb des sichtbaren Bereichs werden jetzt mit Lazy Loading geladen. +- Ein Anmelde-Dialog vor dem Checkout wurde hinzugefügt. +- Die Auswahl der gespeicherten Adressen im Checkout wurde hinzugefügt. +- Bilder in der Kategorie- und Artikelansicht erhalten jetzt Breiten- und Höhenattribute. +- Artikelseiten können jetzt Produktbewertungen darstellen. +- "Artikel zum Warenkorb hinzugefügt"-Dialog wurde hinzugefügt. ### Behoben -- Fester Gutschein wird auf der Dankeschön-Seite angezeigt -- Probleme im Zusammenhang mit Produktbewertungen behoben -- Fehlende Details auf der Dankesseite behoben -- Lokale E2E-Tests behoben -- Fehler bei der Interaktion mit der Wunschliste behoben -- DefineExpose-Compilerfehler behoben -- Behoben: Zufällige Nuxt-Instanz nicht verfügbar -- Hydration und intlify Warnungen wurden behoben. -- Es wird sicher gestellt, dass sich kein `/` am Ende der API_URL befindet. -- Bilderqualität verbessert auf der Kategorieseite -- Die Facettenfilterung auf der Kategorieseite wurde korrigiert -- Zufälliger Anmeldefehler behoben -- Neuer Artikel im Warenkorb erstellen, anstatt die Menge zu aktualisieren -- Zugriff auf Bundle-Elemente über Hyperlink, sofern dieser nicht vollständig ist -- Fehler beim Filtern im SSR in der Kategorieansicht behoben -- Die Sichtbarkeit des Namen vom Login Button -- Die Middleware unterstützt jetzt IPv6-Adressen -- Der PayPal-Express-Button auf der Produktseite verarbeitet das Klickereignis nun korrekt. -- Lighthouse-Fehler bezüglich der Größe des zur Wunschliste hinzufügen Buttons behoben. -- Rückgabebild entfernt. -- Verbesserte mobile Ansicht der Cookie-Leiste. +- Die Gutscheindarstellung auf der Bestellbestätigung war fehlerhaft. Dies wurde behoben. +- Probleme im Zusammenhang mit der Darstellung von Produktbewertungen wurden behoben. +- Fehlende Details auf der Bestellbestätigung wurden hinzugefügt. +- Ein Fehler bei der Interaktion mit der Wunschliste wurde behoben. +- Ein "DefineExpose"-Compiler-Fehler wurde behoben. +- Ein "Nuxt-Instanz nicht verfügbar" Fehler wurde behoben. +- Hydration- und intlify-Warnungen wurden behoben. +- Es wird nun sichergestellt, dass sich kein Slash am Ende der API_URL befindet. +- Die Bilderqualität in der Kategorieansicht wurde verbessert. +- Die Facettenfilterung auf der Kategorieseite wurde korrigiert. +- Ein zufälliger Fehler bei der Anmeldung wurde behoben. +- Beim Hinzufügen eines bereits im Warenkorb befindlichen Artikels wird jetzt die Anzahl des Artikels erhöht, anstatt den selben Artikel erneut zum Warenkorb hinzuzufügen. +- Bestandteile von Artikelpaketen ohne Artikel-URL führen jetzt nicht mehr zu einer 404 Seite. +- Bestandteile von Artikelpaketen, für die kein Name hinterlegt ist, zeigen jetzt den Platzhalter "Product Information Missing" an der Stelle des Namens an. +- Durch Filter in der Kategorieansicht kam es zu einem Server-Side-Rendering-Fehler. Dies wurde behoben. +- Die Login-Schaltfläche ist jetzt barrierefrei. +- Die Middleware unterstützt jetzt IPv6-Adressen. +- Der PayPal-Express-Button auf der Artikelseite verarbeitet das Klickereignis jetzt korrekt. +- Die Größe der "Zur Wunschliste hinzufügen"-Schaltfläche wurde angepasst. +- Das Rückgabebild wurde entfernt. +- Die mobile Ansicht der Cookiebar wurde verbessert. - Die Ränder der Schaltflächen zum Schließen der Wunschliste wurden korrigiert. -- Problem mit der Verschiebung des Wagenlader-Layouts behoben. -- Leeres Wunschlistenbild entfernt. -- Bilder der Attribute in der Produktansicht werden nun richtig angezeigt. -- Das Laden externer Cookie-Skripte wurde behoben. -- Fehlende Übersetzungen für die Cookie-Leiste wurden hinzugefügt. +- Ein Layout-Shift-Problem beim Laden des Warenkorbs wurde behoben. +- Das leere Wunschlistenbild wurde entfernt. +- Bilder von Attributen in der Artikelansicht werden jetzt korrekt angezeigt. +- Ein Fehler beim Laden externer Cookie-Skripte wurde behoben. +- Fehlende Übersetzungen für die Cookiebar wurden hinzugefügt. ### Geändert -- Konvertierung von Hauptseitenbildern (avif) -- Styling der Benachrichtigungsanzeige -- Registrierungsformular wurde verbessert -- Die Barrierefreiheit der Bewertungen wurde für die Kategorie- und Produktseite verbessert -- Verschiedene Größen für Demo-Bilder basierend auf dem Ansichtsfenster -- Das Design der Sitemap wurde angepasst +- Demo-Bilder der Homepage wurden in das Format AVIF konvertiert. +- Das Styling der Benachrichtigungsanzeige wurde angepasst. +- Das Formular für die Kundenregistrierung wurde verbessert. +- Die Barrierefreiheit der Bewertungen auf der Kategorie- und Artikelseite wurde verbessert. +- Demo-Bilder haben jetzt verschiedene Größen, basierend auf dem Ansichtsfenster. +- Das Design der Sitemap wurde angepasst. +- Es wird jetzt gekennzeichnet, ob ein Eingabefeld optional oder ein Pflichtfeld ist. ## v1.4.0 (2024-04-15) diff --git a/docs/changelog/changelog_en.md b/docs/changelog/changelog_en.md index 2b000d24f..64ca89ed3 100644 --- a/docs/changelog/changelog_en.md +++ b/docs/changelog/changelog_en.md @@ -1,61 +1,56 @@ # Changelog plentyshopPWA -## v1.4.1 (2024-xx-xx) +## v1.4.1 (2024-06-05) Overview of all changes ### New -- Added custom SVG icon -- Lazy-load images -- a guest login page before going to checkout -- Width and height attributes to images on category and product view -- Selection for the saved addresses at checkout -- Product reviews on single item pages -- Product renaming in the documentation files -- Added quick checkout functionality. -- Added quantity to quick checkout product name -- cookie bar translations. +- Custom SVG icons are now supported. +- Images outside the visible area are now lazy loaded. +- The login dialogue before checkout has been added. +- The Selection of saved addresses in the checkout has been added. +- Images in category and item views now have width and height attributes. +- Item pages can now display reviews. +- “Item added to shopping cart” dialogue has been added. ### Fixed -- Fixed coupon display on thankyou page -- Fixed issues related to product reviews -- Fixed thank-you page missing details -- Fixed local e2e tests -- Fixed errors when interacting with wishlist -- Fixed defineExpose compiler error -- Fixed random Nuxt instance unavailable -- We do now ensure that there is no `/` at the end of the API_URL. -- Fixed facet filtering on category page -- Fixed random login error -- Fixed hydration and intlify warnings -- The PayPal express button on the product page handles the click event correctly. -- Creating new item in basket, instead of updating quantity -- Fixed aspect ratio on homepage hero img -- Bundle item accessability via hyperlink, if not fully set -- Fixed the filtering in SSR on the category page -- Fixed bad image quality on category view -- Fixed acccessibility of the login button name -- The middleware does now support IPv6 addresses -- Fixed lighthouse error regarding wishlist button size. -- Removed returns image. -- Improved cookie bar mobile view. -- Fixed wishlist close button margins. -- Fixed cart loader layout shift issue. -- Show review form on login from review button. -- Removed empty wishlist image. -- Images of the attributes in the product view are now displayed correctly. -- Fixed external cookie script load. -- Fixed missing translations in the cookie bar. +- The display of coupons in the order confirmation was not working properly. This has been fixed. +- Some issues related to the display of item reviews have been fixed. +- Missing details have been added to the order confirmation. +- Interacting with the wishlist was not working as intended. This has been fixed. +- A "defineExpose" compiler error has been fixed. +- A random "Nuxt instance unavailable" error has been fixed. +- Hydration and intlify warnings have been fixed. +- Slashes at the end of the API_URL are now removed. +- The quality of images in the category view has been improved. +- The facet filtering on category pages has been corrected. +- A random login error has been fixed. +- When adding an item to the shopping cart that is already in the shopping cart, the item's quantity is now increased. +- Components of item bundles without an item URL no longer lead to a 404 page. +- Components of item bundles without a name now display the placeholder "Product Information Missing" in place of the name +- Filters on the category view could lead to a server-side rendering error. This has been fixed. +- The login button is now acessible. +- The middleware now supporty IPv6 addresses. +- The PayPal express button on the product page now handles the click event correctly. +- Fixed a lighthouse error regarding the wishlist button size. +- The returns image has been removed. +- The cookie bar mobile view has been improved. +- The wishlist close button margins have been corrected. +- A cart loader layout shift issue has been fixed. +- An empty wishlist image has been removed. +- Images of the attributes in the item view are now displayed correctly. +- An error regarding external cookie script loading has been fixed. +- The missing translations in the cookie bar have been added. ### Changed -- Styling of notifications +- Demo images on the homepage have been converted to AVIF format. +- The styling of notifications has been adjusted. +- The customer registration form has been improved. +- Reviews in category and item views are now accessible. +- Demo images now have different sizes, based on the user's viewport. +- The design of the sitemap has been adjusted. - Mark optional and required form fields. -- Improved the registration form -- Main page images conversion (avif) -- Accessibility for the category and product page for reviews -- Different sizes for demo images based on viewport -- The design of the sitemap changed ## v1.4.0 (2024-04-15)