-
Notifications
You must be signed in to change notification settings - Fork 345
Version Packages (canary)
#2729
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
Open
github-actions
wants to merge
1
commit into
canary
Choose a base branch
from
changeset-release/canary
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
bae8d8d to
912e837
Compare
912e837 to
31b1fa4
Compare
31b1fa4 to
a8e5ad4
Compare
a8e5ad4 to
cee5ebf
Compare
cee5ebf to
3a65e38
Compare
3a65e38 to
2c40ee6
Compare
2c40ee6 to
6a52866
Compare
6a52866 to
270285f
Compare
270285f to
4f63474
Compare
cb941ff to
a2fb4f9
Compare
a2fb4f9 to
08490c8
Compare
08490c8 to
8213bb1
Compare
8213bb1 to
f994fc6
Compare
f994fc6 to
18f3bef
Compare
18f3bef to
c353fb4
Compare
c353fb4 to
317c7ee
Compare
317c7ee to
d6136fd
Compare
d6136fd to
e93cd42
Compare
e93cd42 to
c2606c5
Compare
c2606c5 to
f201b98
Compare
f201b98 to
9252568
Compare
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.0
Minor Changes
#2768
9782209Thanks @jorgemoya! - Upgrade c15t to 1.8.2, migrate from custom mode to offline mode, refactor consent cookie handling to use c15t's compact format, add script location support for HEAD/BODY rendering, and add privacy policy link support to CookieBanner.What Changed
@c15t/nextjsto version1.8.2custom(with endpoint handlers) toofflinemodehandlers.tsimplementationenabledprop toC15TConsentManagerProviderto control consent manager functionalitydecoder.ts,encoder.ts)parse-compact-format.tsto handle c15t's compact cookie formati.t:timestamp,c.necessary:1,c.functionality:1,etc...locationfield from BigCommerce API and can be rendered in<head>or<body>based on thetargetpropertyCookieBannernow supports theprivacyPolicyUrlfield from BigCommerce API and will be rendered in the banner description if available.Migration Path
Consent Manager Provider Changes
The
ConsentManagerProvidernow usesofflinemode instead ofcustommode with endpoint handlers. The provider configuration has been simplified:Before:
After:
Key changes:
modechanged from'custom'to'offline'endpointHandlers- no longer needed in offline modeenabledprop to control consent manager functionalitystorageConfigfor cookie storage configurationCookie Handling
If you have custom code that directly reads or writes consent cookies, you'll need to update it:
Before:
The previous implementation used custom encoding/decoding. If you were directly accessing consent cookie values, you would have needed to use the custom decoder.
After:
The consent cookie now uses c15t's compact format. The public API for reading cookies remains the same:
The
getConsentCookie()function now internally usesparseCompactFormat()to parse the compact format cookie string. If you were directly parsing cookie values, you should now use thegetConsentCookie()helper instead.getConsentCookienow returns a compact version of the consent values:Updated instances where
getConsentCookieis used to reflect this new schema.Removed
setConsentCookiefrom server and client since this is now handled by the c15t library.Script Location Support
Scripts now support rendering in either
<head>or<body>based on thelocationfield from the BigCommerce API:The
ScriptsFragmentGraphQL query now includes thelocationfield, allowing scripts to be placed in the appropriate DOM location.FOOTERlocation is still not supported.Privacy Policy
The
RootLayoutMetadataQueryGraphQL query now includes theprivacyPolicyUrlfield, which renders a provicy policy link in theCookieBannerdescription.The privacy policy link:
target="_blank")privacyPolicyUrlis provided as a non-empty stringAdd translatable
privacyPolicyfield toComponents.ConsentManager.CookieBannertranslation namespace for the privacy policy link text.#2754
4cbc124Thanks @matthewvolk! - Conditionally display product ratings in the storefront based onsite.settings.display.showProductRating. The storefront logic when this setting is enabled/disabled matches exactly the logic of Stencil + Cornerstone.#2709
3820a75Thanks @jordanarldt! - Adds product review submission functionality to the product detail page via a modal form with validation for rating, title, review text, name, and email fields. Integrates with BigCommerce's GraphQL API using Conform and Zod for form validation and real-time feedback.#2690
44f6bc0Thanks @jfugalde! - Introduce displayName and displayKey fields to facets for improved labeling and filteringFacet filters now use the
displayNamefield for more descriptive labels in the UI, replacing the deprecatednamefield. Product attribute facets now support thefilterKeyfield for consistent parameter naming. The facet transformer has been updated to usedisplayNamewith a fallback tofilterNamewhendisplayNameis not available.#2756
0e867a7Thanks @matthewvolk! - Updated product and brand pages to include the number of reviews in the product data. Fixed visual spacing within product cards. Enhanced the Rating component to display the number of reviews alongside the rating. Introduced a new RatingLink component for smooth scrolling to reviews section on PDP.#2783
052c147Thanks @jorgemoya! - Make newsletter signup component on homepage render conditionally based on BigCommerce settings.What Changed
Subscribe) on homepage now conditionally renders based onshowNewsletterSignupsetting from BigCommerce.showNewsletterSignupfield toHomePageQueryGraphQL query to fetch newsletter settings.Streamcomponent withStreamablepattern for progressive loading.Migration
To make newsletter signup component render conditionally based on BigCommerce settings, update your homepage code:
1. Update GraphQL Query (
page-data.ts)Add the
newsletterfield to yourHomePageQuery:2. Update Homepage Component (
page.tsx)Import
Streamand create a streamable for newsletter settings:Before:
After:
#2753
7927d26Thanks @matthewvolk! - Refactor theReviewFormto accepttriggerprop instead offormButtonLabelfor flexible rendering.#2708
aa35becThanks @jordanarldt! - Adds OpenTelemetry instrumentation for Catalyst, enabling the collection of spans for Catalyst storefronts.Migration
Change is new code only, so just copy over
/core/instrumentation.tsandcore/lib/otel/tracers.ts.#2784
7c626a7Thanks @jorgemoya! - Implement functional newsletter subscription feature with BigCommerce GraphQL API integration.What Changed
subscribe.tswith a real BigCommerce GraphQL API call using theSubscribeToNewsletterMutation.InlineEmailFormto useform.errorsinstead of field-level errors for better error display.Migration Guide
Replace the
subscribeaction incore/components/subscribe/_actions/subscribe.tswith the latest changes to include:submission.reply()Update
inline-email-formto fix issue of not showing server-side error messages from form actions.core/vibes/soul/primitives/inline-email-form/index.tsxFieldErrorcomponent:// Remove: const { errors = [] } = fields.email;This change ensures that server-side error messages returned from form actions (like
formErrorsfrom Conform'ssubmission.reply()) are now properly displayed to users.Add the following translation keys to your locale files (e.g.,
messages/en.json):{ "Components": { "Subscribe": { "title": "Sign up for our newsletter", "placeholder": "Enter your email", "description": "Stay up to date with the latest news and offers from our store.", "subscribedToNewsletter": "You have been subscribed to our newsletter!", "Errors": { "invalidEmail": "Please enter a valid email address.", "somethingWentWrong": "Something went wrong. Please try again later." } } } }#2711
fcd0836Thanks @jordanarldt! - Separate first and last name fields on user session object.#2752
4631b88Thanks @matthewvolk! - Conditionally enable storefront reviews functionality based onsite.settings.reviews.enabled. The storefront logic when this setting is enabled/disabled matches exactly the logic of Stencil + Cornerstone.#2739
e155398Thanks @Tharaae! - Add out-of-stock / backorder message to product cards on PLPs based on store settings:Migration
Option 1: Automatic Migration (Recommended)
For existing Catalyst stores, the simplest way to get the newly added feature is to rebase the existing code with the new release code. The files that will be updated are listed below.
Option 2: Manual Migration
If you prefer not to rebase or have made customizations that prevent rebasing, follow these manual steps:
Step 1: Update GraphQL Fragment
Add the inventory fields to your product card fragment in
core/components/product-card/fragment.tsunderProduct:Step 2: Update Product interface in Product Card component
Update the
Productinterface incore/vibes/soul/primitives/product-card/index.tsxadding the following field to it:inventoryMessage?: string;Step 3: Update Data Transformer
Modify
core/data-transformers/product-card-transformer.tsto include inventory message in the transformed data. You can simply copy the whole file from this release as it does not have UI breaking changes.Step 4: Update Product Card Layout
Update
core/vibes/soul/primitives/product-card/index.tsxlayout to display the newinventoryMessageproduct field.Step 5: Update Page Data GraphQL queries
Add inventory settings queries to the pages data. Add the following query to the main GQL query under
site.settings:to the following page data files:
core/app/[locale]/(default)/(faceted)/brand/[slug]/page-data.tscore/app/[locale]/(default)/(faceted)/category/[slug]/page-data.tscore/app/[locale]/(default)/(faceted)/search/page-data.tscore/app/[locale]/(default)/page-data.tsStep 6: Update Page Components
Update the corresponding page components to use the
productCardTransformermethod (if not already using it) to get the product card, and pass inventory data to those product cards based on the store inventory settings. Use the following code while retrieving the product lists:in the following files:
core/app/[locale]/(default)/(faceted)/brand/[slug]/page.tsxcore/app/[locale]/(default)/(faceted)/category/[slug]/page.tsxcore/app/[locale]/(default)/(faceted)/search/page.tsxcore/app/[locale]/(default)/page.tsxFiles Modified in This Change
core/app/[locale]/(default)/(faceted)/brand/[slug]/page-data.tscore/app/[locale]/(default)/(faceted)/brand/[slug]/page.tsxcore/app/[locale]/(default)/(faceted)/category/[slug]/page-data.tscore/app/[locale]/(default)/(faceted)/category/[slug]/page.tsxcore/app/[locale]/(default)/(faceted)/search/page-data.tscore/app/[locale]/(default)/(faceted)/search/page.tsxcore/app/[locale]/(default)/page-data.tscore/app/[locale]/(default)/page.tsxcore/components/product-card/fragment.tscore/data-transformers/product-card-transformer.tscore/vibes/soul/primitives/product-card/index.tsx#2789
f2f6ad9Thanks @jorgemoya! - Add newsletter subscription toggle to account settings page, allowing customers to manage their marketing preferences directly from their account.What Changed
NewsletterSubscriptionFormcomponent with a toggle switch for subscribing/unsubscribing to newslettersupdateNewsletterSubscriptionserver action that handles both subscribe and unsubscribe operations via BigCommerce GraphQL APIAccountSettingsSectionto conditionally display the newsletter subscription form when enabledCustomerSettingsQueryto fetchisSubscribedToNewsletterstatus andshowNewsletterSignupstore settingAccount.Settings.NewsletterSubscriptionnamespaceMigration Guide
To add the newsletter subscription toggle to your account settings page:
Step 1: Copy the server action
Copy the new server action file to your account settings directory:
Step 2: Update the GraphQL query
Update
core/app/[locale]/(default)/account/settings/page-data.tsxto include newsletter subscription fields:Also update the return statement to include
newsletterSettings:Step 3: Copy the NewsletterSubscriptionForm component
Copy the new form component:
Step 4: Update AccountSettingsSection
Update
core/vibes/soul/sections/account-settings/index.tsx:Step 5: Update the account settings page
Update
core/app/[locale]/(default)/account/settings/page.tsx:AccountSettingsSection:Step 6: Add translation keys
Add the following keys to your locale files (e.g.,
messages/en.json):{ "Account": { "Settings": { ... "NewsletterSubscription": { "title": "Marketing preferences", "label": "Opt-in to receive emails about new products and promotions.", "marketingPreferencesUpdated": "Marketing preferences have been updated successfully!", "somethingWentWrong": "Something went wrong. Please try again later." } } } }Step 7: Verify the feature
/account/settingsas a logged-in customerThe newsletter subscription form will only display if
newsletterSubscriptionEnabledistrue(controlled by theshowNewsletterSignupstore setting).#2733
9f70d2eThanks @Tharaae! - Add the following backorder messages to PDP based on the store inventory settings and the product backorders data: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
#2757
3f0fbb9Thanks @matthewvolk! - PassesformButtonLabelfromReviewstoReviewsEmptyState(was missing) and sets a default value forformButtonLabel#2782
abcb16aThanks @jorgemoya! - Add missing check for optional text field incore/vibes/soul/form/dynamic-form/schema.ts.Migration
Add
if (field.required !== true) fieldSchema = fieldSchema.optional();totextcase incore/vibes/soul/form/dynamic-form/schema.ts:#2750
c22f0e8Thanks @jorgemoya! - Improved login error handling to display a custom error message when BigCommerce indicates a password reset is required, instead of showing a generic error message.What's Fixed
When attempting to log in with an account that requires a password reset, users now see an informative error message: "Password reset required. Please check your email for instructions to reset your password."
Before: Generic "something went wrong" error message
After: Clear error message explaining the password reset requirement
Migration
Step 1: Update Translation Files
Add this translation key to your locale files (e.g.,
core/messages/en.json):{ "Auth": { "Login": { "passwordResetRequired": "Password reset required. Please check your email for instructions to reset your password." } } }Repeat for all supported locales if you maintain custom translations.
Step 2: Update Login Server Action
In your login server action (e.g.,
core/app/[locale]/(default)/(auth)/login/_actions/login.ts):Add the password reset error handling block:
This should be placed in your error handling, before the generic "Invalid credentials" check.
#2780
9cc6786Thanks @bc-svc-local! - Update translations.#2794
75b0a1aThanks @bc-svc-local! - Update translations.