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

Update safe area frame when keyboard shows/hides #407

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

jacobp100
Copy link
Collaborator

When the keyboard shows/hides in pageSheet/formSheet presentation styles, the modal is pushed partially up, so the y position changes

@janicduplessis
Copy link
Member

Do we need to cleanup the observer when the view is removed?

@jacobp100
Copy link
Collaborator Author

Technically no - but I can add it if you’d feel more comfortable

https://developer.apple.com/documentation/foundation/notificationcenter/1413994-removeobserver

If your app targets iOS 9.0 and later or macOS 10.11 and later, and you used addObserver(_:selector:name:object:), you do not need to unregister the observer. If you forget or are unable to remove the observer, the system cleans up the next time it would have posted to it.

@jacobp100
Copy link
Collaborator Author

That said - it might be necessary to do more granular for fabric, which recycles components. Do you know where that logic is meant to go? Maybe in didMoveToWindow, and either subscribe when the window is non-nil, then unsubscribe when the window is nil?

@janicduplessis
Copy link
Member

I think this is fine

@janicduplessis janicduplessis merged commit fd2b02f into main Jul 4, 2023
0 of 2 checks passed
@janicduplessis janicduplessis deleted the jacobp100-patch-1 branch July 4, 2023 15:16
renovate bot added a commit to valora-inc/wallet that referenced this pull request Oct 15, 2023
…#4314)

[![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-safe-area-context](https://togithub.com/th3rdwave/react-native-safe-area-context)
| [`^4.5.3` ->
`^4.7.2`](https://renovatebot.com/diffs/npm/react-native-safe-area-context/4.5.3/4.7.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-safe-area-context/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-safe-area-context/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-safe-area-context/4.5.3/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-safe-area-context/4.5.3/4.7.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>th3rdwave/react-native-safe-area-context
(react-native-safe-area-context)</summary>

###
[`v4.7.2`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.2):
Release 4.7.2

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.7.1...v4.7.2)

- Complete the partial memoization of provider
([th3rdwave/react-native-safe-area-context#427)

###
[`v4.7.1`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.1):
Release 4.7.1

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.7.0...v4.7.1)

- Update podspec to tvOS 12.4
([#&#8203;415](https://togithub.com/th3rdwave/react-native-safe-area-context/issues/415))

###
[`v4.7.0`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.7.0):
Release 4.7.0

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.4...v4.7.0)

##### Bug Fixes

- use install_modules_dependencies to make fabric build more reliable
([664c518](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/664c518e0cdbbeb7432d71787edc19ae6841538e))
- use RCT_NEW_ARCH_ENABLED in RNCSafeAreaContext module
([720cbc9](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/720cbc94b2668ad96e3b877a25dea654c4aef3b5))
- Fixes for tvOS
([th3rdwave/react-native-safe-area-context#412)

###
[`v4.6.4`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.4):
Release 4.6.4

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.3...v4.6.4)

- Update safe area frame when keyboard shows/hides
([th3rdwave/react-native-safe-area-context#407)

###
[`v4.6.3`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.3):
Release 4.6.3

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.2...v4.6.3)

##### Bug Fixes

- make edge types readonly
([def6c1f](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/def6c1fbbce41f791c39617cc13b7eac66ddedde))

###
[`v4.6.2`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.2):
Release 4.6.2

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.1...v4.6.2)

- Cast View to the NativeSafeAreaViewInstance for .macos and .windows to
get the correct type definitions
([th3rdwave/react-native-safe-area-context#404)

###
[`v4.6.1`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.1):
Release 4.6.1

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.6.0...v4.6.1)

##### Bug Fixes

- Fix type declaration path in package.json
([#&#8203;400](https://togithub.com/th3rdwave/react-native-safe-area-context/issues/400))
([ce5e856](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/ce5e856999f7100c031b6d76727275c6919de412))

###
[`v4.6.0`](https://togithub.com/th3rdwave/react-native-safe-area-context/releases/tag/v4.6.0):
Release 4.6.0

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/7b2718703a96b5b140be944ae96e53a562533b37...v4.6.0)

##### Features

- maximum padding
([#&#8203;394](https://togithub.com/th3rdwave/react-native-safe-area-context/pull/394))
- set namespace in build.gradle
([#&#8203;399](https://togithub.com/th3rdwave/react-native-safe-area-context/pull/399))

##### Bug Fixes

- allow providing insets in hook mocks
([f1d9e52](https://togithub.com/th3rdwave/react-native-safe-area-context/commit/f1d9e523dc0b0d6a205db5df65ca5b1c20893038))

###
[`v4.5.5`](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/219e700c93bff720f9ea64bdeff2bc5c32a4aaee...7b2718703a96b5b140be944ae96e53a562533b37)

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/219e700c93bff720f9ea64bdeff2bc5c32a4aaee...7b2718703a96b5b140be944ae96e53a562533b37)

###
[`v4.5.4`](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.5.3...219e700c93bff720f9ea64bdeff2bc5c32a4aaee)

[Compare
Source](https://togithub.com/th3rdwave/react-native-safe-area-context/compare/v4.5.3...219e700c93bff720f9ea64bdeff2bc5c32a4aaee)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
Co-authored-by: Satish Ravi <satish.ravi@valoraapp.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.

None yet

2 participants