From 06e2c6b5d07eb7ff116519feb400442206621fac Mon Sep 17 00:00:00 2001 From: The Nguyen <6950941+treoden@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:36:25 +0700 Subject: [PATCH 1/2] Fix loading extensions multiple time when no extension is actived --- packages/evershop/bin/extension/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/evershop/bin/extension/index.js b/packages/evershop/bin/extension/index.js index b68687e27..460238a22 100644 --- a/packages/evershop/bin/extension/index.js +++ b/packages/evershop/bin/extension/index.js @@ -5,7 +5,7 @@ const { getConfig } = require('@evershop/evershop/src/lib/util/getConfig'); const { getCoreModules } = require('@evershop/evershop/bin/lib/loadModules'); const { warning } = require('@evershop/evershop/src/lib/log/logger'); -let extensions = []; +let extensions; function loadExtensions() { const coreModules = getCoreModules(); @@ -42,7 +42,7 @@ function loadExtensions() { } module.exports.getEnabledExtensions = function getEnabledExtensions() { - if (extensions.length === 0) { + if (extensions === undefined) { extensions = loadExtensions(); } return extensions; From 89393a867a1996ff212965bc8adc14c27e5a2da2 Mon Sep 17 00:00:00 2001 From: The Nguyen <6950941+treoden@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:27:51 +0700 Subject: [PATCH 2/2] Reset tailwind configuration. Use the default options #322 --- .prettierignore | 4 +- .../categoryView/filter/AttributeFilter.jsx | 4 +- .../categoryView/filter/CategoryFilter.jsx | 2 +- .../frontStore/catalog/product/list/List.jsx | 8 +- .../catalog/product/list/Pagination.jsx | 2 +- .../catalog/product/list/Sorting.jsx | 4 +- .../catalog/product/list/item/Name.jsx | 2 +- .../frontStore/checkout/cart/Empty.jsx | 6 +- .../checkout/cart/items/ItemOptions.jsx | 2 +- .../cart/items/ItemVariantOptions.jsx | 2 +- .../frontStore/checkout/cart/items/Items.jsx | 6 +- .../payment/paymentStep/StepContent.jsx | 12 +- .../checkout/checkout/summary/Items.jsx | 2 +- .../checkout/checkout/summary/Items.scss | 1 - .../frontStore/customer/checkout/Edit.jsx | 6 +- .../stripe/checkout/CheckoutForm.jsx | 6 +- .../frontStore/stripe/checkout/TestCards.jsx | 4 +- .../graphql/types/Category/Category.graphql | 2 +- .../types/Collection/Collection.graphql | 2 +- .../frontStore/categoryView/CategoryView.jsx | 2 +- .../homepage/FeaturedCategories.jsx | 16 +-- .../frontStore/homepage/FeaturedProducts.jsx | 4 +- .../pages/frontStore/productView/Form.jsx | 6 +- .../frontStore/productView/GeneralInfo.jsx | 2 +- .../pages/frontStore/productView/Images.jsx | 2 +- .../pages/frontStore/productView/Layout.jsx | 2 +- .../pages/frontStore/productView/Variants.jsx | 19 +-- .../pages/frontStore/cart/ShoppingCart.jsx | 2 +- .../pages/frontStore/cart/Summary.jsx | 8 +- .../pages/frontStore/checkout/Checkout.jsx | 10 +- .../frontStore/checkout/ShippingMethods.jsx | 8 +- .../checkoutSuccess/CheckoutSuccess.jsx | 2 +- .../checkoutSuccess/CustomerInfo.jsx | 20 ++-- .../cms/pages/frontStore/all/Breadcrumb.jsx | 2 +- .../cms/pages/frontStore/all/Layout.jsx | 2 +- .../modules/cms/pages/frontStore/all/Menu.jsx | 2 +- .../services/tailwind.frontStore.config.js | 112 +----------------- .../frontStore/checkout/CashOnDelivery.jsx | 2 +- .../frontStore/account/AccountDetails.jsx | 6 +- .../pages/frontStore/account/Layout.jsx | 10 +- .../pages/frontStore/account/OrderHistory.jsx | 2 +- .../pages/frontStore/checkout/Paypal.jsx | 7 +- .../pages/frontStore/cart/Coupon.jsx | 4 +- .../pages/frontStore/checkout/Stripe.jsx | 4 +- 44 files changed, 113 insertions(+), 220 deletions(-) diff --git a/.prettierignore b/.prettierignore index b6d6f4433..58ad2bacf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,4 +2,6 @@ /* # Except packages: -!/packages \ No newline at end of file +!/packages +!/themes +!/extensions \ No newline at end of file diff --git a/packages/evershop/src/components/frontStore/catalog/categoryView/filter/AttributeFilter.jsx b/packages/evershop/src/components/frontStore/catalog/categoryView/filter/AttributeFilter.jsx index 233f3c1cf..7b79084ee 100644 --- a/packages/evershop/src/components/frontStore/catalog/categoryView/filter/AttributeFilter.jsx +++ b/packages/evershop/src/components/frontStore/catalog/categoryView/filter/AttributeFilter.jsx @@ -66,7 +66,7 @@ export function AttributeFilter({ return ( <> {availableAttributes.map((a) => ( -
+
{a.attributeName}
@@ -79,7 +79,7 @@ export function AttributeFilter({ ); return ( -
  • +
  • +
    {_('Category')}
    diff --git a/packages/evershop/src/components/frontStore/catalog/product/list/List.jsx b/packages/evershop/src/components/frontStore/catalog/product/list/List.jsx index db6020151..cd4bb5240 100644 --- a/packages/evershop/src/components/frontStore/catalog/product/list/List.jsx +++ b/packages/evershop/src/components/frontStore/catalog/product/list/List.jsx @@ -19,16 +19,16 @@ export default function ProductList({ products = [], countPerRow = 3 }) { let className; switch (countPerRow) { case 3: - className = 'grid grid-cols-2 md:grid-cols-3 gap-2'; + className = 'grid grid-cols-2 md:grid-cols-3 gap-10'; break; case 4: - className = 'grid grid-cols-2 md:grid-cols-4 gap-2'; + className = 'grid grid-cols-2 md:grid-cols-4 gap-10'; break; case 5: - className = 'grid grid-cols-2 md:grid-cols-5 gap-2'; + className = 'grid grid-cols-2 md:grid-cols-5 gap-10'; break; default: - className = 'grid grid-cols-2 md:grid-cols-3 gap-2'; + className = 'grid grid-cols-2 md:grid-cols-3 gap-10'; } return ( diff --git a/packages/evershop/src/components/frontStore/catalog/product/list/Pagination.jsx b/packages/evershop/src/components/frontStore/catalog/product/list/Pagination.jsx index 54c22824c..d0ac632b2 100644 --- a/packages/evershop/src/components/frontStore/catalog/product/list/Pagination.jsx +++ b/packages/evershop/src/components/frontStore/catalog/product/list/Pagination.jsx @@ -67,7 +67,7 @@ export function Pagination({ total, limit, currentPage }) { return (
    -
    diff --git a/packages/evershop/src/modules/checkout/pages/frontStore/checkout/Checkout.jsx b/packages/evershop/src/modules/checkout/pages/frontStore/checkout/Checkout.jsx index 576467e0d..fcc07b134 100644 --- a/packages/evershop/src/modules/checkout/pages/frontStore/checkout/Checkout.jsx +++ b/packages/evershop/src/modules/checkout/pages/frontStore/checkout/Checkout.jsx @@ -20,7 +20,7 @@ function Steps() { function Breadcrumb() { const steps = useCheckoutSteps(); return ( -
    +
    {steps.map((step, index) => { const separator = index < steps.length - 1 ? ( @@ -57,12 +57,12 @@ function CompletedSteps() { } return ( -
    -
    +
    +
    {completedSteps.map((step) => (
    {step.previewTitle} @@ -105,7 +105,7 @@ export default function CheckoutPage({ getPaymentMethodAPI={getPaymentMethodAPI} checkoutSuccessUrl={checkoutSuccessUrl} > -
    +
    )} -

    {_('Shipping Method')}

    +

    {_('Shipping Method')}

    {addressProvided === true && methods.length === 0 && ( -
    +
    {_('Sorry, there is no available method for your address')}
    )} {addressProvided === false && ( -
    +
    {_('Please enter a shipping address in order to see shipping quotes')}
    )} {methods.length > 0 && ( -
    +
    +
    diff --git a/packages/evershop/src/modules/checkout/pages/frontStore/checkoutSuccess/CustomerInfo.jsx b/packages/evershop/src/modules/checkout/pages/frontStore/checkoutSuccess/CustomerInfo.jsx index 82c3846dd..c560d4d64 100644 --- a/packages/evershop/src/modules/checkout/pages/frontStore/checkoutSuccess/CustomerInfo.jsx +++ b/packages/evershop/src/modules/checkout/pages/frontStore/checkoutSuccess/CustomerInfo.jsx @@ -46,11 +46,11 @@ export default function CustomerInfo({
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +

    {_('Contact information')}

    @@ -59,7 +59,7 @@ export default function CustomerInfo({
    {customerEmail}
    -
    +

    {_('Shipping Address')}

    @@ -67,15 +67,15 @@ export default function CustomerInfo({
    -
    -
    -
    +
    +
    +

    {_('Payment Method')}

    {paymentMethodName}
    -
    +

    {_('Billing Address')}

    diff --git a/packages/evershop/src/modules/cms/pages/frontStore/all/Breadcrumb.jsx b/packages/evershop/src/modules/cms/pages/frontStore/all/Breadcrumb.jsx index 5a5555c9e..6fec69f18 100644 --- a/packages/evershop/src/modules/cms/pages/frontStore/all/Breadcrumb.jsx +++ b/packages/evershop/src/modules/cms/pages/frontStore/all/Breadcrumb.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; function Breadcrumb({ pageInfo: { breadcrumbs } }) { return breadcrumbs.length ? ( -
    +
    {breadcrumbs.map((breadcrumb, index) => index === breadcrumbs.length - 1 ? ( {breadcrumb.title} diff --git a/packages/evershop/src/modules/cms/pages/frontStore/all/Layout.jsx b/packages/evershop/src/modules/cms/pages/frontStore/all/Layout.jsx index d65b168eb..fc54cf2e4 100644 --- a/packages/evershop/src/modules/cms/pages/frontStore/all/Layout.jsx +++ b/packages/evershop/src/modules/cms/pages/frontStore/all/Layout.jsx @@ -17,7 +17,7 @@ export default function Layout() { component: { default: Area }, props: { id: 'icon-wrapper', - className: 'icon-wrapper flex justify-between space-x-1' + className: 'icon-wrapper flex justify-between space-x-5' }, sortOrder: 20 } diff --git a/packages/evershop/src/modules/cms/pages/frontStore/all/Menu.jsx b/packages/evershop/src/modules/cms/pages/frontStore/all/Menu.jsx index 2fd1cd0e4..ec5c45c48 100644 --- a/packages/evershop/src/modules/cms/pages/frontStore/all/Menu.jsx +++ b/packages/evershop/src/modules/cms/pages/frontStore/all/Menu.jsx @@ -5,7 +5,7 @@ import './Menu.scss'; export default function Menu({ menu: { items } }) { return (
    -