Commit 58688bf
Summary:
Promote `backgroundImage` from `experimental_backgroundImage` to a stable style prop. It has been available in experimental mode for some time and is already used in popular open-source projects such as NativeWind, Unstyles, Tamagui, React Strict DOM, and others, with no reported issues so far.
`backgroundImage` currently supports `linear-gradient` and `radial-gradient`. `url()` support already has a PR up ([PRs](#54995)), it should not be a blocker imo though as gradient is also a big unlock.
## Changelog:
[GENERAL][CHANGED] - Remove `experimental_` prefix from `backgroundImage`
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: #57165
Test Plan: Tested background image screen on RNTester.
Reviewed By: javache
Differential Revision: D108301578
Pulled By: jorge-cab
fbshipit-source-id: 558d1d8943b3cd56557584eaf5e4bda112154298
1 parent aa429cf commit 58688bf
14 files changed
Lines changed: 191 additions & 143 deletions
File tree
- packages
- react-native
- Libraries
- Components/View
- __tests__
- NativeComponent
- StyleSheet
- ReactAndroid
- api
- src/main/java/com/facebook/react
- uimanager
- views/view
- ReactCommon/react/renderer/components/view
- platform/android/react/renderer/components/view
- rn-tester/js/examples
- BackgroundImage
- LinearGradient
- RadialGradient
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
| 338 | + | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
344 | | - | |
| 343 | + | |
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
520 | 521 | | |
521 | 522 | | |
522 | 523 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| 890 | + | |
890 | 891 | | |
891 | 892 | | |
892 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4509 | 4509 | | |
4510 | 4510 | | |
4511 | 4511 | | |
| 4512 | + | |
4512 | 4513 | | |
4513 | 4514 | | |
4514 | 4515 | | |
| |||
6486 | 6487 | | |
6487 | 6488 | | |
6488 | 6489 | | |
| 6490 | + | |
6489 | 6491 | | |
6490 | 6492 | | |
6491 | 6493 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
153 | 161 | | |
154 | 162 | | |
155 | 163 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
228 | 233 | | |
229 | 234 | | |
230 | 235 | | |
| |||
403 | 408 | | |
404 | 409 | | |
405 | 410 | | |
| 411 | + | |
406 | 412 | | |
407 | 413 | | |
408 | 414 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
| 628 | + | |
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
| |||
0 commit comments