Skip to content

[WIP] Test revert #51604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,11 @@ jobs:
uses: ./.github/actions/build-android
with:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
run-e2e-tests: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
run-e2e-tests: true # ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}

test_e2e_android_rntester:
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
# if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
runs-on: 4-core-ubuntu
needs: [build_android]
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void ImageProps::setProp(
}
}

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

static folly::dynamic convertImageSource(const ImageSource& imageSource) {
folly::dynamic imageSourceResult = folly::dynamic::object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ class ImageProps final : public ViewProps {
Float fadeDuration{};
bool progressiveRenderingEnabled{};

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ SharedDebugStringConvertibleList ScrollViewProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

static folly::dynamic convertScrollViewMaintainVisibleContentPosition(
const ScrollViewMaintainVisibleContentPosition& value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ class ScrollViewProps final : public ViewProps {
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ SharedDebugStringConvertibleList BaseTextProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

static folly::dynamic toDynamic(const Size& size) {
folly::dynamic sizeResult = folly::dynamic::object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ class BaseTextProps {
SharedDebugStringConvertibleList getDebugProps() const;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

void appendTextAttributesProps(
folly::dynamic& result,
const BaseTextProps* prevProps) const;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ SharedDebugStringConvertibleList ParagraphProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic ParagraphProps::getDiffProps(const Props* prevProps) const {
static const auto defaultProps = ParagraphProps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ class ParagraphProps : public ViewProps, public BaseTextProps {
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SharedDebugStringConvertibleList RawTextProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic RawTextProps::getDiffProps(const Props* prevProps) const {
folly::dynamic result = folly::dynamic::object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ class RawTextProps : public Props {
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SharedDebugStringConvertibleList TextProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic TextProps::getDiffProps(const Props* prevProps) const {
folly::dynamic result = folly::dynamic::object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ class TextProps : public Props, public BaseTextProps {
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ ComponentName UnimplementedViewProps::getComponentName() const {
return componentName_;
}

#ifdef RN_SERIALIZABLE_STATE

#ifdef ANDROID
folly::dynamic UnimplementedViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = UnimplementedViewProps();
Expand All @@ -35,7 +34,6 @@ folly::dynamic UnimplementedViewProps::getDiffProps(

return result;
}

#endif

} // namespace facebook::react
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ class UnimplementedViewProps final : public ViewProps {
void setComponentName(ComponentName componentName);
ComponentName getComponentName() const;

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ SharedDebugStringConvertibleList HostPlatformViewProps::getDebugProps() const {
}
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

inline static void updateEventProp(
folly::dynamic& result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class HostPlatformViewProps : public BaseViewProps {
SharedDebugStringConvertibleList getDebugProps() const override;
#endif

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID

folly::dynamic getDiffProps(const Props* prevProps) const override;

#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ConcreteComponentDescriptor : public ComponentDescriptor {
// Note that we just check if `Props` has this flag set, no matter
// the type of ShadowNode; it acts as the single global flag.
if (ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) {
#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID
const auto& dynamic = shadowNodeProps->rawProps;
#else
const auto& dynamic = static_cast<folly::dynamic>(rawProps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void Props::initialize(
nativeId = ReactNativeFeatureFlags::enableCppPropsIteratorSetter()
? sourceProps.nativeId
: convertRawProp(context, rawProps, "nativeID", sourceProps.nativeId, {});
#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID
if (ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) {
auto& oldRawProps = sourceProps.rawProps;
auto newRawProps = rawProps.toDynamic(filterObjectKeys);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ class Props : public virtual Sealable, public virtual DebugStringConvertible {

std::string nativeId;

#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID
folly::dynamic rawProps = folly::dynamic::object();

virtual folly::dynamic getDiffProps(const Props* prevProps) const {
return folly::dynamic::object();
}

#endif

#if RN_DEBUG_STRING_CONVERTIBLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ShadowNode::SharedListOfShared ShadowNode::emptySharedShadowNodeSharedList() {
Props::Shared ShadowNode::propsForClonedShadowNode(
const ShadowNode& sourceShadowNode,
const Props::Shared& props) {
#ifdef RN_SERIALIZABLE_STATE
#ifdef ANDROID
bool hasBeenMounted = sourceShadowNode.hasBeenMounted_;
bool sourceNodeHasRawProps = !sourceShadowNode.getProps()->rawProps.empty();
if (!hasBeenMounted && sourceNodeHasRawProps && props) {
Expand Down
Loading