1.0.0-alpha.2 has been released with several improvements: revamped cart page, remote schema stitching, sitemap generation…
Read more about what’s new in this release that makes us closer to 1.0!
As you may know, Front-Commerce UI components are organized according to Atomic Design’s principles. In this release, several atoms have been improved to make their API clearer and reduce the risk to use them incorrectly.
The main components impacted are:
<Button> (and its variants),
<ResizedImage> and some form-related atoms.
We also ensured that styles were not leaking across components, and that all variants were identified and used.
Their Storybook stories were also cleaned and homogeneized.
Components were exposing heterogeneous API for using a variant (boolean props,
To improve consistency and make impossible states impossible, we’ve decided to change their API and always use an
appearance property which is an enumeration of existing variants.
These changes are backward compatible. Deprecation warnings will appear if you keep using the old properties.
The Cart page was one of the oldest in our base theme. It used legacy components and was overriden in most of the existing Front-Commerce projects.
Based on real-world use cases and feedbacks from partners, we revamped it to be more consistent with other pages. We reused several components from the checkout and atoms/molecules for a more consistent UI and a cleaner code.
The Minicart has also been improved accordingly.
GraphQL modules can now register remote schemas to be stitched in the GraphQL schema, with custom transforms.
It enables a wide range of use cases for reusing your existing GraphQL endpoints in you eCommerce storefront. Here are some example:
Read more in our documentation: GraphQL remote schemas.
Several people asked us to be able to get Magento store configurations from the theme, so administrators could be autonomous for some storefront customizations.
Thanks to remote schema stitching we have been able to reuse the
storeConfig Magento2 GraphQL query.
Frontend developers can access these configurations the same way they would in a standard Magento2 PWA project, from the
Magento2GraphQL_storeConfig root query.
In order to allow compatibility with Magento 2.2 stores, you will have to register a new GraphQL module if you want to use it and are on Magento 2.3. See our Magento2 GraphQL documentation page for more information.
Here is the whole codebase of a module exposing Magento’s GraphQL queries in a @Front_Commerce application.— Pierre Martin (@pierremartin) 20 mars 2019
This is why you can (should?) start an M2 shop right now with FC and adopt GraphQL/PWA Studio features when they’ll be stable. pic.twitter.com/5kQNcj6yaX
During our first alpha releases, we had not taken the time to migrate existing scripts to the new architecture. This is now fixed and you can use scripts from Front-Commerce’s core on your servers.
Read more about them in our documentation: Front-Commerce’s scripts reference.
There are a few other things that were included in this release:
graphql-jsupdate to its latest version
To know more about this release, we recommend you to check the following pages: