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

Release 3.6.3 #5676

Closed
wants to merge 10 commits into from
Closed

Release 3.6.3 #5676

wants to merge 10 commits into from

Conversation

tjzel
Copy link
Contributor

@tjzel tjzel commented Feb 16, 2024

Summary

Including #5662.

kacperkapusciak and others added 10 commits November 30, 2023 17:50
This PR aims to cover the entirety of Reanimated public API with short,
descriptive TSDoc comments. This will allow developers to stay longer in
their editors and save some time searching and googling.

Under each function there's a link to the documentation.
## Summary
This PR uses string interpolation to construct keyframe keys in
`Keyframe.ts` as requested it [PR
comment](#5363 (comment)).
Additionally it extracts it to a helper function

---------

Co-authored-by: Tomek Zawadzki <tomekzawadzki98@gmail.com>
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary
Deprecate
`const Flatlist = Animated.createAnimatedComponent(FlatList)`

<!-- Explain the motivation for this PR. Include "Fixes #<number>" if
applicable. -->

## Test plan
I've tested that some calls are properly marked as deprecated:

![Screenshot 2023-11-30 at 11 15
44](https://github.com/software-mansion/react-native-reanimated/assets/56199675/c4a39ea9-125f-49b7-8fc2-1185de8809b6)

---------

Co-authored-by: Aleksandra Cynk <aleksandracynk@Aleksandras-MacBook-Pro-3.local>
Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

This PR fixes the type of argument of `_log` function.

## Test plan

```ts
_log(42);
```
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

This PR fixes the following error by adding a missing cast.


![](https://github.com/software-mansion/react-native-reanimated/assets/20516055/9251987e-ccad-4a5e-b91f-eb43be068d8d)

## Test plan

<!-- Provide a minimal but complete code snippet that can be used to
test out this change along with instructions how to run it and a
description of the expected behavior. -->
<!-- Thanks for submitting a pull request! We appreciate you spending
the time to work on these changes. Please follow the template so that
the reviewers can easily understand what the code changes affect. -->

## Summary

Fixes #5425. 

## Test plan

Added a new test suite.
As pointed in #5561, layout animations don't work with production
bundle. It is caused by fragile method of obtaining animation name, i.e.
using `config.name` if config is function. During bundling, name of this
function may change (in linked issue to `c`, in my case to `r`), so
instead of animation user will see warning that reanimated couldn't load
animation.

This PR adds static field `className` to animations builders in order to
provide access to animation name, even if config name gets changed
during bundling.

1.  Create new app (`npx create-expo-app`)
2. Install Reanimated from package (`npm pack` -> `yarn add
<path_to_package>`)
3. `npx expo export -p web`
4. `npx serve dist --single`

I used reanimated from local package to make sure that `expo export`
works correctly.

<details>
<summary> Tested on the following code </summary>

```jsx
import Animated, { FadeOut, FadeOutRight } from "react-native-reanimated";
import { View, Button } from "react-native";
import { useState } from "react";

export default function AnimatedStyleUpdateExample(props) {
  const [show, setShow] = useState(true);

  return (
    <View
      style={{
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        flexDirection: "column",
      }}
    >
      {show && (
        <Animated.View
          style={[{ width: 100, height: 80, backgroundColor: "black" }]}
          exiting={FadeOut}
        />
      )}

      <Button
        title="toggle"
        onPress={() => {
          setShow((prev) => !prev);
        }}
      />
    </View>
  );
}

```

</details>
@tjzel tjzel closed this Feb 16, 2024
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.

None yet

6 participants