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

BackgroundColor animates for no reason #47011

Open
bartlomiejbloniarz opened this issue Oct 14, 2024 · 7 comments · May be fixed by #47064
Open

BackgroundColor animates for no reason #47011

bartlomiejbloniarz opened this issue Oct 14, 2024 · 7 comments · May be fixed by #47064
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. p: Software Mansion Partner: Software Mansion Partner

Comments

@bartlomiejbloniarz
Copy link
Contributor

Description

When changing the backgroundColor of a FlatList item, there is an animation between these colors. The bug is reproducible both on the 0.76 RCs and main.

Steps to reproduce

  1. paste the snack App.js code to RNTester
  2. click toggle theme

React Native Version

0.76.0-rc.4, main

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.6.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 97.02 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.9.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.3
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.10.07.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/bartlomiejbloniarz/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.21829.142.2421.12409432
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/bartlomiejbloniarz/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

-

Reproducer

https://snack.expo.dev/Tg8ResSSqSuiNHOg3iCq5

Screenshots and Videos

Screen.Recording.2024-10-14.at.13.11.00.mov
@shubhamguptadream11
Copy link
Collaborator

@bartlomiejbloniarz What according to you should be an expected behaviour? It changes colour smoothly.

@shubhamguptadream11 shubhamguptadream11 added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed Needs: Triage 🔍 labels Oct 14, 2024
@bartlomiejbloniarz
Copy link
Contributor Author

@shubhamguptadream11 It should change instantaneously, as there is no animation being used.

@cortinico
Copy link
Contributor

The bug is reproducible both on the 0.76 RCs and main.

Has this regressed since 0.75? Asking as there has been ongoing work on Backgrounds recently (cc @NickGerleman )

Also does this reproduces on both Android & iOS?

@bartlomiejbloniarz
Copy link
Contributor Author

bartlomiejbloniarz commented Oct 15, 2024

Yes, it worked fine on the previous version (I think this bug was also present in some older version, but was quickly fixed).

It only reproduces on iOS in both debug and production builds on the New Architecture.

@cortinico
Copy link
Contributor

It only reproduces on iOS in both debug and production builds on the New Architecture.

So is this New Architecture only?

Yes, it worked fine on the previous version

Do you confirm that this regresses in 0.76 so that it was working in 0.75 iOS NewArch?

@bartlomiejbloniarz
Copy link
Contributor Author

So is this New Architecture only?

yes

Do you confirm that this regresses in 0.76 so that it was working in 0.75 iOS NewArch?

yes

@zhongwuzw
Copy link
Contributor

@bartlomiejbloniarz @cortinico Hi, I made a PR #47064 to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. p: Software Mansion Partner: Software Mansion Partner
Projects
None yet
4 participants