Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b9bff81 to
015f5aa
Compare
015f5aa to
ce32717
Compare
ce32717 to
150b7ee
Compare
150b7ee to
be2e2c0
Compare
be2e2c0 to
4bff8b4
Compare
4bff8b4 to
9a0b98b
Compare
9a0b98b to
c044ea1
Compare
c044ea1 to
25efe90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to canary, this PR will be updated.
Releases
@bigcommerce/catalyst-core@1.5.0
Minor Changes
#2801
18cfdc8Thanks @Tharaae! - Fetch product inventory data with a separate GQL query with no cachingMigration
The files to be rebased for this change to be applied are:
#2863
6a23c90Thanks @jorgemoya! - Add pagination support for the product gallery. When a product has more images than the initial page load, new images will load as batches once the user reaches the end of the existing thumbnails. Thumbnail images now will display in horizontal direction in all viewport sizes.Migration
core/app/[locale]/(default)/product/[slug]/_actions/get-more-images.tswith a GraphQL query to fetch additional product images with pagination.core/app/[locale]/(default)/product/[slug]/page-data.tsto includepageInfo(withhasNextPageandendCursor) from the images query.core/app/[locale]/(default)/product/[slug]/page.tsxto pass the new pagination props (pageInfo,productId,loadMoreAction) to theProductDetailcomponent.ProductGallerycomponent now accepts optional props for pagination:pageInfo?: { hasNextPage: boolean; endCursor: string | null }productId?: numberloadMoreAction?: ProductGalleryLoadMoreActionDue to the number of changes, it is recommended to use the PR as a reference for migration.
#2758
d78bc85Thanks @Tharaae! - Add the following messages to each line item on cart page based on store inventory settings:Migration
For existing Catalyst stores, to get the newly added feature, simply rebase the existing code with the new release code. The files to be rebased for this change to be applied are:
Patch Changes
#2852
a7395f1Thanks @chanceaclark! - Uses regulardompurify(DP) instead ofisomorphic-dompurify(IDP), because IDP requires JSDOM. JSDOM doesn't work in edge-runtime environments even with nodejs compatibility. We only need it on the client anyways for the JSON-LD schema, so it doesn't need the isomorphic aspect of it. This also changescore/app/[locale]/(default)/product/[slug]/_components/product-review-schema/product-review-schema.tsxto be a client-component to enable `dompurify to work correctly.Migration
core/app/[locale]/(default)/product/[slug]/_components/product-review-schema/product-review-schema.tsx:'use client';directive to the top ofcore/app/[locale]/(default)/product/[slug]/_components/product-review-schema/product-review-schema.tsx.#2844
74dee6eThanks @jordanarldt! - Update forms to translate the form field validation errorsMigration
Due to the amount of changes, it is recommended to just use the PR as a reference for migration.
Detailed migration steps can be found on the PR here:
chore(catalyst): CATALYST-1267 Translate form field errors #2844
#2858
0633612Thanks @jorgemoya! - Use state abbreviation instead of entityId for cart shipping form state values. The shipping API expects state abbreviations, and using entityId caused form submissions to fail. Additionally, certain US military states that share the same abbreviation (AE) are now filtered out to prevent duplicate key issues and ambiguous submissions.Migration steps
Step 1: Add blacklist for states with duplicate abbreviations
Certain US states share the same abbreviation (AE), which causes issues with the shipping API and React select dropdowns. Add a blacklist to filter these out.
Update
core/app/[locale]/(default)/cart/page.tsx:const countries = shippingCountries.map((country) => ({ value: country.code, label: country.name, })); + // These US states share the same abbreviation (AE), which causes issues: + // 1. The shipping API uses abbreviations, so it can't distinguish between them + // 2. React select dropdowns require unique keys, causing duplicate key warnings + const blacklistedUSStates = new Set([ + 'Armed Forces Africa', + 'Armed Forces Canada', + 'Armed Forces Middle East', + ]); const statesOrProvinces = shippingCountries.map((country) => ({Step 2: Use state abbreviation instead of entityId
Update the state mapping to use
abbreviationinstead ofentityId, and apply the blacklist filter for US states.Update
core/app/[locale]/(default)/cart/page.tsx:const statesOrProvinces = shippingCountries.map((country) => ({ country: country.code, - states: country.statesOrProvinces.map((state) => ({ - value: state.entityId.toString(), - label: state.name, - })), + states: country.statesOrProvinces + .filter((state) => country.code !== 'US' || !blacklistedUSStates.has(state.name)) + .map((state) => ({ + value: state.abbreviation, + label: state.name, + })), }));#2856
f5330c7Thanks @jorgemoya! - Add canonical URLs and hreflang alternates for SEO. Pages now setalternates.canonicalandalternates.languagesingenerateMetadatavia the newgetMetadataAlternateshelper incore/lib/seo/canonical.ts. The helper fetches the vanity URL via GraphQL (site.settings.url.vanityUrl) and is cached per request. The default locale uses no path prefix; other locales use/{locale}/path. The root locale layout setsmetadataBaseto the configured vanity URL so canonical URLs resolve correctly.Migration steps
Step 1: Root layout metadata base
The root locale layout now sets
metadataBasefrom the vanity URL fetched via GraphQL. This is already included in theRootLayoutMetadataQuery.Update
core/app/[locale]/layout.tsx:Step 2: GraphQL fragment updates
Add the
pathfield to brand, blog post, and product queries so metadata can build canonical URLs.Update
core/app/[locale]/(default)/(faceted)/brand/[slug]/page-data.ts:site { brand(entityId: $entityId) { name + path seo {Update
core/app/[locale]/(default)/blog/[blogId]/page-data.ts:author htmlBody name + path publishedDate {Update
core/app/[locale]/(default)/product/[slug]/page-data.ts(in the metadata query):site { product(entityId: $entityId) { name + path defaultImage {Step 3: Page metadata alternates
Add the
getMetadataAlternatesimport and setalternatesingenerateMetadatafor each page. The function is async and must be awaited. Ensurecore/lib/seo/canonical.tsexists (it is included in this release).Update
core/app/[locale]/(default)/page.tsx(home):For entity pages (product, category, brand, blog, blog post, webpage), add the import and include
alternatesin the existinggenerateMetadatareturn value using the entitypath(or breadcrumb-derived path for category and webpage). Example for a brand page:Step 4: Gift certificates pages
Update
core/app/[locale]/(default)/gift-certificates/page.tsx:Update
core/app/[locale]/(default)/gift-certificates/balance/page.tsx:Add
generateMetadatatocore/app/[locale]/(default)/gift-certificates/purchase/page.tsx:Step 5: Contact page
Update
core/app/[locale]/(default)/webpages/[id]/contact/page.tsx:Step 6: Public wishlist page
Update
core/app/[locale]/(default)/wishlist/[token]/page.tsx:Step 7: Compare page
Update
core/app/[locale]/(default)/compare/page.tsx: