Skip to content

Commit 3903ce0

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Update format for codegen prop diffing (#51644)
Summary: Pull Request resolved: #51644 This diff updates the format for codegen prop diffing in Android changelog: [internal] internal Reviewed By: shwanton Differential Revision: D75476172 fbshipit-source-id: ec1c68ae1eb652fe9986386302969f9258983d39
1 parent da5d15b commit 3903ce0

4 files changed

Lines changed: 288 additions & 288 deletions

File tree

packages/react-native-codegen/e2e/deep_imports/__tests__/components/__snapshots__/GeneratePropsCpp-test.js.snap

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
110110
}
111111
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
112112
113-
if (disabled != oldProps->disabled) {
114-
result[\\"disabled\\"] = disabled;
115-
}
113+
if (disabled != oldProps->disabled) {
114+
result[\\"disabled\\"] = disabled;
115+
}
116116
117-
if (disabledNullable != oldProps->disabledNullable) {
118-
result[\\"disabledNullable\\"] = disabledNullable;
119-
}
117+
if (disabledNullable != oldProps->disabledNullable) {
118+
result[\\"disabledNullable\\"] = disabledNullable;
119+
}
120120
return result;
121121
}
122122
#endif
@@ -163,9 +163,9 @@ folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
163163
}
164164
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
165165
166-
if (tintColor != oldProps->tintColor) {
167-
result[\\"tintColor\\"] = *tintColor;
168-
}
166+
if (tintColor != oldProps->tintColor) {
167+
result[\\"tintColor\\"] = *tintColor;
168+
}
169169
return result;
170170
}
171171
#endif
@@ -353,9 +353,9 @@ folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
353353
}
354354
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
355355
356-
if (disabled != oldProps->disabled) {
357-
result[\\"disabled\\"] = disabled;
358-
}
356+
if (disabled != oldProps->disabled) {
357+
result[\\"disabled\\"] = disabled;
358+
}
359359
return result;
360360
}
361361
#endif
@@ -402,9 +402,9 @@ folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
402402
}
403403
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
404404
405-
if (disabled != oldProps->disabled) {
406-
result[\\"disabled\\"] = disabled;
407-
}
405+
if (disabled != oldProps->disabled) {
406+
result[\\"disabled\\"] = disabled;
407+
}
408408
return result;
409409
}
410410
#endif
@@ -457,33 +457,33 @@ folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
457457
}
458458
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
459459
460-
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
461-
result[\\"blurRadius\\"] = blurRadius;
462-
}
460+
if ((blurRadius != oldProps->blurRadius) && !(std::isnan(blurRadius) && std::isnan(oldProps->blurRadius))) {
461+
result[\\"blurRadius\\"] = blurRadius;
462+
}
463463
464-
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
465-
result[\\"blurRadius2\\"] = blurRadius2;
466-
}
464+
if ((blurRadius2 != oldProps->blurRadius2) && !(std::isnan(blurRadius2) && std::isnan(oldProps->blurRadius2))) {
465+
result[\\"blurRadius2\\"] = blurRadius2;
466+
}
467467
468-
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
469-
result[\\"blurRadius3\\"] = blurRadius3;
470-
}
468+
if ((blurRadius3 != oldProps->blurRadius3) && !(std::isnan(blurRadius3) && std::isnan(oldProps->blurRadius3))) {
469+
result[\\"blurRadius3\\"] = blurRadius3;
470+
}
471471
472-
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
473-
result[\\"blurRadius4\\"] = blurRadius4;
474-
}
472+
if ((blurRadius4 != oldProps->blurRadius4) && !(std::isnan(blurRadius4) && std::isnan(oldProps->blurRadius4))) {
473+
result[\\"blurRadius4\\"] = blurRadius4;
474+
}
475475
476-
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
477-
result[\\"blurRadius5\\"] = blurRadius5;
478-
}
476+
if ((blurRadius5 != oldProps->blurRadius5) && !(std::isnan(blurRadius5) && std::isnan(oldProps->blurRadius5))) {
477+
result[\\"blurRadius5\\"] = blurRadius5;
478+
}
479479
480-
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
481-
result[\\"blurRadius6\\"] = blurRadius6;
482-
}
480+
if ((blurRadius6 != oldProps->blurRadius6) && !(std::isnan(blurRadius6) && std::isnan(oldProps->blurRadius6))) {
481+
result[\\"blurRadius6\\"] = blurRadius6;
482+
}
483483
484-
if ((blurRadiusNullable != oldProps->blurRadiusNullable) && !(std::isnan(blurRadiusNullable) && std::isnan(oldProps->blurRadiusNullable))) {
485-
result[\\"blurRadiusNullable\\"] = blurRadiusNullable;
486-
}
484+
if ((blurRadiusNullable != oldProps->blurRadiusNullable) && !(std::isnan(blurRadiusNullable) && std::isnan(oldProps->blurRadiusNullable))) {
485+
result[\\"blurRadiusNullable\\"] = blurRadiusNullable;
486+
}
487487
return result;
488488
}
489489
#endif
@@ -531,9 +531,9 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
531531
}
532532
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
533533
534-
if (thumbImage != oldProps->thumbImage) {
535-
result[\\"thumbImage\\"] = thumbImage.toDynamic();
536-
}
534+
if (thumbImage != oldProps->thumbImage) {
535+
result[\\"thumbImage\\"] = thumbImage.toDynamic();
536+
}
537537
return result;
538538
}
539539
#endif
@@ -582,17 +582,17 @@ folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
582582
}
583583
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
584584
585-
if (progress1 != oldProps->progress1) {
586-
result[\\"progress1\\"] = progress1;
587-
}
585+
if (progress1 != oldProps->progress1) {
586+
result[\\"progress1\\"] = progress1;
587+
}
588588
589-
if (progress2 != oldProps->progress2) {
590-
result[\\"progress2\\"] = progress2;
591-
}
589+
if (progress2 != oldProps->progress2) {
590+
result[\\"progress2\\"] = progress2;
591+
}
592592
593-
if (progress3 != oldProps->progress3) {
594-
result[\\"progress3\\"] = progress3;
595-
}
593+
if (progress3 != oldProps->progress3) {
594+
result[\\"progress3\\"] = progress3;
595+
}
596596
return result;
597597
}
598598
#endif
@@ -639,9 +639,9 @@ folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
639639
}
640640
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
641641
642-
if (title != oldProps->title) {
643-
result[\\"title\\"] = title;
644-
}
642+
if (title != oldProps->title) {
643+
result[\\"title\\"] = title;
644+
}
645645
return result;
646646
}
647647
#endif
@@ -739,24 +739,24 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
739739
}
740740
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
741741
742-
if (thumbImage != oldProps->thumbImage) {
743-
result[\\"thumbImage\\"] = thumbImage.toDynamic();
744-
}
745-
746-
if (color != oldProps->color) {
747-
result[\\"color\\"] = *color;
748-
}
749-
750-
if (thumbTintColor != oldProps->thumbTintColor) {
751-
result[\\"thumbTintColor\\"] = *thumbTintColor;
752-
}
753-
754-
if (point != oldProps->point) {
755-
folly::dynamic pointResult = folly::dynamic::object();
756-
pointResult[\\"x\\"] = point.x;
757-
pointResult[\\"y\\"] = point.y;
758-
result[\\"point\\"] = pointResult;
759-
}
742+
if (thumbImage != oldProps->thumbImage) {
743+
result[\\"thumbImage\\"] = thumbImage.toDynamic();
744+
}
745+
746+
if (color != oldProps->color) {
747+
result[\\"color\\"] = *color;
748+
}
749+
750+
if (thumbTintColor != oldProps->thumbTintColor) {
751+
result[\\"thumbTintColor\\"] = *thumbTintColor;
752+
}
753+
754+
if (point != oldProps->point) {
755+
folly::dynamic pointResult = folly::dynamic::object();
756+
pointResult[\\"x\\"] = point.x;
757+
pointResult[\\"y\\"] = point.y;
758+
result[\\"point\\"] = pointResult;
759+
}
760760
return result;
761761
}
762762
#endif
@@ -900,12 +900,12 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
900900
}
901901
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
902902
903-
if (startPoint != oldProps->startPoint) {
904-
folly::dynamic pointResult = folly::dynamic::object();
905-
pointResult[\\"x\\"] = startPoint.x;
906-
pointResult[\\"y\\"] = startPoint.y;
907-
result[\\"startPoint\\"] = pointResult;
908-
}
903+
if (startPoint != oldProps->startPoint) {
904+
folly::dynamic pointResult = folly::dynamic::object();
905+
pointResult[\\"x\\"] = startPoint.x;
906+
pointResult[\\"y\\"] = startPoint.y;
907+
result[\\"startPoint\\"] = pointResult;
908+
}
909909
return result;
910910
}
911911
#endif
@@ -953,13 +953,13 @@ folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
953953
}
954954
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
955955
956-
if (placeholder != oldProps->placeholder) {
957-
result[\\"placeholder\\"] = placeholder;
958-
}
956+
if (placeholder != oldProps->placeholder) {
957+
result[\\"placeholder\\"] = placeholder;
958+
}
959959
960-
if (defaultValue != oldProps->defaultValue) {
961-
result[\\"defaultValue\\"] = defaultValue;
962-
}
960+
if (defaultValue != oldProps->defaultValue) {
961+
result[\\"defaultValue\\"] = defaultValue;
962+
}
963963
return result;
964964
}
965965
#endif

0 commit comments

Comments
 (0)