Skip to content

Commit d0f6cb0

Browse files
authored
856: add note for AnimationsProvider in enable-animations docs (#857)
1 parent 4519b80 commit d0f6cb0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations/enable-animations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This rule adds the `hasAnimations` prop to PatternFly components that support animations. This is an optional enhancement that enables smoother transitions and animations in your UI components.
44

5+
**Noteworthy Alternative:** PatternFly now provides an `AnimationsProvider` context provider that can be used to enable animations globally across your application. The `hasAnimations` prop is still preferred for developers who want to enable animations manually on specific components without using the context provider.
6+
57
**⚠️ Important:** Enabling animations may change the DOM structure of some components. This could affect CSS selectors, testing queries, or other code that relies on the specific DOM structure. Review your code after enabling animations to ensure compatibility.
68

79
The following components will have `hasAnimations` added:

packages/pf-codemods/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,8 @@ import { EmptyStateHeader, EmptyStateIcon } from "@patternfly/react-core";
12191219

12201220
This rule adds the `hasAnimations` prop to PatternFly components that support animations. This is an optional enhancement that enables smoother transitions and animations in your UI components.
12211221

1222+
**Noteworthy Alternative:** PatternFly now provides an `AnimationsProvider` context provider that can be used to enable animations globally across your application. The `hasAnimations` prop is still preferred for developers who want to enable animations manually on specific components without using the context provider.
1223+
12221224
**⚠️ Important:** Enabling animations may change the DOM structure of some components. This could affect CSS selectors, testing queries, or other code that relies on the specific DOM structure. Review your code after enabling animations to ensure compatibility.
12231225

12241226
The following components will have `hasAnimations` added:

0 commit comments

Comments
 (0)