IjzerenHein / IjzerenHein/react-native-shared-element

Any plans to release latest main changes as React native upgrade issues with RNSharedElementStyle

Open
#130 1 comment 1 reaction 0 assignees View on GitHub
needs repro
Dominant language
TypeScript
Stars
2.3k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

As below got modified in latest "react-native": "^0.78.1"

latest
typedef struct {
CGFloat topLeftHorizontal;
CGFloat topLeftVertical;
CGFloat topRightHorizontal;
CGFloat topRightVertical;
CGFloat bottomLeftHorizontal;
CGFloat bottomLeftVertical;
CGFloat bottomRightHorizontal;
CGFloat bottomRightVertical;
} RCTCornerRadii;

+ (RNSharedElementStyle*) getInterpolatedStyle:(RNSharedElementStyle*)style1 style2:(RNSharedElementStyle*)style2 position:(CGFloat) position
{
RNSharedElementStyle* style = [[RNSharedElementStyle alloc]init];
style.opacity = style1.opacity + ((style2.opacity - style1.opacity) * position);

CGRect radiiRect = CGRectMake(0, 0, 1000000, 1000000);
RCTCornerRadii radii1 = [style1.cornerRadii radiiForBounds:radiiRect];
RCTCornerRadii radii2 = [style2.cornerRadii radiiForBounds:radiiRect];
[style.cornerRadii setRadius:radii1.topLeft + ((radii2.topLeft - radii1.topLeft) * position) corner:RNSharedElementCornerTopLeft];
[style.cornerRadii setRadius:radii1.topRight + ((radii2.topRight - radii1.topRight) * position) corner:RNSharedElementCornerTopRight];
[style.cornerRadii setRadius:radii1.bottomLeft + ((radii2.bottomLeft - radii1.bottomLeft) * position) corner:RNSharedElementCornerBottomLeft];
[style.cornerRadii setRadius:radii1.bottomRight + ((radii2.bottomRight - radii1.bottomRight) * position) corner:RNSharedElementCornerBottomRight];

style.borderWidth = style1.borderWidth + ((style2.borderWidth - style1.borderWidth) * position);
style.borderColor = [RNSharedElementStyle getInterpolatedColor:style1.borderColor color2:style2.borderColor position:position];
style.backgroundColor = [RNSharedElementStyle getInterpolatedColor:style1.backgroundColor color2:style2.backgroundColor position:position];
style.shadowOpacity = style1.shadowOpacity + ((style2.shadowOpacity - style1.shadowOpacity) * position);
style.shadowRadius = style1.shadowRadius + ((style2.shadowRadius - style1.shadowRadius) * position);
style.shadowOffset = CGSizeMake(
style1.shadowOffset.width + ((style2.shadowOffset.width - style1.shadowOffset.width) * position),
style1.shadowOffset.height + ((style2.shadowOffset.height - style1.shadowOffset.height) * position)
);
style.shadowColor = [RNSharedElementStyle getInterpolatedColor:style1.shadowColor color2:style2.shadowColor position:position];
return style;
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the React Native 0.78.1 RCTCornerRadii definition and the getInterpolatedStyle method shown in the issue. Determine the required compatibility work and confirm whether the latest main changes are ready for release; done means the upgrade issue is addressed and the release status is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.