react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

fix: large header sizeToFit

Open WoLewicki opened this issue 3 years ago • 12 comments

Applied https://developer.apple.com/forums/thread/660745 solution suggested by @julian-baumann to make the large header appear on the Screen load. Should resolve #649 and #645.

WoLewicki avatar Oct 19 '20 10:10 WoLewicki

Tried this patch but it seems like it's resizing the header back button instead of the title?

giphy-2

nickyleach avatar Oct 26 '20 20:10 nickyleach

@nickyleach can you try and use the solution proposed here: https://github.com/software-mansion/react-native-screens/issues/645#issuecomment-712199841?

WoLewicki avatar Oct 30 '20 09:10 WoLewicki

@nickyleach can you try and use the solution proposed here: #645 (comment)?

@WoLewicki the proposed solution is working for me.

dylancom avatar Dec 16 '20 14:12 dylancom

@WoLewicki how can we help to merge it? We have to patch it in out code...

savelichalex avatar Jan 22 '21 10:01 savelichalex

@savelichalex I am afraid the change proposed here was rather a quick workaround, not a solution to the problem, and so it might not be ever merged in order not to introduce any other bugs. I think it is better to apply https://github.com/software-mansion/react-native-screens/issues/645#issuecomment-712199841 as it seems to consistently solve the problem.

WoLewicki avatar Jan 22 '21 10:01 WoLewicki

@WoLewicki the thing is we apply both that workarounds to get proper behaviour. If you look at gif above, you may notice that when it go back to settings screens the header is folded, though it shouldn't (you could see proper behaviour in default iOS settings app), and the change from current PR helps us to fix such problem.

Should I open a new issue for that? Or there are other ways how we could solve it? We are ready to contribute.

savelichalex avatar Jan 22 '21 10:01 savelichalex

I still don't get why you need this PR. https://github.com/software-mansion/react-native-screens/issues/645#issuecomment-712199841 answers the issue of a folded header and this PR tries to do the same thing exactly.

WoLewicki avatar Jan 22 '21 11:01 WoLewicki

@WoLewicki but what about Expo users? We need a native fix shipped with react-native-screens (if possible) to be included in SDK 41. Patching isn't an option for folks like me, because I love the managed experience. (Even though downsides are that I am sometimes handcuffed)

hirbod avatar Feb 17 '21 13:02 hirbod

This PR is not a solution to the problem, rather a workaround, which can result in other bugs, so we most probably don't want to merge it unfortunately. I believe the real solution is the change of react-native implementation. If you need this with Expo managed workflow, can't you use the workarounds using JS code pointed in the connected issue?

WoLewicki avatar Feb 17 '21 17:02 WoLewicki

None of them worked for me @WoLewicki

hirbod avatar Feb 17 '21 17:02 hirbod

I have no easy solution for this then unfortunately. Probably when EAS comes live for everyone, it will be simpler to patch native code for managed workflow.

WoLewicki avatar Feb 18 '21 12:02 WoLewicki

I am afraid not, only the one from this PR and the ones from the issues.

WoLewicki avatar Apr 29 '21 08:04 WoLewicki