Repository navigation
fix(rn-tester): show examples whose platform is an array - #3164
Open
Alicja Niewiadomska (alicenoknow) wants to merge 2 commits into
Open
Alicja Niewiadomska (alicenoknow) wants to merge 2 commits into
Alicja Niewiadomska (alicenoknow) wants to merge 2 commits into
Conversation
RNTesterModuleContainer hid an example when .
macOS examples use , and a string never
equals an array, so every multi-platform example (for example
Image > Animated GIF) was hidden on both iOS and macOS.
Alicja Niewiadomska (alicenoknow)
requested a review
from a team
as a code owner
November 5, 2026 12:48
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
This was referenced Nov 5, 2026
Author
|
@microsoft-github-policy-service agree |
Saad Najmi (Saadnajmi)
pushed a commit
that referenced
this pull request
Nov 17, 2026
### Summary: Fixes #3165. On macOS, animated GIFs in `<Image>` show only their first frame. `RCTUIImageViewAnimated` gets its display link from `+[RCTDisplayWeakRefreshable displayLinkWithWeakRefreshable:]`, which makes a weak proxy the link's target. On iOS that is needed because `CADisplayLink` retains its target. On macOS, `RCTPlatformDisplayLink` holds its target weakly, so nothing owns the proxy. It is freed as soon as the method returns, and the link's ticks go to `nil`. **Fix:** on macOS, make the view itself the link's target. The link already holds it weakly, so there is no retain cycle. iOS is unchanged. ### Testing: RNTester (macOS, Fabric) → Image → Animated GIF. On `main` that example is hidden by an RNTester bug that #3164 fixes. https://github.com/user-attachments/assets/4f4e561c-89f3-4082-ae1f-22136c16e6a8 - Before: the GIF stays on its first frame. After: it animates.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
RNTesterModuleContainerhides an example whenPlatform.OS !== platform. macOS examples useplatform: ['ios', 'macos'], and a string never equals an array, so every multi-platform example is hidden on iOS and macOS, for example Image → Animated GIF.Test Plan:
RNTester (macOS) → Image → type "gif" in the filter. Before: nothing is found. After: "Animated GIF (ios,macos only)" is shown.