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
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.4.3
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, + })), }));