Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development into main #113

Merged
merged 32 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a2bade7
Remove app board (#70)
yurii-ve Oct 7, 2024
753613e
Update error handling (#72)
yurii-ve Oct 7, 2024
c916143
Create CartItemView component, update ProductCard board (#74)
yurii-ve Oct 8, 2024
b36b9fb
Update codux config to use .env file (#76)
yurii-ve Oct 8, 2024
2d2546f
Handle trackQuantity property for out of stock indication (#80)
yurii-ve Oct 9, 2024
f05cc2b
Keep entire selected choice object in route state (#81)
yurii-ve Oct 9, 2024
bbb7494
Use selected choice media (#82)
yurii-ve Oct 9, 2024
98d3c23
fix: out of stock indication for products with variants (#83)
olehrakwix Oct 9, 2024
7a3a1c4
refactor: improve fix regarding navigation from error boundary (#84)
olehrakwix Oct 9, 2024
c209a0d
Fix missing SKU issue (#85)
yurii-ve Oct 9, 2024
095210f
Remove redundant instruction (#86)
yurii-ve Oct 9, 2024
9e75a81
Change background-color to background, use color variables (#87)
yurii-ve Oct 10, 2024
4125ffb
Remove absolute positioning from the intro board (#88)
yurii-ve Oct 10, 2024
e34d15c
Split Cart component into functional (Cart) and view parts (CartView)…
yurii-ve Oct 11, 2024
b64c859
Update cart related boards (#91)
yurii-ve Oct 11, 2024
8af097d
Added useCart hook (#92)
yurii-ve Oct 11, 2024
fbf9a59
Remove cart loading state (#93)
yurii-ve Oct 11, 2024
b302590
Update drawer component (#94)
yurii-ve Oct 14, 2024
506c1a4
feat: hide non-visible variants to disallow selection (#89)
olehrakwix Oct 16, 2024
4f146c7
Use quantity state (#95)
yurii-ve Oct 16, 2024
309d12b
Export addToCart from the useCart hook (#96)
yurii-ve Oct 16, 2024
d2d8862
refactor: improve select types (#97)
olehrakwix Oct 17, 2024
23c9ec4
feat: products filtering and sorting (#98)
olehrakwix Oct 17, 2024
1e5ae95
Sync latest changes from the ReClaim template (#102)
yurii-ve Oct 31, 2024
d2f5eb7
chore(deps): upgrade to latest (#104)
pilarbuchen Oct 31, 2024
dab5ad7
refactor: replace css reset (#107)
idoros Nov 7, 2024
4e1a69b
Fix (#111)
yurii-ve Nov 8, 2024
398543f
Use component wrapper instead of memory router (#112)
yurii-ve Nov 8, 2024
6e819e3
Update/fix meta tags (#105)
yurii-ve Nov 10, 2024
b4ad308
Merge branch 'development' into yuriiv/merge-development-into-main
yurii-ve Nov 11, 2024
26cf00f
Update package-lock
yurii-ve Nov 11, 2024
be978cb
Remove redundant util
yurii-ve Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _codux/boards/ui-kits/ui-kit-buttons.board.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NavLink } from '@remix-run/react';
import { createBoard, Variant } from '@wixc3/react-board';
import classNames from 'classnames';
import { MemoryRouter } from 'react-router-dom';
import ComponentWrapper from '~/_codux/board-wrappers/component-wrapper';
import discordIcon from '~/src/assets/svg/discord.svg';
import facebookIcon from '~/src/assets/svg/facebook.svg';
import githubIcon from '~/src/assets/svg/github.svg';
Expand All @@ -13,7 +13,7 @@ import styles from '~/src/styles/ui-kit-buttons.module.scss';
export default createBoard({
name: 'UI Kit - Buttons',
Board: () => (
<MemoryRouter>
<ComponentWrapper>
<div className={styles.container}>
<div>
<span className={styles.uikit}>UI Kit</span>
Expand Down Expand Up @@ -88,7 +88,7 @@ export default createBoard({
</div>
</Variant>
</div>
</MemoryRouter>
</ComponentWrapper>
),
isSnippet: true,
environmentProps: {
Expand Down
31 changes: 30 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useNavigation,
useRouteError,
} from '@remix-run/react';
import { LoaderFunctionArgs } from '@remix-run/node';
import { LoaderFunctionArgs, MetaFunction } from '@remix-run/node';
import { Tokens } from '@wix/sdk';
import { useEffect } from 'react';
import { CartOpenContextProvider } from '~/lib/cart-open-context';
Expand Down Expand Up @@ -117,3 +117,32 @@ export function ErrorBoundary() {
</ContentWrapper>
);
}

export const meta: MetaFunction = () => {
const title = 'E-Commerce Starter';
const description = 'Create your own e-commerce store';

return [
{ title },
{
name: 'description',
content: description,
},
{
property: 'robots',
content: 'index, follow',
},
{
property: 'og:title',
content: title,
},
{
property: 'og:description',
content: description,
},
{
property: 'og:image',
content: '/social-media-image.jpg',
},
];
};
46 changes: 7 additions & 39 deletions app/routes/_index/route.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LinksFunction, LoaderFunctionArgs } from '@remix-run/node';
import { LoaderFunctionArgs } from '@remix-run/node';
import { Link, MetaFunction, useLoaderData, useNavigate, json } from '@remix-run/react';
import { initializeEcomApi } from '~/lib/ecom/session';
import { isOutOfStock, removeQueryStringFromUrl } from '~/lib/utils';
import { isOutOfStock } from '~/lib/utils';
import { HeroImage } from '~/src/components/hero-image/hero-image';
import { ProductCard } from '~/src/components/product-card/product-card';
import styles from './index.module.scss';
Expand All @@ -13,7 +13,7 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
throw json(productsResponse.error);
}

return { products: productsResponse.body, canonicalUrl: removeQueryStringFromUrl(request.url) };
return { products: productsResponse.body };
};

export default function HomePage() {
Expand Down Expand Up @@ -52,22 +52,16 @@ export default function HomePage() {
);
}

export const meta: MetaFunction<typeof loader> = ({ data }) => {
const title = 'E-Commerce App';
const description = 'Welcome to the E-Commerce App';
const imageUrl = 'https://e-commerce.com/image.png';
export const meta: MetaFunction<typeof loader> = () => {
const title = 'E-Commerce Starter';
const description = 'Create your own e-commerce store';

return [
{ title },
{
name: 'description',
content: description,
},
{
tagName: 'link',
rel: 'canonical',
href: data?.canonicalUrl,
},
{
property: 'robots',
content: 'index, follow',
Expand All @@ -82,33 +76,7 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {
},
{
property: 'og:image',
content: imageUrl,
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
name: 'twitter:title',
content: title,
},
{
name: 'twitter:description',
content: description,
},
{
name: 'twitter:image',
content: imageUrl,
},
];
};

export const links: LinksFunction = () => {
return [
{
rel: 'icon',
href: '/favicon.ico',
type: 'image/ico',
content: '/social-media-image.jpg',
},
];
};
60 changes: 4 additions & 56 deletions app/routes/about/route.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { LinksFunction, LoaderFunctionArgs, MetaFunction } from '@remix-run/node';
import { removeQueryStringFromUrl } from '~/lib/utils';
import { MetaFunction } from '@remix-run/node';
import styles from './about.module.scss';

export const loader = async ({ request }: LoaderFunctionArgs) => {
return { canonicalUrl: removeQueryStringFromUrl(request.url) };
};

export default function AboutPage() {
return (
<div className={styles.root}>
Expand All @@ -26,63 +21,16 @@ export default function AboutPage() {
);
}

export const meta: MetaFunction<typeof loader> = ({ data }) => {
const title = 'E-Commerce App - About';
const description = 'Welcome to the E-Commerce App - About Page';
const imageUrl = 'https://e-commerce.com/image.png';

export const meta: MetaFunction = () => {
return [
{ title },
{ title: 'About Us' },
{
name: 'description',
content: description,
},
{
tagName: 'link',
rel: 'canonical',
href: data?.canonicalUrl,
content: 'Create your own e-commerce store',
},
{
property: 'robots',
content: 'index, follow',
},
{
property: 'og:title',
content: title,
},
{
property: 'og:description',
content: description,
},
{
property: 'og:image',
content: imageUrl,
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
name: 'twitter:title',
content: title,
},
{
name: 'twitter:description',
content: description,
},
{
name: 'twitter:image',
content: imageUrl,
},
];
};

export const links: LinksFunction = () => {
return [
{
rel: 'icon',
href: '/favicon.ico',
type: 'image/ico',
},
];
};
11 changes: 11 additions & 0 deletions app/routes/category.$categorySlug/category.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
text-transform: uppercase;
padding-bottom: 10px;
border-bottom: solid 1px var(--grey);
font: var(--heading6);
font-weight: 400;
}

.products {
Expand Down Expand Up @@ -68,6 +70,15 @@
height: 100%;
}

.categoryList {
list-style: none;
padding: 0;
}

.categoryItem {
height: 42px;
}

.activeCategory {
font-weight: bold;
}
Expand Down
60 changes: 6 additions & 54 deletions app/routes/category.$categorySlug/route.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LinksFunction, LoaderFunctionArgs, MetaFunction } from '@remix-run/node';
import { LoaderFunctionArgs, MetaFunction } from '@remix-run/node';
import { NavLink, useLoaderData, json, useRouteError, useNavigate, isRouteErrorResponse } from '@remix-run/react';
import { GetStaticRoutes } from '@wixc3/define-remix-app';
import classNames from 'classnames';
Expand All @@ -11,7 +11,7 @@ import {
} from '~/lib/ecom';
import { useAppliedProductFilters } from '~/lib/hooks';
import { initializeEcomApi } from '~/lib/ecom/session';
import { getErrorMessage, isOutOfStock, removeQueryStringFromUrl } from '~/lib/utils';
import { getErrorMessage, isOutOfStock } from '~/lib/utils';
import { ProductCard } from '~/src/components/product-card/product-card';
import { ErrorComponent } from '~/src/components/error-component/error-component';
import { ProductFilters } from '~/src/components/product-filters/product-filters';
Expand Down Expand Up @@ -58,7 +58,6 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => {
categoryProducts: categoryProductsResponse.body,
allCategories: allCategoriesResponse.body,
productPriceBounds: productPriceBoundsResponse.body,
canonicalUrl: removeQueryStringFromUrl(request.url),
};
};

Expand Down Expand Up @@ -86,14 +85,14 @@ export default function ProductsCategoryPage() {
<nav className={styles.sidebarSection}>
<h2 className={styles.sidebarTitle}>Browse by</h2>

<ul>
<ul className={styles.categoryList}>
{allCategories.map((category) =>
category.slug ? (
<NavLink
key={category._id}
to={`/category/${category.slug}`}
className={({ isActive }) =>
classNames('linkButton', {
classNames(styles.categoryItem, 'linkButton', {
[styles.activeCategory]: isActive,
})
}
Expand Down Expand Up @@ -185,62 +184,15 @@ export function ErrorBoundary() {
}

export const meta: MetaFunction<typeof loader> = ({ data }) => {
const title = 'E-Commerce App - Projects';
const description = 'Welcome to the E-Commerce App - Projects Page';
const imageUrl = 'https://e-commerce.com/image.png';

return [
{ title },
{ title: data?.category.name ?? 'Products' },
{
name: 'description',
content: description,
},
{
tagName: 'link',
rel: 'canonical',
href: data?.canonicalUrl,
content: data?.category.description,
},
{
property: 'robots',
content: 'index, follow',
},
{
property: 'og:title',
content: title,
},
{
property: 'og:description',
content: description,
},
{
property: 'og:image',
content: imageUrl,
},
{
name: 'twitter:card',
content: 'summary_large_image',
},
{
name: 'twitter:title',
content: title,
},
{
name: 'twitter:description',
content: description,
},
{
name: 'twitter:image',
content: imageUrl,
},
];
};

export const links: LinksFunction = () => {
return [
{
rel: 'icon',
href: '/favicon.ico',
type: 'image/ico',
},
];
};
Loading