Skip to content

Colocate deprecated native component specs with their components#57416

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D110472967
Closed

Colocate deprecated native component specs with their components#57416
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D110472967

Conversation

@rubennorte

Copy link
Copy Markdown
Member

Summary:
Moves the native component specs out of the legacy specs_DEPRECATED/components directory and into a specs/ folder colocated with the component they belong to, under src/private/components/<component-name>/specs/. The directory name for each component is its public name, lowercased and without spaces (e.g. DrawerLayoutAndroid -> drawerlayoutandroid, RefreshControl -> refreshcontrol).

This continues the effort described in the specs_DEPRECATED README of gradually moving specs out of that directory until it can be removed. Specs shared by the same public component are grouped together (e.g. AndroidSwitchNativeComponent and SwitchNativeComponent under switch/specs, AndroidSwipeRefreshLayoutNativeComponent and PullToRefreshViewNativeComponent under refreshcontrol/specs).

Relative imports inside each moved spec were updated for the new depth, and every consumer (the re-export shims under Libraries plus the colocated scrollview and safeareaview consumers) now points at the new location. Public import paths are unchanged because the Libraries re-export shims are preserved. Codegen still discovers the specs since it scans the whole src directory.

Changelog: [Internal]

Differential Revision: D110472967

Summary:
Moves the native component specs out of the legacy `specs_DEPRECATED/components` directory and into a `specs/` folder colocated with the component they belong to, under `src/private/components/<component-name>/specs/`. The directory name for each component is its public name, lowercased and without spaces (e.g. `DrawerLayoutAndroid` -> `drawerlayoutandroid`, `RefreshControl` -> `refreshcontrol`).

This continues the effort described in the `specs_DEPRECATED` README of gradually moving specs out of that directory until it can be removed. Specs shared by the same public component are grouped together (e.g. `AndroidSwitchNativeComponent` and `SwitchNativeComponent` under `switch/specs`, `AndroidSwipeRefreshLayoutNativeComponent` and `PullToRefreshViewNativeComponent` under `refreshcontrol/specs`).

Relative imports inside each moved spec were updated for the new depth, and every consumer (the re-export shims under `Libraries` plus the colocated `scrollview` and `safeareaview` consumers) now points at the new location. Public import paths are unchanged because the `Libraries` re-export shims are preserved. Codegen still discovers the specs since it scans the whole `src` directory.

Changelog: [Internal]

Differential Revision: D110472967
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 2, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jul 2, 2026
@meta-codesync

meta-codesync Bot commented Jul 2, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110472967.

@meta-codesync meta-codesync Bot closed this in a7959dd Jul 2, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 2, 2026
@meta-codesync

meta-codesync Bot commented Jul 2, 2026

Copy link
Copy Markdown

This pull request has been merged in a7959dd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant