IjzerenHein / IjzerenHein/react-navigation-shared-element

Shared element renders on top of absolute other views

Open
#90 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

First of all, amazing library! It is helping me a lot with my project.

Regarding this I have the following error which I put a gif of the behavior and I will explain:

I have the image which I want to share and it is being shared perfectly, the problem is that I have two capable of degrading absolutely, one above and one below, these cause an error of a couple of seconds when I return from the animation, could you help me with any advice on how to solve this ?, both buttons and gradients are absolutely

![2020-07-14_18-26-43](https://user-images.githubusercontent.com/1980048/87482451-ce833f00-c607-11ea-95aa-a293928ffba3.gif)

```js

const Outstanding = ({ item, onPlay, onWatchlist, onDiscoverMore }: Props) => {
const [loaded, setLoaded] = useState(false);
const { t } = useTranslation('layout');
return (






setLoaded(!loaded)}
/>


(onWatchlist ? onWatchlist() : {})}>


(onPlay ? onPlay() : {})}>


(onDiscoverMore ? onDiscoverMore() : {})}>



{t('playnow')}


);
};

export default Outstanding;

const Detail = () => {
const { goBack, getParam, dangerouslyGetParent } = useNavigation();
const { item } = getParam('item');
const parent = dangerouslyGetParent();
console.tron.log({ item });
const back = () => {
if (parent) {
toggleTabs(parent, true);
}
goBack();
};

return (

{/*
*/}






back()} />


);
};

Detail.sharedElements = (navigation: ReturnType) => {
const { item } = navigation.getParam('item');
return [item.id];
};

export default Detail;

```

Thanks again

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the SharedElement usage in the Outstanding and Detail components, including Detail.sharedElements, and reproduce the return transition shown in the GIF. Check how the absolutely positioned Actions and gradient elements interact with the shared image during that transition; done means the transient overlap no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.