Skip to content

fix(rn-tester): show examples whose platform is an array - #3164

Open
Alicja Niewiadomska (alicenoknow) wants to merge 2 commits into
microsoft:mainfrom
alicenoknow:repro/rntester-animated-gif-example
Open

Alicja Niewiadomska (alicenoknow) wants to merge 2 commits into
microsoft:mainfrom
alicenoknow:repro/rntester-animated-gif-example

Conversation

@alicenoknow

Copy link
Copy Markdown

Summary:

RNTesterModuleContainer hides an example when Platform.OS !== platform. macOS examples use platform: ['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.

    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.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@alicenoknow

Copy link
Copy Markdown
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

No deployments
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.

1 participant