Fix registry 404 and docs preview rendering#10222
Open
manthansubhash01 wants to merge 2 commits intoshadcn-ui:mainfrom
Open
Fix registry 404 and docs preview rendering#10222manthansubhash01 wants to merge 2 commits intoshadcn-ui:mainfrom
manthansubhash01 wants to merge 2 commits intoshadcn-ui:mainfrom
Conversation
Contributor
|
@manthansubhash01 is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix legacy registry 404 and docs preview reliability
Summary
This PR fixes a docs/registry regression in the v4 app where legacy registry style URLs returned 404 for some components (notably combobox), and docs previews could appear blank for lazy-loaded examples.
Problem
/r/styles/new-york/combobox.jsonfailed.Root Cause
new-york-v4, but some consumers still requestnew-york(ordefault).base-novainstead ofradix-nova.What Changed
1) Backward-compatible registry rewrites
Updated Next.js rewrites to map legacy style paths to canonical v4 style paths:
/r/styles/new-york/:path*->/r/styles/new-york-v4/:path*/r/styles/default/:path*->/r/styles/new-york-v4/:path*File changed:
apps/v4/next.config.mjs2) Corrected combobox docs style references
Replaced combobox docs style references with the correct radix style key.
File changed:
apps/v4/content/docs/components/radix/combobox.mdx3) Improved preview rendering resilience
Wrapped preview component rendering in
React.Suspense(with fallback) for both LTR and RTL branches.File changed:
apps/v4/components/component-preview-tabs.tsxImpact
Validation
public/r/styles/new-york-v4/combobox.jsonpublic/r/styles/new-york-v4/popover.jsonpublic/r/styles/new-york-v4/tooltip.jsonradix-nova.