๐ New Features & Improvements
[create-content-sdk-app]
: Refactoring/Cleanup for scss files in SXA components (#119)(#122)[core]
[nextjs]
[DesignLibrary] Include metadata in the Design Library rendering mechanism (#118)[core]
[nextjs]
[cli]
Add automatic component map generation (#124)(#128)(#130)[create-sitecore-jss]
Remove graphql introspection sample and scripts folder from next starter application (#135)[core]
[Content SDK] Update environment variable naming and associated config property (#143)
๐ Breaking Changes
-
[create-content-sdk-app]
Renamed package from@sitecore-content-sdk/create-app
tocreate-content-sdk-app
(unscoped package)- Users can now run
npx create-content-sdk-app
instead ofnpx @sitecore-content-sdk/create-app
- Follows the same pattern as other popular initializers like
create-react-app
andcreate-next-app
- Users can now run
-
[all]
Renamed all JSS references to Content SDK across the codebase: (#131)- The create-sitecore-jss package has been renamed to create-content-sdk-app (unscoped package)
- Component types and props renamed:
ReactJssComponent
โReactContentSdkComponent
NextJssComponent
โNextjsContentSdkComponent
-
[react]
[nextjs]
RefactorSitecoreContext
naming toSitecoreProvider
(95):We've revisited and improved the
SitecoreContext
naming for clarity and consistency. This affects component names, types, hook, and HOC.Component Renames
-
Component:
SitecoreContext
โSitecoreProvider
-
Properties:
context
property renamed topageContext
to clarify that it holds page-specific data only
-
Interfaces:
SitecoreContextValue
โSitecoreProviderPageContext
SitecoreContextReactContext
โSitecoreProviderReactContext
SitecoreContextState
โSitecoreProviderState
SitecoreContextProps
โSitecoreProviderProps
Hook and HOC Renames
-
Functions:
withSitecoreContext
โwithSitecore
useSitecoreContext
โuseSitecore
-
Properties:
updateSitecoreContext
property ->updateContext
sitecoreContext
property ->pageContext
-
Interfaces:
WithSitecoreContextOptions
โWithSitecoreOptions
WithSitecoreContextProps
โWithSitecoreProps
WithSitecoreContextHocProps
โWithSitecoreHocProps
-
-
[nextjs]
Component-levelgetServerSideProps
andgetStaticProps
methods have been replaced by a singlegetComponentServerProps
method for simplicity.- In case a separate logic is needed depending on SSR/SSG context, an
isServerSidePropsContext
helper method from@sitecore-content-sdk/nextjs/utils
can now be used.
- In case a separate logic is needed depending on SSR/SSG context, an
-
[nextjs]
[DesignLibrary] Script is requested from production even when a custom Edge URL is set (#98):- The
EditingScripts
component doesn't acceptsitecoreEdgeUrl
property anymore. - The custom Edge URL is now accessed via the
api
property of theSitecoreProvider
component.
- The
-
[nextjs]
defineCliConfig
import has been moved to@sitecore-content-sdk/nextjs/config-cli
submodule (#128). -
[core][nextjs][cli]
Re-introduce component map generation logic (#124)(#139) -
[create-content-sdk-app]
Remove SXA components and style files from defaultnextjs
template (#139) -
[core]
[nextjs]
[templates/nextjs]
Environment variables' naming has been updated (#143)JSS_EDITING_SECRET
โSITECORE_EDITING_SECRET
NEXT_PUBLIC_SITECORE_SITE_NAME
โNEXT_PUBLIC_DEFAULT_SITE_NAME
DISABLE_SSG_FETCH
โGENERATE_STATIC_PATHS
disableStaticPaths
config property โgenerateStaticPaths
(with inverted logic for clarity)
-
[core]
[nextjs]
[templates/nextjs]
Refactor site resolution logic across packages (#141)- Removed
sites
parameter fromSitecoreClientInit
type - Removed
SiteResolver
dependency andresolveSite()
fromSitecoreClient
- Removed support for passing a custom siteResolver to
SitecoreClient
- Updated
SitecoreClient
to construct thePage
usingsiteName
instead of the fullSiteInfo
. - Updated SitecoreClient's
getPagePaths()
to accept asites
parameter - Modified the
getPagePaths
method inSitecoreClient
to accept asites
parameter. - Updated Next.js
SitemapMiddleware
andRobotsMiddleware
to use their own instance ofSiteResolver
and accept asites
parameter via the constructor.
- Removed
๐ Bug Fixes
[core]
Fix for enabling debug logs previously not appearing during build execution (#137)[core]
Fix for making clientContextId optional for client-side execution to avoid runtime errors (#121)[core]
[sitecore.config]
Fallback values are not respected when framework specific value is empty & validate resolved config instead of base (#97)[nextjs]
Improve device detection and prevent false prefetch handling in Personalize middleware and also ensure personalized responses are not served from prefetch cache and proper personalization was applied during client side navigation. (#129)[react]
Suspense in ErrorBoundary component is not rendered when it is wrapping a BYOCWrapper to prevent client side hydration errors (#132)[nextjs]
Fix component-level data fetching method is exposed in client bundle (#134)[react]
Add an optionaldisableSuspense
flag to the Placeholder component to prevent error boundaries from rendering Suspense which helps contain errors for components. This can help avoid hydration issues in connected mode. (#96)
๐งน Chores
[react]
Update feaas dependencies (#149)