Skip to main content

Release: 3.20

· 7 min read
Léo Grech
Product Manager @ Front-Commerce

Typed props, marketplace pages, and better DX

Front-Commerce 3.20 is a milestone release for TypeScript adoption: all PropTypes-based components in Theme Chocolatine have been migrated to TypeScript, and a new codemod helps integrators do the same in their projects. The Gezy Marketplace gains a dedicated merchant page and a merchant facet on listing pages. A new shared ESLint configuration package replaces the deprecated Remix-based setup and upgrades to ESLint 10. Finally, the order details page now displays shipments grouped by delivery, including a new virtual shipments section.

Let's dive into the details!

PropTypes to TypeScript migration

All Theme Chocolatine components that relied on PropTypes have been migrated to TypeScript. Every component now exports named TypeScript prop types (e.g., ButtonProps, ModalProps, SliderProps), Storybook stories have been migrated to CSF3 format, and PropTypes runtime validation has been removed.

These technical improvements allow to improve component discoverability and usage in your projects, and reduces the risk of regressions. It makes your projects upgrades safer.

  • Atoms: Button, Icon, Stack, Body, Heading, Image, Link, Box, Rating, PriceFilter, ToggleButton and more
  • Molecules: Alert variants, FormActions, DropDown, ExpandableCard, Paginator, OptionPicker, LabelledIcon, LinkList and more
  • Organisms: Modal, RecapTable, Map, Lightbox, Slider, Breadcrumb, SteppedProgress, PostalAddressSelector and more
  • Templates: MultiStep, FormattedDate
  • Product & Cart: ProductView, CartContent, ImagesGallery and 21 components total
  • Checkout: AddressRecap, CartRecap, Payment, PlaceOrder, ShippingMethod and all checkout flow components
  • User, Newsletter, Wishlist, Wysiwyg: OrderRecap, OrderTable, Subscribe, WishlistProductGrid
  • Account, Layout: Dashboard, AddressBook, Information, Orders, Header, TopBar, BottomBar
  • Cross-package: Adyen, PayZen, Prismic, Magento2 PageBuilder, Adobe B2B RequisitionList, and compat formsy components

Refer to the migration guide for detailed instructions.

Gezy Marketplace: Merchant page

Buyers can now visit a dedicated merchant page displaying the merchant's profile (identity, description, ratings, location) and browse their product catalog with filters and pagination. The "Sold by" link on product offers navigates directly to this page.

  • Merchant profile: buyers can visit a merchant's page to see their identity, description, ratings and location
  • Product catalog: the merchant page includes a filtered and paginated product listing
  • Merchant facet: product listing pages now expose a merchant filter so buyers can narrow results by seller
  • Offer cards: product cards on listing pages display marketplace offers with price, merchant name and offers count

Gezy Marketplace Merchant Page

Order details: shipment-based display and virtual shipments

The order details page now groups items by shipment instead of showing a flat list, supporting multi-delivery, multi-package and multi-merchant scenarios. Each shipment displays its tracking information, shipping address and method. A new virtual shipments section handles downloadable products, subscriptions and other items that are never physically shipped.

Co-located GraphQL fragments for extension features

Extensions can now declare GraphQL fragments alongside their components using a new fragment field in feature registrations. Components can now be registered like this, and the Fragment is collocated with its component:

export default defineExtension({
...
unstable_lifecycleHooks: {
onFeaturesInit: (hooks) => {
hooks.registerFeature("orderDetails", {
ui: {
constraints: { targetGraphQLType: "Order" },
componentsMap: {
OrderItems: {
component: new URL(
"./theme/modules/OrderItems/index.js",
import.meta.url,
),
fragment: new URL(
"./theme/modules/OrderItems/OrderItemsFragment.gql",
import.meta.url,
),
},
},
},
});
},
},
});

See Co-located GraphQL fragments for more details.

Other changes

Features

  • Codemod:
    • We added a remove-prop-types motion to the 3.20.0 codemod transform that removes PropTypes imports, comments out assignments, and inserts TODO markers for TypeScript typing
    • We added a codemod to rename OrderDetails feature to orderDetails following the camelCase naming convention
  • Core:
    • We added VirtualShipment type and Order.virtualShipments field to the GraphQL schema for virtual products
    • We added support for URL in the fragment field for extension features and content composition, allowing co-located .gql files
    • We added support for declaring GraphQL fragments on feature components
    • We added detection of duplicate extension registration at config-load time
    • We added detection of GraphQL namespace collisions at config-load time
    • We deprecated isShippable, shipping_address, and shipping_method_title on Order in favor of shipments
  • ESLint:
    • We added the new @front-commerce/eslint-config package with flat config for ESLint 10
    • We added jsx-spread-before-fixed-props rule
    • We added feature-name-lowercase-first rule
  • Gezy Marketplace:
    • We added a dedicated merchant page with profile, product catalog and filters
    • We added a merchant facet filter to product listing pages
    • We added marketplace offers display on product item cards
  • Magento1:
    • We added warnings when unsupported product types (grouped, downloadable) are loaded
  • Remix:
    • We enabled prefetch for dynamic routes
    • We added auto-inclusion of extension type declarations in generated tsconfig
  • Theme Chocolatine:
    • We migrated all components from PropTypes to TypeScript across 11 phases, exporting named TypeScript prop types and migrating stories to CSF3
    • We added virtual shipments display on the order details page
    • We added shipment-based order display on order details

Improvements

  • Codemod:
    • We improved actionable warning messages in SCSS and JS-to-JSX codemods with exact manual steps when the codemod cannot complete the migration automatically
  • Core:
    • We enforced strict ExtensionFeatures typing via declaration merging
    • We fixed FeatureFlags type to use a flat Record<string, boolean> instead of the nested FeatureFlagMap

Bug Fixes

  • Gezy:
    • We fixed an issue where adding a first item to cart would empty it due to stale Redis cache
    • We fixed an issue where the merchant was not pre-selected in the new conversation form
  • Magento2:
    • We fixed an issue where virtual-only orders would generate an empty shipment
  • Theme Chocolatine:
    • We fixed a spacing issue on the RecapTableLine component
    • We fixed the Rating reset button not clearing the displayed value
    • We fixed the LinkButton losing its button appearance after TypeScript migration

Dependencies updates

Core / Runtime packages:

PackageFromTo
axios1.13.51.14.0
graphql16.12.016.13.2
ioredis5.9.35.10.1
lodash4.17.234.18.1
lodash-es4.17.234.18.1
isbot5.1.355.1.37
react-intl8.1.38.1.4
react-cookie8.0.18.1.0
react-icons5.5.05.6.0
validator13.15.2613.15.35
convict6.2.46.2.5
dotenv17.3.117.4.1
swr2.4.02.4.1
universal-cookie8.0.18.1.0
async-ratelimiter1.6.41.6.5
@formatjs/cli-lib8.3.08.5.1
contentful11.10.411.12.0

GraphQL:

PackageFromTo
graphql-yoga5.18.05.21.0
@graphql-yoga/plugin-disable-introspection2.19.02.22.0
@graphql-yoga/render-graphiql5.18.05.21.0
@graphql-codegen/cli6.1.26.2.1
@graphql-codegen/client-preset5.2.35.2.4
@graphql-codegen/schema-ast5.0.05.0.1
@graphql-codegen/typescript5.0.85.0.9
vite-plugin-graphql-codegen3.8.03.9.0

Payment Providers:

PackageFromTo
@adyen/adyen-web6.31.16.33.0
@stripe/react-stripe-js5.6.05.6.1
@stripe/stripe-js8.8.08.11.0
stripe20.3.120.4.1

Search:

PackageFromTo
algoliasearch5.49.05.50.1

Observability:

PackageFromTo
@opentelemetry/instrumentation-http0.212.00.214.0
@opentelemetry/sdk-node0.212.00.214.0

Build Tools:

PackageFromTo
esbuild0.27.30.28.0
rollup4.59.04.60.1
autoprefixer10.4.2410.4.27
sass1.97.31.99.0
globby16.1.116.2.0
minimatch10.2.210.2.5
p-queue9.1.09.1.1
path-to-regexp8.3.08.4.2

Dev Tools / Testing:

PackageFromTo
eslint8.57.110.2.0
memfs4.56.104.57.1

Storybook:

PackageFromTo
storybook10.2.1010.3.4
@storybook/addon-docs10.2.1010.3.4
@storybook/addon-links10.2.1010.3.4
@storybook/addon-onboarding10.2.1010.3.4
@storybook/builder-vite10.2.1010.3.4
@storybook/react-vite10.2.1010.3.4
@chromatic-com/storybook5.0.15.1.1

Fixes from 3.20 have also been backported into previous minor versions. The following patch versions were released: 3.19.1, 3.18.4, 3.17.3, 3.16.4, 3.15.5, 3.14.6, and 3.13.7.


Upgrade Front-Commerce (Migration guides): 3.20.0
Read the full changelog (Customers only): 3.20.0.