๐ New Features & Improvements
- Design Library Early Access enablers:
๐ Breaking Changes
-
Refactored
SitecoreProvider
and enhancedSitecoreClient
(#158):Reworked
SitecoreProvider
and Context- Refactored components that use
SitecoreProvider
and related utilities. SitecoreProvider
now accepts apage
prop (Page
type fromSitecoreClient
) instead oflayoutData
.- Context state updates:
pageContext
โ renamed topage
.page
representsPage
interface.setContext
โ renamed tosetPage
. The method updates thepage
state.
- Removed
SitecoreProviderPageContext
interface.- Consumers should now access
page
via thePage
interface.
- Consumers should now access
Updated
withSitecore
anduseSitecore
APIs- Updated naming for clarity and consistency:
pageContext
โpage
updateContext
โupdatePage
Improvements to
SitecoreClient
-
Type cleanup and consistency:
- Removed
NextjsPage
interface. - All methods that generate page data now return a consistent
Page
object. - Properties
componentProps
andnotFound
are now part of theSitecorePageProps
interface and are treated as optional. SitecorePageProps
now requires a standalonepage
field instead of merging all data into one props object.
- Removed
-
New
getErrorPage()
method:- Replaces
getErrorPages()
, exposing only necessary data. - Introduces a new
ErrorPage
enum to select specific error types (e.g.,ErrorPage.NotFound
)
- Replaces
-
New
PageMode
Type- The
Page
type now includes amode
field of typePageMode
, providing runtime context (e.g. editing, design library, preview). - Replaces older properties like
pageState
,pageEditing
,componentType
.
mode: { isNormal: boolean; isPreview: boolean; isEditing: boolean; isDesignLibrary: boolean; }
- The
DesignLibrary Component
- The
DesignLibrary
component no longer accepts alayoutData
prop. - It now accesses
page
directly fromSitecoreProvider
.
- Refactored components that use
-
Refactor and simplify service names (#133):
You will be affected by the following changes only if:
- You are referencing Content SDK services directly rather than using the
SitecoreClient
methods.
If you're using the
SitecoreClient
to access services, no changes are required.Service class and config names have been refactored for clarity and consistency:
- Renamed:
RestComponentLayoutService
โComponentLayoutService
RestComponentLayoutServiceConfig
โComponentLayoutServiceConfig
GraphQLEditingService
โEditingService
GraphQLEditingServiceConfig
โEditingServiceConfig
GraphQLDictionaryService
โDictionaryService
GraphQLDictionaryServiceConfig
โDictionaryServiceConfig
GraphQLLayoutService
โLayoutService
GraphQLLayoutServiceConfig
โLayoutServiceConfig
GraphQLPersonalizeService
โPersonalizeService
GraphQLPersonalizeServiceConfig
โPersonalizeServiceConfig
GraphQLErrorPagesService
โErrorPagesService
GraphQLErrorPagesServiceConfig
โErrorPagesServiceConfig
GraphQLRedirectsService
โRedirectsService
GraphQLRedirectsServiceConfig
โRedirectsServiceConfig
GraphQLRobotsService
โRobotsService
GraphQLRobotsServiceConfig
โRobotsServiceConfig
GraphQLSiteInfoService
โSiteInfoService
GraphQLSiteInfoServiceConfig
โSiteInfoServiceConfig
GraphQLSitemapXmlService
โSitemapXmlService
GraphQLSitemapXmlServiceConfig
โSitemapXmlServiceConfig
GraphQLSitePathService
โSitePathService
GraphQLSitePathServiceConfig
โSitePathServiceConfig
- Removed
DictionaryService
interface
- You are referencing Content SDK services directly rather than using the
-
[core]
[nextjs]
[templates/nextjs]
Refactor site resolution logic across packages (#141)(#155)- 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
[nextjs]
Ensure Redirect Middleware handles case-insensitive path matching to prevent missed redirects due to casing differences (#159)[core]
[nextjs]
Standardized way of handling contextId/clientContextId and related fallbacks (#150)
๐งน Chores
- Add Github action workflow to generate package size and test coverage metrics report (#151)