Skip to content

Conversation

lukewalczak
Copy link
Member

Motivation

This PR fixes an error that occurs when trying to animate elevation on a Card component in "contained" mode when pressing Card in contained mode, by preventing elevation animation, in contained mode, where elevation is always 0.

Related issue

Fixes: #4673
Fixes: #4617

Test plan

Tested in the rn template app, on the latest rn:

card

Copy link

The mobile version of example app from this branch is ready! You can see it here.

@lukewalczak lukewalczak requested a review from Copilot April 17, 2025 13:52
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the elevation animation issue for contained Card mode by preventing any elevation animation when the Card is in contained mode.

  • Early exit added in the elevation animation function for contained mode
  • Prevents unintended elevation animation when elevated value should be 0

@lukewalczak lukewalczak merged commit 25fed4c into main Apr 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot add new property '_tracking' Card OnPress throws TypeError: Cannot add new property '_tracking' after RN 0.77.0 upgrade

1 participant