chore(rename): flag AntD compat shim as deprecated#8
Merged
Conversation
Rename src/shared/components/ui/ui-components.tsx → src/shared/components/ui/antd-compat-deprecated.tsx to reflect that this file is the AntD-compatibility shim layer (not a generic UI module) and is deprecated for new code. The AntD Form bridge was already removed in PR #7 (commit 50b185e), leaving this file as a historical artifact. The new name makes the deprecation status visible in import statements, file listings, and editor pickers. Added a prominent @deprecated JSDoc block at the top with a full migration guide mapping every re-export to its canonical shadcn/ui path. Updated the backward-compat shim at src/components/ui/ui-components.tsx to follow the new file location. All 7 existing callers continue to work through the shim (zero-risk rename, no caller touched). Verification: tsc 0 / lint 0 / 1596 tests pass / build OK.
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.
Summary
Rename
src/shared/components/ui/ui-components.tsx→antd-compat-deprecated.tsxtoflag the file as deprecated (it is the AntD-compatibility shim layer, not a generic
UI module). Update the backward-compat shim at
src/components/ui/ui-components.tsxto follow the new path.
Motivation
The name
ui-components.tsxwas misleading — it sounded like a generic UI modulebut in practice it was a thin AntD-compat layer wrapping shadcn/ui primitives with
fake AntD API names (
LegacySelect,AntdCard,ShadcnTextaliased asText, etc.).The AntD Form bridge was already removed in PR #7 (#50b185e), leaving the file as a
historical artifact.
Renaming to
antd-compat-deprecated.tsxmakes the deprecation status visible in:The new header doc lists the correct shadcn/ui import paths for every component
this file re-exports, so future contributors don't have to guess.
Changes
Renamed:
src/shared/components/ui/ui-components.tsx→antd-compat-deprecated.tsx@deprecatedJSDoc block at top with full migration guide(mapping every re-export to its shadcn/ui canonical path)
Updated shim:
src/components/ui/ui-components.tsx@deprecatedcross-reference to the renamed fileWhy not delete the file?
7 callers still import from this file through the backward-compat shim:
src/shared/components/business/CompositionStudio/index.tsxsrc/shared/components/business/CompositionStudio/FrameEditForm.tsxsrc/shared/components/business/CompositionStudio/GlobalSettingsForm.tsxsrc/features/cost/components/CostPanel.tsxsrc/features/script/components/ScriptGenerator.tsxsrc/features/audio/components/AudioEditorPanel.tsxsrc/pages/project-detail/ProjectDetailPage.tsxMigrating them to direct shadcn imports is a follow-up PR (a Select signature
change
onChange→onValueChangeplus removal of the shim + this file).This PR keeps the rename atomic and zero-risk.
Verification
npx tsc --noEmit→ 0 errorsnpm run lint -- --quiet→ 0 errorsnpm test -- --runInBand→ 1596 pass / 4 skip / 0 fail (90 suites)npm run build→ OK, bundle size unchangedRisk
None. Pure rename + docstring update. All 7 callers continue to work
through the updated shim.