From 67d2c9efbc7ee2edc509270d6bc5f1cea4b15724 Mon Sep 17 00:00:00 2001 From: mparvazi Date: Fri, 8 Jul 2022 20:50:01 +0430 Subject: [PATCH 01/29] Fix email subscription form UX on XS screen --- src/scss/custom/modules/_emailsubscriptions.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/scss/custom/modules/_emailsubscriptions.scss b/src/scss/custom/modules/_emailsubscriptions.scss index 763251b9b..728c0a104 100644 --- a/src/scss/custom/modules/_emailsubscriptions.scss +++ b/src/scss/custom/modules/_emailsubscriptions.scss @@ -22,6 +22,12 @@ $email-input-border-color: $input-border-color !default; display: flex; align-items: center; + @include media-breakpoint-down(sm) { + flex-direction: column; + row-gap: 0.5rem; + align-items: start; + } + input[type="email"] { padding: 0.5rem 1.25rem; margin-right: 0.5rem; From 7c3ceee87d45d263040326007a80f709e83f54f9 Mon Sep 17 00:00:00 2001 From: mparvazi Date: Mon, 25 Jul 2022 11:30:00 +0430 Subject: [PATCH 02/29] Remove spaces to make container wider for XS media --- .../views/templates/hook/ps_emailsubscription.tpl | 4 ++-- src/scss/custom/modules/_emailsubscriptions.scss | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl b/modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl index 5ad97c26d..11561f371 100644 --- a/modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl +++ b/modules/ps_emailsubscription/views/templates/hook/ps_emailsubscription.tpl @@ -5,8 +5,8 @@ {$componentName = 'email-subscription'} -
-
+
+

{l s='Get our latest news and special sales' d='Shop.Theme.Global'}

diff --git a/src/scss/custom/modules/_emailsubscriptions.scss b/src/scss/custom/modules/_emailsubscriptions.scss index 728c0a104..fffc6cbcc 100644 --- a/src/scss/custom/modules/_emailsubscriptions.scss +++ b/src/scss/custom/modules/_emailsubscriptions.scss @@ -22,14 +22,7 @@ $email-input-border-color: $input-border-color !default; display: flex; align-items: center; - @include media-breakpoint-down(sm) { - flex-direction: column; - row-gap: 0.5rem; - align-items: start; - } - input[type="email"] { - padding: 0.5rem 1.25rem; margin-right: 0.5rem; color: $email-input-color; border: 1px solid $email-input-color; From ab092a38e4a2c852711be0426b51cf88ea821293 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Fri, 2 Sep 2022 11:14:39 +0200 Subject: [PATCH 03/29] Change contact page widget to hooks --- config/theme.yml | 6 ++++++ templates/contact.tpl | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/config/theme.yml b/config/theme.yml index 066cc30ca..7ca972462 100644 --- a/config/theme.yml +++ b/config/theme.yml @@ -83,6 +83,12 @@ global_settings: displayLeftColumn: - ps_categorytree - ps_facetedsearch + displayContactLeftColumn: + - ps_contactinfo + displayContactRightColumn: + - ps_contactinfo + displayContactContent: + - ps_contactinfo displaySearch: - ps_searchbar displayProductAdditionalInfo: diff --git a/templates/contact.tpl b/templates/contact.tpl index dce9234ee..8f85b2ca7 100644 --- a/templates/contact.tpl +++ b/templates/contact.tpl @@ -9,17 +9,17 @@ {if $layout === 'layouts/layout-left-column.tpl'} {block name="left_column"}
- {widget name="ps_contactinfo" hook='displayLeftColumn'} + {hook h='displayContactLeftColumn'}
{/block} {else if $layout === 'layouts/layout-right-column.tpl'} {block name="right_column"}
- {widget name="ps_contactinfo" hook='displayRightColumn'} + {hook h='displayContactRightColumn'}
{/block} {/if} {block name='page_content'} - {widget name="contactform"} + {hook h='displayContactContent'} {/block} From 1dd68a35f68a61ee7fa8b8ad944591623258a5bc Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Fri, 2 Sep 2022 14:46:43 +0200 Subject: [PATCH 04/29] Change wrong hooked module --- config/theme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/theme.yml b/config/theme.yml index 7ca972462..375d58fd7 100644 --- a/config/theme.yml +++ b/config/theme.yml @@ -88,7 +88,7 @@ global_settings: displayContactRightColumn: - ps_contactinfo displayContactContent: - - ps_contactinfo + - contactform displaySearch: - ps_searchbar displayProductAdditionalInfo: From f08766fbb11d27146ea76567d98719c3faa43af3 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 27 Oct 2022 11:47:44 +0200 Subject: [PATCH 05/29] Fix product page overflow in mobile view --- templates/catalog/product.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/catalog/product.tpl b/templates/catalog/product.tpl index 5fbcec466..69bd9709b 100644 --- a/templates/catalog/product.tpl +++ b/templates/catalog/product.tpl @@ -29,7 +29,7 @@ {block name='content'} {* FIRST PART - PHOTO, NAME, PRICES, ADD TO CART*} -
+
{block name='product_cover_thumbnails'} {include file='catalog/_partials/product-cover-thumbnails.tpl'} From df134ecfb0c28c8ebe82b4d340259a81acc4a897 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 27 Oct 2022 14:19:28 +0200 Subject: [PATCH 06/29] Fix overflow adding col-12 in product__left Adding col-12 to mobile devices in product__left class also fix the overflow problem, not need to change row g-5 class. --- templates/catalog/product.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/catalog/product.tpl b/templates/catalog/product.tpl index 69bd9709b..2d8f5640e 100644 --- a/templates/catalog/product.tpl +++ b/templates/catalog/product.tpl @@ -29,14 +29,14 @@ {block name='content'} {* FIRST PART - PHOTO, NAME, PRICES, ADD TO CART*} -
-
+
+
{block name='product_cover_thumbnails'} {include file='catalog/_partials/product-cover-thumbnails.tpl'} {/block}
-
+
{block name='product_header'}

{block name='page_title'}{$product.name}{/block}

{/block} From 19456811467aa384c5d9c6c20e8a3f053ea62011 Mon Sep 17 00:00:00 2001 From: lucas Date: Thu, 27 Oct 2022 14:37:55 +0200 Subject: [PATCH 07/29] Change g-5 to g-lg-5 Only way I found to fix overflow in this page --- templates/catalog/product.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/catalog/product.tpl b/templates/catalog/product.tpl index 2d8f5640e..d6dc8a719 100644 --- a/templates/catalog/product.tpl +++ b/templates/catalog/product.tpl @@ -29,7 +29,7 @@ {block name='content'} {* FIRST PART - PHOTO, NAME, PRICES, ADD TO CART*} -
+
{block name='product_cover_thumbnails'} {include file='catalog/_partials/product-cover-thumbnails.tpl'} From 393df700ed855f4a085d7c28077918ce28f6c116 Mon Sep 17 00:00:00 2001 From: PululuK Date: Fri, 4 Nov 2022 10:23:16 +0100 Subject: [PATCH 08/29] Add theme preview in Readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index bb856b77b..07f176fbb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ This is a PrestaShop's theme we are working on. Please, if you work on this them [Read more](https://build.prestashop.com/news/new-theme-announce/) about this theme on the blog. +![image](https://user-images.githubusercontent.com/16455155/199937084-3d2eab3f-dc3e-488f-8b87-e8d4565219b3.png) + + ## How to build assets Same as the PrestaShop project, you need at least **NodeJS 14.x** and **NPM 7** in order to build the project. From abf32108f5d8368341549a300d012c37b250d28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Fernandez?= Date: Mon, 7 Nov 2022 11:54:38 +0100 Subject: [PATCH 09/29] Add TikTok icon --- src/img/tiktok.svg | 1 + src/scss/custom/modules/_social-sharing.scss | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 src/img/tiktok.svg diff --git a/src/img/tiktok.svg b/src/img/tiktok.svg new file mode 100644 index 000000000..924c48bfd --- /dev/null +++ b/src/img/tiktok.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/scss/custom/modules/_social-sharing.scss b/src/scss/custom/modules/_social-sharing.scss index cffc90ece..8372be907 100644 --- a/src/scss/custom/modules/_social-sharing.scss +++ b/src/scss/custom/modules/_social-sharing.scss @@ -75,6 +75,10 @@ background-position: center center; } +.tiktok { + background-image: url("../img/tiktok.svg"); +} + .rss { background-image: url("../img/rss.svg"); } From e3f82d9b4cc1b4867f161de022c285ed97dd9842 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Tue, 22 Nov 2022 11:07:22 +0100 Subject: [PATCH 10/29] Use default bootstrap colors --- .../variables/overrides/_overrides.scss | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/scss/abstract/variables/overrides/_overrides.scss b/src/scss/abstract/variables/overrides/_overrides.scss index f3a4a7e4e..010e3c466 100644 --- a/src/scss/abstract/variables/overrides/_overrides.scss +++ b/src/scss/abstract/variables/overrides/_overrides.scss @@ -1,22 +1,22 @@ // IT IS FORBIDDEN TO USE REFERENCES TO BS5 VARIABLES BECAUSE THEY ARE NOT YET DECLARED. -$primary: #16181c; -$secondary: #f39d72; -$success: #21834d; -$warning: #ff9a52; -$danger: #ff4c4c; +//$primary: #16181c; +//secondary: #f39d72; +//success: #21834d; +//warning: #ff9a52; +//danger: #ff4c4c; -$gray-100: #f6f6f6; -$gray-200: #eaebec; -$gray-300: #b3c7cd; -$gray-600: #7a7a7a; -$gray-700: #697180; -$gray-800: #363a41; -$gray-900: #232323; +//gray-100: #f6f6f6; +//gray-200: #eaebec; +//gray-300: #b3c7cd; +//gray-600: #7a7a7a; +//gray-700: #697180; +//gray-800: #363a41; +//gray-900: #232323; // THESE ARE FINE BECAUSE WE ARE REDEFINING THEM IN THIS SHEET -$text-muted: $gray-600; +//text-muted: $gray-600; -$body-color: $gray-800; +//body-color: $gray-800; // Toasts $toast-border-width: 0; From 0eab02d45a3acbe44240e3b2c28d699913eddd7d Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Tue, 22 Nov 2022 11:12:51 +0100 Subject: [PATCH 11/29] Limit gutter width --- templates/catalog/product.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/catalog/product.tpl b/templates/catalog/product.tpl index d6dc8a719..c355450c3 100644 --- a/templates/catalog/product.tpl +++ b/templates/catalog/product.tpl @@ -29,14 +29,14 @@ {block name='content'} {* FIRST PART - PHOTO, NAME, PRICES, ADD TO CART*} -
-
+
+
{block name='product_cover_thumbnails'} {include file='catalog/_partials/product-cover-thumbnails.tpl'} {/block}
-
+
{block name='product_header'}

{block name='page_title'}{$product.name}{/block}

{/block} From d26f38c4611b24c35d144f4112ef8761e1d48d54 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Wed, 23 Nov 2022 14:24:30 +0100 Subject: [PATCH 12/29] Fix: changing the country creates a new address --- templates/checkout/_partials/address-form.tpl | 2 +- templates/checkout/_partials/steps/addresses.tpl | 2 +- templates/customer/_partials/address-form.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/checkout/_partials/address-form.tpl b/templates/checkout/_partials/address-form.tpl index 60e19afd7..d69ff8977 100644 --- a/templates/checkout/_partials/address-form.tpl +++ b/templates/checkout/_partials/address-form.tpl @@ -13,7 +13,7 @@ method="POST" action="{url entity='order' params=['id_address' => $id_address]}" data-id-address="{$id_address}" - data-refresh-url="{url entity='order' params=['ajax' => 1, 'action' => 'addressForm']}" + data-refresh-url="{url entity='order' params=['ajax' => 1, 'action' => 'addressForm', 'id_address' => $id_address]}" > {/block} diff --git a/templates/checkout/_partials/steps/addresses.tpl b/templates/checkout/_partials/steps/addresses.tpl index d246cc7b9..9e6248c7f 100644 --- a/templates/checkout/_partials/steps/addresses.tpl +++ b/templates/checkout/_partials/steps/addresses.tpl @@ -9,7 +9,7 @@
{if $use_same_address}

diff --git a/templates/customer/_partials/address-form.tpl b/templates/customer/_partials/address-form.tpl index eec773ea9..daf5eb304 100644 --- a/templates/customer/_partials/address-form.tpl +++ b/templates/customer/_partials/address-form.tpl @@ -12,7 +12,7 @@ method="POST" action="{url entity='address' params=['id_address' => $id_address]}" data-id-address="{$id_address}" - data-refresh-url="{url entity='address' params=['ajax' => 1, 'action' => 'addressForm']}" + data-refresh-url="{url entity='address' params=['ajax' => 1, 'action' => 'addressForm', 'id_address' => $id_address]}" novalidate > {/block} From 42ac356884665bf1545e0fe06418f3c413b594f6 Mon Sep 17 00:00:00 2001 From: davidglezz Date: Thu, 24 Nov 2022 21:01:17 +0100 Subject: [PATCH 13/29] refactor(visible-password): simplify code Signed-off-by: davidglezz --- src/js/visible-password.ts | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/src/js/visible-password.ts b/src/js/visible-password.ts index a5328070d..630b143e2 100644 --- a/src/js/visible-password.ts +++ b/src/js/visible-password.ts @@ -6,32 +6,21 @@ const initVisiblePassword = () => { const {Theme} = window; const {visiblePassword: visiblePasswordMap} = Theme.selectors; - const visiblePasswordList = document.querySelectorAll(visiblePasswordMap.visiblePassword); + const visiblePasswordList = document.querySelectorAll(visiblePasswordMap.visiblePassword); - if (visiblePasswordList.length > 0) { - visiblePasswordList.forEach((visiblePasswordInput: HTMLInputElement) => { - const visiblePasswordBtn = visiblePasswordInput?.nextElementSibling; + visiblePasswordList.forEach((visiblePasswordInput: HTMLInputElement) => { + const visiblePasswordBtn = visiblePasswordInput?.nextElementSibling; - visiblePasswordBtn?.addEventListener('click', () => { - const visiblePasswordIcon = visiblePasswordBtn.firstElementChild; - let type = visiblePasswordInput.getAttribute('type'); - let typeIcon = 'visibility'; + visiblePasswordBtn?.addEventListener('click', () => { + const newType = visiblePasswordInput.getAttribute('type') === 'text' ? 'password' : 'text'; + visiblePasswordInput.setAttribute('type', newType); - if (type === 'password') { - type = 'text'; - typeIcon = 'visibility_off'; - } else { - type = 'password'; - } - - visiblePasswordInput.setAttribute('type', type); - - if (visiblePasswordIcon) { - visiblePasswordIcon.innerHTML = typeIcon; - } - }); + const visiblePasswordIcon = visiblePasswordBtn.firstElementChild; + if (visiblePasswordIcon) { + visiblePasswordIcon.innerHTML = newType === 'text' ? 'visibility_off' : 'visibility'; + } }); - } + }); }; export default initVisiblePassword; From 585cf76fd2e26fc8e9fc68e7ce033eb4c49ab297 Mon Sep 17 00:00:00 2001 From: davidglezz Date: Thu, 24 Nov 2022 21:02:35 +0100 Subject: [PATCH 14/29] refactor(visible-password): rename vars Signed-off-by: davidglezz --- src/js/visible-password.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/visible-password.ts b/src/js/visible-password.ts index 630b143e2..eb270856e 100644 --- a/src/js/visible-password.ts +++ b/src/js/visible-password.ts @@ -8,16 +8,16 @@ const initVisiblePassword = () => { const {visiblePassword: visiblePasswordMap} = Theme.selectors; const visiblePasswordList = document.querySelectorAll(visiblePasswordMap.visiblePassword); - visiblePasswordList.forEach((visiblePasswordInput: HTMLInputElement) => { - const visiblePasswordBtn = visiblePasswordInput?.nextElementSibling; + visiblePasswordList.forEach((input: HTMLInputElement) => { + const button = input?.nextElementSibling; - visiblePasswordBtn?.addEventListener('click', () => { - const newType = visiblePasswordInput.getAttribute('type') === 'text' ? 'password' : 'text'; - visiblePasswordInput.setAttribute('type', newType); + button?.addEventListener('click', () => { + const newType = input.getAttribute('type') === 'text' ? 'password' : 'text'; + input.setAttribute('type', newType); - const visiblePasswordIcon = visiblePasswordBtn.firstElementChild; - if (visiblePasswordIcon) { - visiblePasswordIcon.innerHTML = newType === 'text' ? 'visibility_off' : 'visibility'; + const icon = button.firstElementChild; + if (icon) { + icon.innerHTML = newType === 'text' ? 'visibility_off' : 'visibility'; } }); }); From 11a59c7d369d9e0afa16d6251c6dbaae3a34f641 Mon Sep 17 00:00:00 2001 From: davidglezz Date: Thu, 24 Nov 2022 21:12:04 +0100 Subject: [PATCH 15/29] style(visible-password): fix lint error Signed-off-by: davidglezz --- src/js/visible-password.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/visible-password.ts b/src/js/visible-password.ts index eb270856e..bcd6b4088 100644 --- a/src/js/visible-password.ts +++ b/src/js/visible-password.ts @@ -16,6 +16,7 @@ const initVisiblePassword = () => { input.setAttribute('type', newType); const icon = button.firstElementChild; + if (icon) { icon.innerHTML = newType === 'text' ? 'visibility_off' : 'visibility'; } From db97571c880b7d848bbf9db2d100f05588c5e362 Mon Sep 17 00:00:00 2001 From: mparvazi Date: Thu, 14 Jul 2022 14:28:49 +0430 Subject: [PATCH 16/29] Improve QI componenet --- src/js/components/useQuantityInput.test.ts | 2 +- src/js/components/useQuantityInput.ts | 17 ++-- .../constants/mocks/useQuantityInput-data.ts | 6 +- src/js/constants/selectors-map.ts | 2 +- .../_partials/product-customization-modal.tpl | 92 +++++++++++++++++++ .../_partials/cart-detailed-product-line.tpl | 34 ++----- .../_partials/order-confirmation-table.tpl | 7 +- 7 files changed, 117 insertions(+), 43 deletions(-) create mode 100644 templates/catalog/_partials/product-customization-modal.tpl diff --git a/src/js/components/useQuantityInput.test.ts b/src/js/components/useQuantityInput.test.ts index bf5002aba..65a414cac 100644 --- a/src/js/components/useQuantityInput.test.ts +++ b/src/js/components/useQuantityInput.test.ts @@ -28,7 +28,7 @@ describe('useQuantityInput', () => { const incrementButton = getHTMLElement(selectorsMap.qtyInput.increment); incrementButton.click(); await debounceTimeout(); - const productLineAlert = getHTMLElement(selectorsMap.qtyInput.alert(Quantify.ProductId)); + const productLineAlert = getHTMLElement(selectorsMap.qtyInput.alert(Quantify.AlertId)); mockedIncrementFetch.mockReset(); expect(productLineAlert.innerHTML).not.toBe(''); diff --git a/src/js/components/useQuantityInput.ts b/src/js/components/useQuantityInput.ts index 21928b659..2ae715660 100644 --- a/src/js/components/useQuantityInput.ts +++ b/src/js/components/useQuantityInput.ts @@ -113,8 +113,6 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha toggleButtonSpinner(targetButton, targetButtonIcon, targetButtonSpinner); - const {productId} = qtyInput.dataset; - try { const response = await sendUpdateCartRequest(requestUrl, quantity); @@ -123,7 +121,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha if (data.hasError) { const errors = data.errors as Array; - const productAlertSelector = resetAlertContainer(Number(productId)); + const productAlertSelector = resetAlertContainer(qtyInput); if (errors && productAlertSelector) { errors.forEach((error: string) => { @@ -156,7 +154,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha if (errorData.status !== undefined) { const errorMsg = `${errorData.statusText}: ${errorData.url}`; - const productAlertSelector = resetAlertContainer(Number(productId)); + const productAlertSelector = resetAlertContainer(qtyInput); useAlert(errorMsg, {type: 'danger', selector: productAlertSelector}).show(); prestashop.emit(events.handleError, { @@ -170,8 +168,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha } } } else { - // The input value is not a correct number so revert to the value in the DOM - qtyInput.value = String(baseValue); + // The input value is not a correct number showSpinButtons(qtyInputGroup); } } @@ -183,9 +180,11 @@ const getTargetButton = (qtyInputGroup: Theme.QuantityInput.InputGroup, change: return (change > 0) ? incrementButton : decrementButton; }; -const resetAlertContainer = (productId: number) => { - if (productId) { - const productAlertSelector = quantityInputMap.alert(productId); +const resetAlertContainer = (qtyInput: HTMLInputElement) => { + const {alertId} = qtyInput.dataset; + + if (alertId) { + const productAlertSelector = quantityInputMap.alert(alertId); const productAlertContainer = document.querySelector(productAlertSelector); if (productAlertContainer) { diff --git a/src/js/constants/mocks/useQuantityInput-data.ts b/src/js/constants/mocks/useQuantityInput-data.ts index cd34ec17d..499efb9d4 100644 --- a/src/js/constants/mocks/useQuantityInput-data.ts +++ b/src/js/constants/mocks/useQuantityInput-data.ts @@ -4,11 +4,12 @@ */ export const delay = 5; -export const ProductId = 1; +export const ProductId = '1'; +export const AlertId = '99999'; export const ProductLineTemplate = `

-
+
@@ -21,6 +22,7 @@ export const ProductLineTemplate = ` `#js-product-line-alert--${id}`, + alert: (param: string): string => `#js-product-line-alert--${param}`, }; export const formValidation = { diff --git a/templates/catalog/_partials/product-customization-modal.tpl b/templates/catalog/_partials/product-customization-modal.tpl new file mode 100644 index 000000000..bd41e3ffb --- /dev/null +++ b/templates/catalog/_partials/product-customization-modal.tpl @@ -0,0 +1,92 @@ + +{** + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + *} +{$componentName = 'product-customization-modal'} + +
+ {assign var=customization_modal_id value="{$componentName}--{$product.id_customization|intval}"} + + +
+ +{if isset($image_modals) && count($image_modals)} +
+ {foreach from=$image_modals item="image_modal"} + + {/foreach} +
+{/if} \ No newline at end of file diff --git a/templates/checkout/_partials/cart-detailed-product-line.tpl b/templates/checkout/_partials/cart-detailed-product-line.tpl index e4f9aa7e9..861193e42 100644 --- a/templates/checkout/_partials/cart-detailed-product-line.tpl +++ b/templates/checkout/_partials/cart-detailed-product-line.tpl @@ -1,30 +1,11 @@ {** - * Copyright since 2007 PrestaShop SA and Contributors - * PrestaShop is an International Registered Trademark & Property of PrestaShop SA - * - * NOTICE OF LICENSE - * - * This source file is subject to the Academic Free License 3.0 (AFL-3.0) - * that is bundled with this package in the file LICENSE.md. - * It is also available through the world-wide-web at this URL: - * https://opensource.org/licenses/AFL-3.0 - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to license@prestashop.com so we can send you a copy immediately. - * - * DISCLAIMER - * - * Do not edit or add to this file if you wish to upgrade PrestaShop to newer - * versions in the future. If you wish to customize PrestaShop for your - * needs please refer to https://devdocs.prestashop.com/ for more information. - * - * @author PrestaShop SA and Contributors - * @copyright Since 2007 PrestaShop SA and Contributors - * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) - *} + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + *}
-
+ {assign var=product_line_alert_id value=10|mt_rand:100000} +
@@ -43,6 +24,10 @@ {$product.name} + {if is_array($product.customizations) && $product.customizations|count} + {include file="catalog/_partials/product-customization-modal.tpl" product=$product} + {/if} + {foreach from=$product.attributes key="attribute" item="value"}
{$attribute}: @@ -90,6 +75,7 @@ "name"=>"product-quantity-spin", "data-update-url"=>"{$product.update_quantity_url}", "data-product-id"=>"{$product.id_product}", + "data-alert-id"=>"{$product_line_alert_id}", "value"=>"{$product.quantity}", "min"=>"{$product.minimal_quantity}" ] diff --git a/templates/checkout/_partials/order-confirmation-table.tpl b/templates/checkout/_partials/order-confirmation-table.tpl index 4e0437b54..5960887de 100644 --- a/templates/checkout/_partials/order-confirmation-table.tpl +++ b/templates/checkout/_partials/order-confirmation-table.tpl @@ -27,12 +27,7 @@ {/if} {if is_array($product.customizations) && $product.customizations|count} - {foreach from=$product.customizations item="customization"} - - {include file='catalog/_partials/customization-modal.tpl' customization=$customization} - {/foreach} + {include file="catalog/_partials/product-customization-modal.tpl" product=$product} {/if} {hook h='displayProductPriceBlock' product=$product type="unit_price"} From b13fd057f00b84560e358f3056eba164a4ce8795 Mon Sep 17 00:00:00 2001 From: mparvazi Date: Thu, 14 Jul 2022 15:40:29 +0430 Subject: [PATCH 17/29] Add check for input number to be integer --- src/js/components/useQuantityInput.test.ts | 13 +++++++++++++ src/js/components/useQuantityInput.ts | 6 ++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/js/components/useQuantityInput.test.ts b/src/js/components/useQuantityInput.test.ts index 65a414cac..c867f0867 100644 --- a/src/js/components/useQuantityInput.test.ts +++ b/src/js/components/useQuantityInput.test.ts @@ -81,6 +81,19 @@ describe('useQuantityInput', () => { expect(decreasedValue).toEqual(qtyMin); }); + it('should revert the value if is not an integer number', async () => { + const qtyInput = getHTMLElement('input'); + const baseValue = qtyInput.value; + qtyInput.value = '1.1'; + qtyInput.dispatchEvent(new Event('keyup')); + + const incrementButton = getHTMLElement(selectorsMap.qtyInput.increment); + incrementButton.click(); + await debounceTimeout(); + + expect(qtyInput.value).toEqual(baseValue); + }); + it('should display confirmation buttons on keyup', () => { const qtyInput = getHTMLElement('input'); qtyInput.value = '1'; diff --git a/src/js/components/useQuantityInput.ts b/src/js/components/useQuantityInput.ts index 2ae715660..452d5e405 100644 --- a/src/js/components/useQuantityInput.ts +++ b/src/js/components/useQuantityInput.ts @@ -77,6 +77,8 @@ const useQuantityInput: Theme.QuantityInput.Function = ( }); }; +const isValidInputNum = (inputNum: number) => !Number.isNaN(inputNum) && Number.isInteger(inputNum); + const changeQuantity = (qtyInput: HTMLInputElement, change: number, keyboard = false) => { const {mode} = qtyInput.dataset; @@ -85,7 +87,7 @@ const changeQuantity = (qtyInput: HTMLInputElement, change: number, keyboard = f const currentValue = Number(qtyInput.value); const min = (qtyInput.dataset.updateUrl === undefined) ? Number(qtyInput.getAttribute('min')) : 0; const newValue = Math.max(currentValue + change, min); - qtyInput.value = String(!isNaN(newValue) ? newValue : baseValue); + qtyInput.value = String(isValidInputNum(newValue) ? newValue : baseValue); } }; @@ -103,7 +105,7 @@ const updateQuantity = async (qtyInputGroup: Theme.QuantityInput.InputGroup, cha const baseValue = Number(qtyInput.getAttribute('value')); const quantity = targetValue - baseValue; - if (Number.isNaN(targetValue) === false && quantity !== 0) { + if (isValidInputNum(targetValue) && quantity !== 0) { const requestUrl = qtyInput.dataset.updateUrl; if (requestUrl !== undefined) { From 7e435bfe38d33be0d279c4eda87a2d3f1a99e2f4 Mon Sep 17 00:00:00 2001 From: NeOMakinG Date: Fri, 15 Jul 2022 10:39:48 +0200 Subject: [PATCH 18/29] Add missing end line --- templates/catalog/_partials/product-customization-modal.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/catalog/_partials/product-customization-modal.tpl b/templates/catalog/_partials/product-customization-modal.tpl index bd41e3ffb..5ef3f58c6 100644 --- a/templates/catalog/_partials/product-customization-modal.tpl +++ b/templates/catalog/_partials/product-customization-modal.tpl @@ -89,4 +89,4 @@
{/foreach}
-{/if} \ No newline at end of file +{/if} From 192bd9fa5f162e6ceab4f4f0ca3cf0179d4c6e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Fri, 2 Dec 2022 13:15:08 +0100 Subject: [PATCH 19/29] .yml file update --- config/theme.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/theme.yml b/config/theme.yml index 1e431de82..5a967e9e7 100644 --- a/config/theme.yml +++ b/config/theme.yml @@ -55,6 +55,12 @@ global_settings: - ps_linklist hooks: modules_to_hook: + displayAdminCustomers: + - blockwishlist + displayCustomerAccount: + - blockwishlist + displayMyAccountBlock: + - blockwishlist displayNav1: - ps_contactinfo displayNav2: @@ -97,6 +103,8 @@ global_settings: - ps_featuredproducts displayCrossSellingShoppingCart: - ps_featuredproducts + displayProductActions: + - blockwishlist image_types: cart_default: From 09c4567ff558820e33921e5045a0e966e8e8e8a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Fri, 2 Dec 2022 13:15:29 +0100 Subject: [PATCH 20/29] microdata files update --- templates/_partials/microdata/head-jsonld.tpl | 28 +++-- .../_partials/microdata/product-jsonld.tpl | 111 ++++++++++-------- .../microdata/product-list-jsonld.tpl | 19 +-- 3 files changed, 89 insertions(+), 69 deletions(-) diff --git a/templates/_partials/microdata/head-jsonld.tpl b/templates/_partials/microdata/head-jsonld.tpl index 3c722b9db..80f8df257 100644 --- a/templates/_partials/microdata/head-jsonld.tpl +++ b/templates/_partials/microdata/head-jsonld.tpl @@ -8,10 +8,12 @@ "@type": "Organization", "name" : "{$shop.name}", "url" : "{$urls.pages.index}", - "logo": { - "@type": "ImageObject", - "url":"{$shop.logo_details.src}" - } + {if $shop.logo_details} + "logo": { + "@type": "ImageObject", + "url":"{$shop.logo_details.src}" + } + {/if} } @@ -54,14 +56,14 @@ "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ - {foreach from=$breadcrumb.links item=path name=breadcrumb} - { - "@type": "ListItem", - "position": {$smarty.foreach.breadcrumb.iteration}, - "name": "{$path.title}", - "item": "{$path.url}" - }{if !$smarty.foreach.breadcrumb.last},{/if} - {/foreach}] - } + {foreach from=$breadcrumb.links item=path name=breadcrumb} + { + "@type": "ListItem", + "position": {$smarty.foreach.breadcrumb.iteration}, + "name": "{$path.title}", + "item": "{$path.url}" + }{if !$smarty.foreach.breadcrumb.last},{/if} + {/foreach}] + } {/if} diff --git a/templates/_partials/microdata/product-jsonld.tpl b/templates/_partials/microdata/product-jsonld.tpl index e84789ffd..ffbfdeac9 100644 --- a/templates/_partials/microdata/product-jsonld.tpl +++ b/templates/_partials/microdata/product-jsonld.tpl @@ -2,6 +2,22 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. *} +{assign var=hasAggregateRating value=false} +{if !empty($product.productComments.averageRating) && !empty($product.productComments.nbComments)} + {assign var=hasAggregateRating value=true} + {assign var=ratingValue value=$product.productComments.averageRating} + {assign var=ratingReviewCount value=$product.productComments.nbComments} +{/if} +{if !empty($ratings.avg) && !empty($nbComments)} + {assign var=hasAggregateRating value=true} + {assign var=ratingValue value=$ratings.avg} + {assign var=ratingReviewCount value=$nbComments} +{/if} +{assign var=hasWeight value=false} +{if isset($product.weight) && ($product.weight != 0)} + {assign var=hasWeight value=true} +{/if} +{assign var=hasOffers value=$product.show_price} diff --git a/templates/_partials/microdata/product-list-jsonld.tpl b/templates/_partials/microdata/product-list-jsonld.tpl index 17791ebfe..4ed2bfdea 100644 --- a/templates/_partials/microdata/product-list-jsonld.tpl +++ b/templates/_partials/microdata/product-list-jsonld.tpl @@ -7,13 +7,14 @@ "@context": "https://schema.org", "@type": "ItemList", "itemListElement": [ - {foreach from=$listing.products item=item key="position" name=productsForJsonLd} - { - "@type": "ListItem", - "position": {$position}, - "name": "{$item.name}", - "url": "{$item.url}" - }{if !$smarty.foreach.productsForJsonLd.last},{/if} - {/foreach}] - } + {foreach from=$listing.products item=item name=productsForJsonLd} + { + "@type": "ListItem", + "position": {$smarty.foreach.productsForJsonLd.iteration}, + "name": "{$item.name}", + "url": "{$item.url}" + }{if !$smarty.foreach.productsForJsonLd.last},{/if} + {/foreach} + ] + } From 65f7702a5493c184f1cd271af7f57fd41e84646e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Fri, 2 Dec 2022 13:15:59 +0100 Subject: [PATCH 21/29] header with helper logo file --- templates/_partials/header.tpl | 12 +++++++----- templates/_partials/helpers.tpl | 16 ++++++++++++++++ templates/layouts/layout-both-columns.tpl | 3 +++ 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 templates/_partials/helpers.tpl diff --git a/templates/_partials/header.tpl b/templates/_partials/header.tpl index 300bcab61..34d0d8242 100644 --- a/templates/_partials/header.tpl +++ b/templates/_partials/header.tpl @@ -51,11 +51,13 @@
{hook h='displayTop'} diff --git a/templates/_partials/helpers.tpl b/templates/_partials/helpers.tpl new file mode 100644 index 000000000..373bed663 --- /dev/null +++ b/templates/_partials/helpers.tpl @@ -0,0 +1,16 @@ +{** + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + *} + +{function renderLogo} + + + +{/function} \ No newline at end of file diff --git a/templates/layouts/layout-both-columns.tpl b/templates/layouts/layout-both-columns.tpl index 037d60897..d70fdcb4b 100644 --- a/templates/layouts/layout-both-columns.tpl +++ b/templates/layouts/layout-both-columns.tpl @@ -2,6 +2,9 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. *} + +{include file='_partials/helpers.tpl'} + From b92bd9b4d60716f428f7346be5146b877ca11c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Fri, 2 Dec 2022 13:16:13 +0100 Subject: [PATCH 22/29] missing 410.tpl --- templates/errors/410.tpl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 templates/errors/410.tpl diff --git a/templates/errors/410.tpl b/templates/errors/410.tpl new file mode 100644 index 000000000..b1d5da3c9 --- /dev/null +++ b/templates/errors/410.tpl @@ -0,0 +1,35 @@ +{** + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + *} +{extends file='page.tpl'} + +{block name="breadcrumb"}{/block} + +{block name="container_class"}container container--limited-md text-center{/block} + +{block name='page_header_container'} + {block name='page_title'} + + {/block} +{/block} + +{capture assign="errorContent"} +

{$page.title}

+

+ {l + s='If this is a recurring problem, please [1]contact us[/1]' + d='Shop.Theme.Catalog' + sprintf=[ + '[1]' => "", + '[/1]' => "" + ] + } +

+{/capture} + +{block name='page_content_container'} + {include file='errors/not-found.tpl' errorContent=$errorContent} +{/block} \ No newline at end of file From 6504727efac63ff657c577b6e1f05837ca940e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Fri, 2 Dec 2022 13:16:55 +0100 Subject: [PATCH 23/29] some templates update, variable correction --- .../_partials/product-cover-thumbnails.tpl | 8 ++++++- .../catalog/_partials/product-prices.tpl | 2 +- templates/catalog/listing/product-list.tpl | 24 +++++++------------ .../customer/_partials/my-account-links.tpl | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/templates/catalog/_partials/product-cover-thumbnails.tpl b/templates/catalog/_partials/product-cover-thumbnails.tpl index 8fa377de5..59dd3ebc9 100644 --- a/templates/catalog/_partials/product-cover-thumbnails.tpl +++ b/templates/catalog/_partials/product-cover-thumbnails.tpl @@ -75,6 +75,12 @@ {hook h='displayAfterProductThumbs' product=$product} {else} - + {/if}
diff --git a/templates/catalog/_partials/product-prices.tpl b/templates/catalog/_partials/product-prices.tpl index 5020aec45..025150710 100644 --- a/templates/catalog/_partials/product-prices.tpl +++ b/templates/catalog/_partials/product-prices.tpl @@ -56,7 +56,7 @@ {block name='product_ecotax'} {if $product.ecotax.amount> 0} -

{l s='Including %amount% for ecotax' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.ecotax_tax_inc]} +

{l s='Including %amount% for ecotax' d='Shop.Theme.Catalog' sprintf=['%amount%' => $product.ecotax.value]} {if $product.has_discount} {l s='(not impacted by the discount)' d='Shop.Theme.Catalog'} {/if} diff --git a/templates/catalog/listing/product-list.tpl b/templates/catalog/listing/product-list.tpl index 2a483a6ea..ef4ed9b65 100644 --- a/templates/catalog/listing/product-list.tpl +++ b/templates/catalog/listing/product-list.tpl @@ -19,27 +19,21 @@

{if $listing.products|count} -
- {block name='product_list_top'} - {include file='catalog/_partials/products-top.tpl' listing=$listing} - {/block} -
+ {block name='product_list_top'} + {include file='catalog/_partials/products-top.tpl' listing=$listing} + {/block} {block name='product_list_active_filters'} {$listing.rendered_active_filters nofilter} {/block} -
- {block name='product_list'} - {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-6 col-xl-4"} - {/block} -
+ {block name='product_list'} + {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-6 col-xl-4"} + {/block} -
- {block name='product_list_bottom'} - {include file='catalog/_partials/products-bottom.tpl' listing=$listing} - {/block} -
+ {block name='product_list_bottom'} + {include file='catalog/_partials/products-bottom.tpl' listing=$listing} + {/block} {else}
diff --git a/templates/customer/_partials/my-account-links.tpl b/templates/customer/_partials/my-account-links.tpl index bdfbdb5cd..0d44e430f 100644 --- a/templates/customer/_partials/my-account-links.tpl +++ b/templates/customer/_partials/my-account-links.tpl @@ -3,11 +3,11 @@ * file that was distributed with this source code. *} {block name='my_account_links'} - - From 6b9c8fa186905f960df22fc540a62d7cb686df8b Mon Sep 17 00:00:00 2001 From: davidglezz Date: Fri, 2 Dec 2022 21:17:59 +0100 Subject: [PATCH 24/29] refactor(init-customer): simplify return table checkbox logic Signed-off-by: davidglezz --- src/js/pages/customer.ts | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/js/pages/customer.ts b/src/js/pages/customer.ts index 77044f7fd..305999df7 100644 --- a/src/js/pages/customer.ts +++ b/src/js/pages/customer.ts @@ -6,21 +6,13 @@ import SelectorsMap from '@constants/selectors-map'; const initCustomer = () => { - const returnTableMainCheckbox = document.querySelector(SelectorsMap.order.returnFormMainCheckbox); - const returnTableItemCheckbox = document.querySelectorAll(SelectorsMap.order.returnFormItemCheckbox); - - if (returnTableMainCheckbox) { - returnTableMainCheckbox?.addEventListener('click', () => { - const checked: boolean = returnTableMainCheckbox?.checked; - returnTableItemCheckbox.forEach((checkbox: HTMLInputElement) => { - if (checked === true) { - checkbox.checked = true; - } else { - checkbox.checked = false; - } - }); - }); - } + const {returnFormMainCheckbox, returnFormItemCheckbox} = SelectorsMap.order; + const returnTableMainCheckbox = document.querySelector(returnFormMainCheckbox); + returnTableMainCheckbox?.addEventListener('click', () => { + const checked = !!returnTableMainCheckbox?.checked; + const itemCheckbox = document.querySelectorAll(returnFormItemCheckbox); + itemCheckbox.forEach((checkbox) => { checkbox.checked = checked; }); + }); }; export default initCustomer; From 72bd2515ca00af6dfc68ee23b0be887568b4437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=81ach?= Date: Mon, 5 Dec 2022 09:11:26 +0100 Subject: [PATCH 25/29] corrections --- templates/_partials/header.tpl | 2 -- templates/_partials/helpers.tpl | 4 ++-- templates/errors/410.tpl | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/templates/_partials/header.tpl b/templates/_partials/header.tpl index 34d0d8242..7e4f28cd5 100644 --- a/templates/_partials/header.tpl +++ b/templates/_partials/header.tpl @@ -53,9 +53,7 @@ diff --git a/templates/_partials/helpers.tpl b/templates/_partials/helpers.tpl index 373bed663..ed0cd488d 100644 --- a/templates/_partials/helpers.tpl +++ b/templates/_partials/helpers.tpl @@ -4,7 +4,7 @@ *} {function renderLogo} - + -{/function} \ No newline at end of file +{/function} diff --git a/templates/errors/410.tpl b/templates/errors/410.tpl index b1d5da3c9..d554e9bad 100644 --- a/templates/errors/410.tpl +++ b/templates/errors/410.tpl @@ -32,4 +32,4 @@ {block name='page_content_container'} {include file='errors/not-found.tpl' errorContent=$errorContent} -{/block} \ No newline at end of file +{/block} From 911691918888e53263da07e5acf1638cb2535652 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 6 Dec 2022 11:45:34 +0100 Subject: [PATCH 26/29] GA : Create artifact (and release) --- .github/workflows/build.yml | 75 +++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..6915a9878 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,75 @@ + +name: Build ZIP File +on: + pull_request: + push: + workflow_dispatch: + +jobs: + deploy: + name: Build dependencies & create artifact + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: Setup node env + uses: actions/setup-node@v2.1.2 + with: + node-version: 14 + + - name: Install dependencies + run: npm i + + - name: Build assets + run: npm run build + + - name: Remove dependencies + run: rm node_modules/ .github/ -rf + + - name: Create & Upload artifact + uses: actions/upload-artifact@v1 + with: + name: ${{ github.event.repository.name }} + path: ../ + update_release_draft: + runs-on: ubuntu-latest + needs: [deploy] + if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' + steps: + - name: Download artifact + uses: actions/download-artifact@v1 + with: + name: ${{ github.event.repository.name }} + + - id: release_info + uses: toolmantim/release-drafter@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Prepare for Release + run: | + cd ${{ github.event.repository.name }} + zip -r ${{ github.event.repository.name }}.zip ${{ github.event.repository.name }} + + - name: Clean existing assets + shell: bash + run: | + curl -fsSL https://github.com/github/hub/raw/master/script/get | bash -s 2.14.1 + assets=`bin/hub api -t repos/${{ github.repository }}/releases/${{ steps.release_info.outputs.id }}/assets | awk '/\].url/ { print $2 }'` + for asset in $assets + do + bin/hub api -X DELETE $asset + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to GitHub Release + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.release_info.outputs.upload_url }} + asset_path: ./${{ github.event.repository.name }}/${{ github.event.repository.name }}.zip + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip \ No newline at end of file From ac28ac27bf7d346c5fb3ca6ad4dbea3091d8cc48 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 6 Dec 2022 11:56:06 +0100 Subject: [PATCH 27/29] Bump actions --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6915a9878..deb54d274 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.0.0 + uses: actions/checkout@v3 - name: Setup node env - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v3 with: node-version: 14 From cb2479e6321665b36beb1c11006a32f8f15ce1e3 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 6 Dec 2022 11:57:06 +0100 Subject: [PATCH 28/29] GA : Fixed webpack config --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index deb54d274..c674e64c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,9 @@ jobs: - name: Install dependencies run: npm i + - name: Copy Webpack config + run: cp ./webpack/.env-example ./webpack/.env + - name: Build assets run: npm run build From 27ac3d6fdb3d41c7f9f927223476587074ad4617 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 6 Dec 2022 12:05:14 +0100 Subject: [PATCH 29/29] GA : Remove .git directory --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c674e64c4..c26074ccb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: npm run build - name: Remove dependencies - run: rm node_modules/ .github/ -rf + run: rm node_modules/ .github/ .git/ -rf - name: Create & Upload artifact uses: actions/upload-artifact@v1