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(iOS): Change retrieving window in FullWindowOverlay #2031

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

tboba
Copy link
Member

@tboba tboba commented Feb 14, 2024

Description

This PR is a follow up for the PR #1526.

Currently, in React Native there's RCTKeyWindow() method which goes through each window of RCTSharedApplication() and selects the window that is a key window of a given window. This is a better solution, since we don't rely on a single keyWindow from RCTSharedApplication.
I've also added a support for Fabric.

I've checked how does FullWindowOverlay work with the change and it works as usual.
Closes #1526.

Changes

  • Changed the method of retrieving window from delegate.window to RCTKeyWindow()

Test code and steps to reproduce

You can run Test1844 and check if FullWindowOverlay works correctly.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

Co-authored-by: alexbumbu <alex.bumbu@gmail.com>
@tboba tboba self-assigned this Feb 14, 2024
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!

@tboba tboba merged commit 03dad84 into main Apr 11, 2024
5 checks passed
@tboba tboba deleted the @tboba/fullwindowoverlay-rctkeywindow branch April 11, 2024 07:55
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 24, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-screens](https://togithub.com/software-mansion/react-native-screens)
| [`^3.30.1` ->
`^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-screens
(react-native-screens)</summary>

###
[`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1)

###
[`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0)

Minor release including adding support for React Native 0.74 and fixing
targets of the touchables on the JS Stack.
Thanks for following along! 💙

#### What's Changed

#### 🐛 Bug fixes

- Don't use AnimatedNativeScreen when stackPresentation prop is not set
by [@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107)
- Change retrieving window in FullWindowOverlay by
[@&#8203;tboba](https://togithub.com/tboba) in
[https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031)

#### 🔢 Miscellaneous

- Bump yarn to latest stable (4.1.1) by
[@&#8203;maciekstosio](https://togithub.com/maciekstosio) in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)
- Add RCT-Image to RNScreens.podspec by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089)
- Fix emit type parameters by
[@&#8203;mym0404](https://togithub.com/mym0404) in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)

#### New Contributors

- [@&#8203;mym0404](https://togithub.com/mym0404) made their first
contribution in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)
- [@&#8203;maciekstosio](https://togithub.com/maciekstosio) made their
first contribution in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)

#### 🙌 Thank you for your contributions!

**Full Changelog**:
software-mansion/react-native-screens@3.31.0-rc.1...3.31.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 24, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-screens](https://togithub.com/software-mansion/react-native-screens)
| [`^3.30.1` ->
`^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-screens
(react-native-screens)</summary>

###
[`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1)

###
[`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0)

Minor release including adding support for React Native 0.74 and fixing
targets of the touchables on the JS Stack.
Thanks for following along! 💙

#### What's Changed

#### 🐛 Bug fixes

- Don't use AnimatedNativeScreen when stackPresentation prop is not set
by [@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107)
- Change retrieving window in FullWindowOverlay by
[@&#8203;tboba](https://togithub.com/tboba) in
[https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031)

#### 🔢 Miscellaneous

- Bump yarn to latest stable (4.1.1) by
[@&#8203;maciekstosio](https://togithub.com/maciekstosio) in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)
- Add RCT-Image to RNScreens.podspec by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089)
- Fix emit type parameters by
[@&#8203;mym0404](https://togithub.com/mym0404) in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)

#### New Contributors

- [@&#8203;mym0404](https://togithub.com/mym0404) made their first
contribution in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)
- [@&#8203;maciekstosio](https://togithub.com/maciekstosio) made their
first contribution in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)

#### 🙌 Thank you for your contributions!

**Full Changelog**:
software-mansion/react-native-screens@3.31.0-rc.1...3.31.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
shottah referenced this pull request in zed-io/kolektivo May 15, 2024
…inc#5309)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-screens](https://togithub.com/software-mansion/react-native-screens)
| [`^3.30.1` ->
`^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-screens
(react-native-screens)</summary>

###
[`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1)

###
[`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0)

Minor release including adding support for React Native 0.74 and fixing
targets of the touchables on the JS Stack.
Thanks for following along! 💙

#### What's Changed

#### 🐛 Bug fixes

- Don't use AnimatedNativeScreen when stackPresentation prop is not set
by [@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107)
- Change retrieving window in FullWindowOverlay by
[@&#8203;tboba](https://togithub.com/tboba) in
[https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031)

#### 🔢 Miscellaneous

- Bump yarn to latest stable (4.1.1) by
[@&#8203;maciekstosio](https://togithub.com/maciekstosio) in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)
- Add RCT-Image to RNScreens.podspec by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089)
- Fix emit type parameters by
[@&#8203;mym0404](https://togithub.com/mym0404) in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)

#### New Contributors

- [@&#8203;mym0404](https://togithub.com/mym0404) made their first
contribution in
[https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087)
- [@&#8203;maciekstosio](https://togithub.com/maciekstosio) made their
first contribution in
[https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097)

#### 🙌 Thank you for your contributions!

**Full Changelog**:
software-mansion/react-native-screens@3.31.0-rc.1...3.31.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this pull request Oct 9, 2024
…sion#2031)

## Description

This PR is a follow up for the PR software-mansion#1526.

Currently, in React Native there's `RCTKeyWindow()` method which goes
through each window of `RCTSharedApplication()` and selects the window
that is a key window of a given window. This is a better solution, since
we don't rely on a single `keyWindow` from RCTSharedApplication.
I've also added a support for Fabric.

I've checked how does FullWindowOverlay work with the change and it
works as usual.
Closes software-mansion#1526.

## Changes

- Changed the method of retrieving window from `delegate.window` to
`RCTKeyWindow()`

## Test code and steps to reproduce

You can run `Test1844` and check if FullWindowOverlay works correctly.

## Checklist

- [X] Included code example that can be used to test this change
- [X] Ensured that CI passes

Co-authored-by: alexbumbu <alex.bumbu@gmail.com>
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.

2 participants