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

Nrf demo alpha.1 #4

Merged
merged 122 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
0a5f558
chore(core): use next canary and enable ppr
jorgemoya Nov 18, 2024
a034ea4
fix: use suggested functions over deprecated ones
jorgemoya Nov 18, 2024
68f3bc0
chore(core): update tailwind config and layout to use Soul config
jorgemoya Nov 18, 2024
627cd16
fix: eslint issues
jorgemoya Nov 18, 2024
7d9dcad
chore(core): add roboto mono font
jorgemoya Nov 20, 2024
daf852f
chore(core): add @/vibes/* path in tsconfig
jorgemoya Nov 20, 2024
41f0325
feat(core): add FeaturedProductsList component and use in Homepage (#…
jorgemoya Nov 21, 2024
b9e2226
feat(core): add FeaturedProductsCarousel and use in Homepage (#1675)
jorgemoya Nov 21, 2024
f262610
feat(core): add best selling products to Hompage (#1676)
jorgemoya Nov 21, 2024
883ce08
chore: bump components to include latest Streamable util (#1681)
jorgemoya Nov 22, 2024
4042e1d
chore(core): use next canary and enable ppr
jorgemoya Nov 18, 2024
c06b096
feat: replace catalyst homepage slideshow
hunterbecton Nov 21, 2024
5bac2a8
refactor: updated slideshow structure based on PR feedback
hunterbecton Nov 22, 2024
7cf5eb2
feat: add translations for homepage slider
hunterbecton Nov 24, 2024
8c190cb
fix: slide not in view when element inside is focused (#1687)
hunterbecton Dec 3, 2024
117282f
feat: add header (#1702)
jorgemoya Dec 5, 2024
fcfcd66
feat: add soul SignInSection
apledger Dec 5, 2024
6a9b353
refactor: ErrorMessage -> FieldError
apledger Dec 5, 2024
fd23a46
feat: add form status
apledger Dec 5, 2024
a611c4e
feat: add error message for sign in
apledger Dec 5, 2024
fc311fb
fix: remove nextjs internals for redirect error handling
apledger Dec 5, 2024
a6e463b
fix: add back metadata request locale
apledger Dec 5, 2024
7929905
feat: add footer with streamable sitemap links (#1698)
hunterbecton Dec 9, 2024
efc116a
fix: import Image instead of BcImage (#1719)
jorgemoya Dec 9, 2024
20ad758
fix: form status bg color
apledger Dec 6, 2024
2b438e5
feat: update forgot password to soul
apledger Dec 6, 2024
07eb056
refactor: nest lastResult in forgotPassword action
apledger Dec 9, 2024
351c343
fix: inline recaptcha fragment in ResetPageQuery
apledger Dec 9, 2024
ac8e12f
feat: remove bestselling products from Home (#1725)
jorgemoya Dec 10, 2024
296d40d
feat(core): add subscribe form to Homepage (#1682)
jorgemoya Dec 10, 2024
89282e8
feat: stream in products for carousel/featured in Home (#1726)
jorgemoya Dec 10, 2024
c014059
feat: add empty state to FeaturedProductsCarousel (#1731)
hunterbecton Dec 10, 2024
aedfa7a
chore: run pnpm lint -- --fix (#1736)
migueloller Dec 11, 2024
85b610a
fix: bump VIBES components and pass in accessibility props in Home (#…
jorgemoya Dec 12, 2024
07fae60
feat: add empty state for FeatureProductsList (#1745)
hunterbecton Dec 12, 2024
1fa7d49
feat: add logout route handler
chanceaclark Dec 12, 2024
e901f33
feat: add dynamic form primitive
apledger Dec 10, 2024
fea8747
feat: update sign up form to soul
apledger Dec 10, 2024
97953db
fix: lint issues
apledger Dec 11, 2024
4c061f0
fix: register customer required fields
apledger Dec 12, 2024
18790eb
refactor: use zod to parse register customer input
apledger Dec 12, 2024
c2e18fb
fix: sync dynamic form with VIBES
apledger Dec 12, 2024
8c72b34
fix: remove quantity from dynamic form
apledger Dec 12, 2024
0eda97d
fix: htmlFor in groups
apledger Dec 12, 2024
1d554b1
feat: update Breadcrumbs to use AnimatedLink and new skeleton design …
hunterbecton Dec 13, 2024
1e30473
feat: update change password to SOUL
apledger Dec 13, 2024
33096ef
feat: update button props and variables
apledger Dec 15, 2024
6ad0112
feat: add search functionality to header
migueloller Dec 15, 2024
1bfb49f
fix: change quick search param name to "term"
migueloller Dec 15, 2024
518329f
chore: bring in latest VIBES changes
migueloller Dec 15, 2024
dd15a8a
feat: use header search translated error message
migueloller Dec 15, 2024
08b85d0
feat: don't attempt to search if less than 3 chars
migueloller Dec 15, 2024
4a24763
chore: bring in latest VIBES changes
migueloller Dec 15, 2024
4d9e062
feat: better i18n for header search
migueloller Dec 15, 2024
426c2a5
feat(soul): add account layout components
chanceaclark Dec 13, 2024
8186993
chore: remove static pages (#1762)
deini Dec 16, 2024
f4c64d9
chore: remove edge runtime from pages (#1763)
deini Dec 16, 2024
25f08ad
chore: bring in latet VIBES changes
migueloller Dec 16, 2024
99ae969
feat: use Soul in category page
migueloller Dec 16, 2024
3ebde49
feat: add imagePriority prop to ProductCard (#1767)
hunterbecton Dec 17, 2024
ca9c207
fix: move font variables to html element
apledger Dec 15, 2024
f5107b0
feat: add props and css variables for slideshow
apledger Dec 15, 2024
99235b8
feat: add props and css variables for carousel
apledger Dec 15, 2024
154c74e
feat: add CSS variables to ProductCard
apledger Dec 17, 2024
679c292
chore: sync navigation primitive with VIBES
migueloller Dec 17, 2024
bfd6645
chore: add Makeswift team to CODEOWNERS
migueloller Nov 6, 2024
5901388
feat: add BlogPostContent to blog/[id] page
jordanarldt Dec 17, 2024
e0c8572
refactor: move default css variables into Accordion
apledger Dec 17, 2024
560ba79
refactor: move default css variables into Button, ButtonLink
apledger Dec 17, 2024
8a40916
refactor: move default css variables into Carousel
apledger Dec 17, 2024
ed18152
refactor: move default css variables into Slideshow
apledger Dec 17, 2024
e47d6c8
feat: add props to ProductsCarousel
apledger Dec 17, 2024
209e304
feat(core): add account settings soul components
chanceaclark Dec 16, 2024
c3e553a
feat: add FeaturedBlogPostList to /blog
jordanarldt Dec 18, 2024
1c2018c
feat: add variables to Navigation
apledger Dec 18, 2024
1e8dbc9
feat: add variables to StickySidebarLayout
apledger Dec 18, 2024
cd2fbde
feat: add props to ProductList
apledger Dec 18, 2024
f4887f1
feat: add variables to banner/header
apledger Dec 18, 2024
512011f
feat: use FeaturedBlogPostList in /blog/tag/ route
jordanarldt Dec 18, 2024
6c27a6f
feat: add footer variables and logo
apledger Dec 18, 2024
81e4428
feat: add localized contact title
apledger Dec 18, 2024
303daff
feat: add ProductDetails to PDP (#1751)
jorgemoya Dec 19, 2024
75012c4
fix: section max width
apledger Dec 19, 2024
05306cc
feat: add pagination and breadcrumbs to /blog and /blog/tag/[tagId]
jordanarldt Dec 19, 2024
0c05662
feat: refactor ProductListSection breadcrumbs
jordanarldt Dec 19, 2024
bd6c6cb
feat: sync breadcrumbs and implementations with vibes
jordanarldt Dec 19, 2024
e95a3b0
feat: undo ProductListSection breadcrumb change to ensure it's not di…
jordanarldt Dec 19, 2024
c313171
feat: update pageInfoTransformer
jordanarldt Dec 19, 2024
f482b7d
feat: add related products to PDP (#1788)
jorgemoya Dec 20, 2024
8951d86
feat: add reviews to PDP (#1786)
jorgemoya Dec 20, 2024
4a91f32
fix: ensure page info transformer returns null if no previous/next page
jordanarldt Dec 20, 2024
34dc0a5
feat: add product description to PDP (#1790)
jorgemoya Dec 20, 2024
31f8efa
feat: Soul ProductsListSection for search results
migueloller Dec 19, 2024
0511803
feat: add support for custom blog url routing, update blog tag filter…
jordanarldt Dec 20, 2024
4999257
feat: add empty state to BlogPostList
jordanarldt Dec 23, 2024
3ae050a
refactor: move app fonts from the root layout to their own file
agurtovoy Dec 24, 2024
14be88c
feat: update /blog/[blogId] route to use skeleton and streamable props
jordanarldt Dec 26, 2024
1f48a62
feat: use Soul in brand page
migueloller Dec 27, 2024
c7c8511
refactor: move search params cache to category page
migueloller Dec 27, 2024
25e13bc
refactor: move search params cache to search page
migueloller Dec 27, 2024
c83dea9
feat: Add NotFound section to 404 page
jordanarldt Dec 27, 2024
160dbdf
fix: aria-label and placeholder in Select
hunterbecton Dec 17, 2024
a333fbe
fix: pass placeholder prop from ProductsListSection into Sorting
hunterbecton Dec 17, 2024
3f488f2
fix: rendering or label and placeholder props
hunterbecton Dec 17, 2024
cce1ec2
chore: bring latest ProducstListSection from VIBES
migueloller Dec 29, 2024
b71c711
feat: add height prop to Logo
apledger Dec 23, 2024
5468be0
feat: add FeaturedProductsCarousel to 404 page
jordanarldt Dec 28, 2024
6983f1a
fix: use grid for pdp specifications
apledger Dec 30, 2024
4056025
fix: reduce gap on pdp
apledger Dec 30, 2024
c91018e
chore: bring in latest changes from Soul VIBE
migueloller Dec 31, 2024
9f09334
feat: handle localization for new PLP labels
migueloller Dec 31, 2024
6284d6d
fix: facets transformer range input mapping
migueloller Dec 31, 2024
349c51c
feat: add cart from VIBES
apledger Dec 30, 2024
92ed6c1
feat: replace cart with VIBES cart
apledger Dec 31, 2024
2d97740
fix: remove empty string in value (#1832)
jorgemoya Jan 3, 2025
6d0f44c
chore: bring in latest changes from VIBES
migueloller Jan 3, 2025
5bf8dd5
feat: show sub-categories
migueloller Jan 3, 2025
0d8161b
chore: revert nextjs (#1840)
jorgemoya Jan 3, 2025
a26b482
fix: remove regression tests workflow (#1843)
jorgemoya Jan 3, 2025
48fd9a3
feat: add Error page and ErrorBoundary
jordanarldt Jan 3, 2025
93ea747
feat(orders): update the orders list to use vibes section
chanceaclark Jan 3, 2025
21ea621
chore: remove unused files in facet pages (#1838)
jorgemoya Jan 6, 2025
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @bigcommerce/team-catalyst
* @bigcommerce/makeswift
228 changes: 0 additions & 228 deletions .github/workflows/regression-tests.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
'use server';

import { SubmissionResult } from '@conform-to/react';
import { parseWithZod } from '@conform-to/zod';
import { getTranslations } from 'next-intl/server';
import { z, ZodError } from 'zod';

import { schema } from '@/vibes/soul/sections/reset-password-section/schema';
import { client } from '~/client';
import { graphql } from '~/client/graphql';

const ChangePasswordFieldsSchema = z.object({
customerId: z.string(),
customerToken: z.string(),
currentPassword: z.string().min(1),
newPassword: z.string().min(1),
confirmPassword: z.string().min(1),
});

const ChangePasswordSchema = ChangePasswordFieldsSchema.omit({
currentPassword: true,
}).required();

const ChangePasswordMutation = graphql(`
mutation ChangePassword($input: ResetPasswordInput!) {
customer {
Expand All @@ -34,29 +24,26 @@ const ChangePasswordMutation = graphql(`
}
`);

interface ChangePasswordResponse {
status: 'success' | 'error';
message: string;
}

export const changePassword = async (formData: FormData): Promise<ChangePasswordResponse> => {
export async function changePassword(
{ token, customerEntityId }: { token: string; customerEntityId: string },
_prevState: { lastResult: SubmissionResult | null; successMessage?: string },
formData: FormData,
) {
const t = await getTranslations('ChangePassword');
const submission = parseWithZod(formData, { schema });

try {
const parsedData = ChangePasswordSchema.parse({
customerId: formData.get('customer-id'),
customerToken: formData.get('customer-token'),
newPassword: formData.get('new-password'),
confirmPassword: formData.get('confirm-password'),
});
if (submission.status !== 'success') {
return { lastResult: submission.reply({ formErrors: [t('Form.error')] }) };
}

try {
const response = await client.fetch({
document: ChangePasswordMutation,
variables: {
input: {
token: parsedData.customerToken,
customerEntityId: Number(parsedData.customerId),
newPassword: parsedData.newPassword,
token,
customerEntityId: Number(customerEntityId),
newPassword: submission.value.password,
},
},
fetchOptions: {
Expand All @@ -67,23 +54,24 @@ export const changePassword = async (formData: FormData): Promise<ChangePassword
const result = response.data.customer.resetPassword;

if (result.errors.length > 0) {
result.errors.forEach((error) => {
throw new Error(error.message);
});
return {
lastResult: submission.reply({ formErrors: result.errors.map((error) => error.message) }),
};
}

return {
status: 'success',
message: t('confirmChangePassword'),
lastResult: submission.reply(),
successMessage: t('Form.successMessage'),
};
} catch (error: unknown) {
if (error instanceof Error || error instanceof ZodError) {
if (error instanceof Error) {
return {
status: 'error',
message: error.message,
lastResult: submission.reply({ formErrors: [error.message] }),
};
}

return { status: 'error', message: t('Errors.error') };
return {
lastResult: submission.reply({ formErrors: [t('Errors.error')] }),
};
}
};
}
Loading
Loading