Skip to content
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

fix: FullWindowOverlay not working with dynamic frameworks #2769

Merged

Conversation

war-in
Copy link
Contributor

@war-in war-in commented Mar 12, 2025

Description

Fixes #2652

The RNSFullWindowOverlay component was not used with dynamic frameworks, leading to the incorrect use of a placeholder component.

As highlighted in this React Native PR, all Fabric components must implement the load method to be correctly resolved.

Although RNSFullWindowOverlay.mm already included this method, it was mistakenly placed in RNSFullWindowOverlayContainer instead of RNSFullWindowOverlay, where it should have been implemented.

After correcting this placement, the reported issue is no longer reproducible 🎉.

Changes

  • moved load method from RNSFullWindowOverlayContainer to RNSFullWindowOverlay class

Screenshots / GIFs

Before

before

After

after

Test code and steps to reproduce

Checklist

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
war-in Marcin Warchoł
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's great, thank you. Mark the PR as ready for view when you're ready & tag me.

@war-in war-in marked this pull request as ready for review March 12, 2025 13:06
Copy link
Member

@WoLewicki WoLewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@war-in
Copy link
Contributor Author

war-in commented Mar 12, 2025

@kkafar done!

There is one failing check - Test iOS e2e
Any idea what's wrong there? 🤔

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that is a great catch.

What actually stuns me, that despite this method being defined in wrong class there was no issue when running the FabricExample (our local example app) using USE_FRAMEWORKS=dynamic.

The CI failure is not connected to this PR.

@kkafar kkafar merged commit abb1e36 into software-mansion:main Mar 12, 2025
4 of 5 checks passed
@kkafar
Copy link
Member

kkafar commented Mar 12, 2025

I'll release patch version in ~30 mins

kkafar pushed a commit that referenced this pull request Mar 12, 2025

Verified

This commit was signed with the committer’s verified signature.
kkafar Kacper Kafara
## Description

<!--
Description and motivation for this PR.

Include Fixes #<number> if this is fixing some issue.

-->

Fixes #2652

The `RNSFullWindowOverlay` component was not used with dynamic
frameworks, leading to the incorrect use of a placeholder component.

As highlighted in [this React Native
PR](facebook/react-native#37274), all Fabric
components must implement the `load` method to be correctly resolved.

Although `RNSFullWindowOverlay.mm` already included this method, it was
mistakenly placed in `RNSFullWindowOverlayContainer` instead of
`RNSFullWindowOverlay`, where it should have been implemented.

After correcting this placement, the reported issue is no longer
reproducible 🎉.

## Changes

<!--
Please describe things you've changed here, make a **high level**
overview, if change is simple you can omit this section.

For example:

-->

- moved `load` method from `RNSFullWindowOverlayContainer` to
`RNSFullWindowOverlay` class

## Screenshots / GIFs

### Before

![before](https://github.com/user-attachments/assets/62af4ba7-6d77-492c-a44d-444fa944b070)

### After

![after](https://github.com/user-attachments/assets/54272109-ea97-4363-a453-d945e5b1b39c)

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [x] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Updated documentation: <!-- For adding new props to native-stack
-->
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [ ]
https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [ ] Ensured that CI passes

Co-authored-by: war-in <war-in@users.noreply.github.com>
(cherry picked from commit abb1e36)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FullWindowOverlay not working when using use_frameworks!
3 participants