github Sitecore/content-sdk v0.3.0
0.3.0

latest releases: v1.2.0-canary.10, v1.2.0-canary.9, v1.2.0-canary.8...
2 months ago

๐ŸŽ‰ 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 to create-content-sdk-app (unscoped package)

    • Users can now run npx create-content-sdk-app instead of npx @sitecore-content-sdk/create-app
    • Follows the same pattern as other popular initializers like create-react-app and create-next-app
  • [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] Refactor SitecoreContext naming to SitecoreProvider (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 to pageContext 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-level getServerSideProps and getStaticProps methods have been replaced by a single getComponentServerProps 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.
  • [nextjs] [DesignLibrary] Script is requested from production even when a custom Edge URL is set (#98):

    • The EditingScripts component doesn't accept sitecoreEdgeUrl property anymore.
    • The custom Edge URL is now accessed via the api property of the SitecoreProvider component.
  • [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 default nextjs 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 from SitecoreClientInit type
    • Removed SiteResolver dependency and resolveSite() from SitecoreClient
    • Removed support for passing a custom siteResolver to SitecoreClient
    • Updated SitecoreClient to construct the Page using siteName instead of the full SiteInfo.
    • Updated SitecoreClient's getPagePaths() to accept a sites parameter
    • Modified the getPagePaths method in SitecoreClient to accept a sites parameter.
    • Updated Next.js SitemapMiddleware and RobotsMiddleware to use their own instance of SiteResolver and accept a sites parameter via the constructor.

๐Ÿ› 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 optional disableSuspense 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)

Don't miss a new content-sdk release

NewReleases is sending notifications on new releases.