microsoft / react-native-macos

A framework for building native macOS apps with React.
https://microsoft.github.io/react-native-windows/
MIT License
3.37k stars 129 forks source link

Wrong image pixel density version on initial launch #2084

Open AdrianFahrbach opened 4 months ago

AdrianFahrbach commented 4 months ago

Environment

react-native -v: v0.72.10
npm ls react-native-macos: v0.72.18
node -v: v18.17.1
npm -v: v9.6.7
yarn --version: not in use
xcodebuild -version: Xcode 15.2 Build version 15C500b

Steps to reproduce the bug

It seems like my React Native app is using the wrong image on initial launch. It doesn't load the @2x version but instead shows the lower res image. I also had this issue during development, but thought it would fix itself in a production build. I'm not quite sure how (or even if) I can reproduce this during development, I definitely could reproduce it on my TestFlight build though.

  1. Publish your app through TestFlight (should have an image with 1x and 2x versions)
  2. Download and install the TestFlight app
  3. Check the image. It seems to be loading the lower resolution version
  4. Completely close/quite the app and restart it
  5. The image is now loaded correctly

Expected Behavior

It should be using the correct @2x image.

Actual Behavior

Take a close look at the icons, especially the calendar icon on the top right:

screenshot 2024-02-26 at 15 52 04@2x

Saadnajmi commented 4 months ago

Any idea if this repros in 0.73 as well?

AdrianFahrbach commented 4 months ago

Any idea if this repros in 0.73 as well?

I'm not quite sure, but it could very well be that this issue only occurred after downgrading to 0.72. I will check this in the following days and then post here again.

AdrianFahrbach commented 4 months ago

Any idea if this repros in 0.73 as well?

Yes, this happens on 0.73 as well. It also seems like the animations are not working.

Saadnajmi commented 3 months ago

Are your animations transform based? That should be fixed on 0.73 now. For the pixel density issue, I don't have an update yet unfortunately :/

AdrianFahrbach commented 3 months ago

Are your animations transform based? That should be fixed on 0.73 now. For the pixel density issue, I don't have an update yet unfortunately :/

I will probably give it a try next week and keep you updated here. Thanks you very very much for your work already though!

AdrianFahrbach commented 2 months ago

The transform fix didn't fix this issue. I also still didn't find a way to reliably reproduce this.