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

[menu-bar] Patch react-native-svg to support macOS Sonoma #63

Merged
merged 1 commit into from Sep 18, 2023

Conversation

gabrieldonadel
Copy link
Member

@gabrieldonadel gabrieldonadel commented Sep 18, 2023

Why

macOS Sonoma will be officially released on September 26 and with it comes a breaking change to drawRect, you can no longer trust that the OS will provide you a dirtyRect that will be within the bounds of your view. Specifically (from the appkit release notes):

Filling the dirty rect of a view inside of -drawRect. A fairly common pattern is to simply rect fill the dirty rect passed into an override of NSView.draw(). The dirty rect can now extend outside of your view’s bounds. This pattern can be adjusted by filling the bounds instead of the dirty rect, or by setting clipsToBounds = true.

This causes libraries like react-native-svg that rely on drawRect to take up the full width/height of your window.

Closes ENG-10149
Closes #30

How

Patch react-native-svg RNSVGSvgView while software-mansion/react-native-svg#2136 is not merged

Test Plan

Run Orbit on macOS Ventura and Sonoma and ensure SVGs are being rendered properly

@linear
Copy link

linear bot commented Sep 18, 2023

@gabrieldonadel gabrieldonadel marked this pull request as ready for review September 18, 2023 17:11
@gabrieldonadel gabrieldonadel merged commit cf71974 into main Sep 18, 2023
@gabrieldonadel gabrieldonadel deleted the @gabrieldonadel/patch-react-native-svg branch September 18, 2023 17:17
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.

Very strange layout on macOS Sonoma
1 participant