Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nextjs] Move ComponentLibrary from a separate route to Layout.tsx #2053

Merged
merged 10 commits into from
Mar 18, 2025

Conversation

addy-pathania
Copy link
Contributor

@addy-pathania addy-pathania commented Mar 17, 2025

Description / Motivation

Customers typically customize catch-all route and Layout.tsx with various things like React contexts.
That mean they need to re-apply those modification on the DesignLibrary route too, which makes user experience worse.

  • Removed component-library/render file route and now redirectd to /
  • Renamed ComponentLibraryLayout to DesignLibrary for distinction of Layouts and all related utils and functions.
  • All rendering logic has been unified into a single Layout.tsx which now handles the rendering of DesignLibrary based on renderingType

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Sorry, something went wrong.

@addy-pathania addy-pathania requested review from a team and stasmaxymov March 17, 2025 20:57
@stasmaxymov
Copy link
Contributor

I think there are missing changes to editing-render-middleware.ts, as now it should redirect to a root path intead of /component-library/render

…, redirect to root
Copy link
Contributor

@art-alexeyenko art-alexeyenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some minor comments for your consideration, and please make sure azure pipeline completes.
Regardles, approved. Good job and well done Addy.

@addy-pathania addy-pathania merged commit 89df8ed into release/beta Mar 18, 2025
1 check passed
@addy-pathania addy-pathania deleted the feature/jss-5300-component-lib-layout branch March 18, 2025 19:10
@addy-pathania addy-pathania changed the title Move ComponentLibrary from a separate route to Layout.tsx [sitecore-jss][sitecore-jss-nextjs][nextjs-xmcloud][nextjs-sxa]Move ComponentLibrary from a separate route to Layout.tsx Mar 18, 2025
@addy-pathania addy-pathania changed the title [sitecore-jss][sitecore-jss-nextjs][nextjs-xmcloud][nextjs-sxa]Move ComponentLibrary from a separate route to Layout.tsx [Nextjs] Move ComponentLibrary from a separate route to Layout.tsx Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants