Commit c2c1002
Split view conversion headers into
Summary:
Pull Request resolved: facebook#55709
The monolithic `conversions.h` (1785 lines) and several other conversion-related
headers made the view directory hard to navigate. This splits them into
domain-specific files under a new `conversions/` subdirectory:
- `YogaLayout.h` — Yoga float conversions, layoutMetricsFromYogaNode
- `YogaStyle.h` — fromRawValue for yoga enums, convertRawProp(yoga::Style)
- `Transform.h` — transform/transformOrigin parsing
- `ViewStyle.h` — fromRawValue for view style enums, CascadedRectangle helpers
- `Events.h` — convertRawProp(ViewEvents)
- `Background.h/cpp` — background image/gradient conversions
- `DebugString.h` — debug string toString overloads
- `CSSPrimitives.h` — CSS color/length/angle coercion helpers
- `Filter.h` — filter parsing
- `BoxShadow.h` — box shadow parsing
- `Accessibility.h` — accessibility trait/role/state conversions
Forwarding headers are left at old paths (`conversions.h`,
`accessibilityPropsConversions.h`, `propsConversions.h`) so external consumers
continue to compile unchanged. Internal consumers (`BaseViewProps.cpp`,
`ConversionsTest.cpp`) are updated to use the new paths directly.
All file copies use `sl copy` to preserve blame history.
Changelog: [Internal]
Differential Revision: D94169104components/view/conversions/ subdirectory (facebook#55709)1 parent 5b9b25a commit c2c1002
19 files changed
Lines changed: 3353 additions & 3236 deletions
File tree
- packages/react-native/ReactCommon/react/renderer/components/view
- conversions
- tests
packages/react-native/ReactCommon/react/renderer/components/view/BackgroundImagePropsConversions.h
Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 13 | | |
| 14 | + | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments