From 44c8fee4e8f127ddea128a6d73787dea71e6ebe1 Mon Sep 17 00:00:00 2001 From: gitdallas <5322142+gitdallas@users.noreply.github.com> Date: Wed, 24 Sep 2025 10:40:47 -0500 Subject: [PATCH] 856: add note for AnimationsProvider in enable-animations docs --- .../src/rules/v6/enableAnimations/enable-animations.md | 2 ++ packages/pf-codemods/README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations/enable-animations.md b/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations/enable-animations.md index dc2f6bb7..9dda2689 100644 --- a/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations/enable-animations.md +++ b/packages/eslint-plugin-pf-codemods/src/rules/v6/enableAnimations/enable-animations.md @@ -2,6 +2,8 @@ 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. +**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. + **⚠️ 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. The following components will have `hasAnimations` added: diff --git a/packages/pf-codemods/README.md b/packages/pf-codemods/README.md index a321b294..778f41c7 100644 --- a/packages/pf-codemods/README.md +++ b/packages/pf-codemods/README.md @@ -1219,6 +1219,8 @@ import { EmptyStateHeader, EmptyStateIcon } from "@patternfly/react-core"; 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. +**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. + **⚠️ 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. The following components will have `hasAnimations` added: