fix(components/layout)!: replace @angular/animations in text expand component with CSS transitions#4308
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR migrates the text-expand component from Angular animations to CSS transitions with new utilities for detecting disabled motion, adds a new playground feature demonstrating text-expand functionality, and updates test infrastructure from NoopAnimationsModule to provideNoopSkyAnimations across multiple test files. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
|
View your CI Pipeline Execution ↗ for commit 45c9943
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
Migrates the SkyTextExpandComponent expansion/collapse behavior from Angular animation triggers to CSS max-height transitions using SKY UX’s transition-end handler, and updates associated tests/examples to use SKY UX’s noop animation provider.
Changes:
- Replace Angular animation trigger usage with CSS
max-heighttransitions +skyTransitionEndHandlerto drive cleanup. - Update unit tests and harness/code-example specs to use
provideNoopSkyAnimations()instead ofNoopAnimationsModule. - Add a playground route and example page for the Text Expand component.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/components/layout/src/lib/modules/text-expand/text-expand.component.ts | Reworks expand/collapse logic to set max-height for CSS transitions and cleans up on transition end. |
| libs/components/layout/src/lib/modules/text-expand/text-expand.component.html | Switches from Angular animation bindings to skyTransitionEndHandler directive bindings. |
| libs/components/layout/src/lib/modules/text-expand/text-expand.component.scss | Adds CSS transition rules for max-height on the container. |
| libs/components/layout/src/lib/modules/text-expand/text-expand-adapter.service.ts | Adds an adapter method to set max-height via the renderer. |
| libs/components/layout/src/lib/modules/text-expand/text-expand.module.ts | Updates module metadata to import the component (standalone-style). |
| libs/components/layout/src/lib/modules/text-expand/text-expand.component.spec.ts | Uses provideNoopSkyAnimations() and adds coverage for transitionend cleanup. |
| libs/components/layout/testing/src/modules/text-expand/text-expand-harness.spec.ts | Updates harness tests to use provideNoopSkyAnimations(). |
| libs/components/layout/src/lib/modules/text-expand/fixtures/text-expand.module.fixture.ts | Removes NoopAnimationsModule from fixture module imports. |
| libs/components/layout/src/lib/modules/text-expand/fixtures/text-expand.component.fixture.html | Removes the Angular animation-disabled wrapper that’s no longer relevant. |
| libs/components/code-examples/src/lib/modules/layout/text-expand/modal/example.component.spec.ts | Updates example spec to use provideNoopSkyAnimations(). |
| libs/components/code-examples/src/lib/modules/layout/text-expand/inline/example.component.spec.ts | Updates example spec to use provideNoopSkyAnimations(). |
| apps/playground/src/app/components/layout/layout.module.ts | Adds a new lazy route entry for text-expand. |
| apps/playground/src/app/components/layout/text-expand/text-expand.module.ts | Adds a playground feature module for the new Text Expand route. |
| apps/playground/src/app/components/layout/text-expand/text-expand-routing.module.ts | Adds routing that lazy-loads the Text Expand playground component. |
| apps/playground/src/app/components/layout/text-expand/text-expand.component.ts | Adds a playground component demonstrating multiple Text Expand scenarios. |
| apps/playground/src/app/components/layout/text-expand/text-expand.component.html | Adds the playground template showcasing inline/modal/newlines configurations. |
libs/components/layout/src/lib/modules/text-expand/text-expand.component.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/components/core/src/lib/modules/animations/shared/utils.ts (1)
9-21: Consider exporting the interface for external consumers.The
EmitWhenMotionDisabledArgsinterface is currently not exported. If external code needs to call these utility functions directly (outside of the animation/transition handlers), they would benefit from access to this type for proper typing.However, given these utilities appear to be internal (
@internaldirective usage), keeping it unexported is likely intentional.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/components/core/src/lib/modules/animations/shared/utils.ts` around lines 9 - 21, The interface EmitWhenMotionDisabledArgs is currently unexported; decide whether it should be part of the public API: if external consumers must use it, export the interface (add "export interface EmitWhenMotionDisabledArgs") so callers get proper typing; if it is intentionally internal, add an explicit `@internal` JSDoc comment above EmitWhenMotionDisabledArgs to make the intent clear to readers and tooling. Ensure references in this file to EmitWhenMotionDisabledArgs remain unchanged after the export/annotation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@libs/components/core/src/lib/modules/animations/shared/utils.ts`:
- Around line 9-21: The interface EmitWhenMotionDisabledArgs is currently
unexported; decide whether it should be part of the public API: if external
consumers must use it, export the interface (add "export interface
EmitWhenMotionDisabledArgs") so callers get proper typing; if it is
intentionally internal, add an explicit `@internal` JSDoc comment above
EmitWhenMotionDisabledArgs to make the intent clear to readers and tooling.
Ensure references in this file to EmitWhenMotionDisabledArgs remain unchanged
after the export/annotation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2b235ceb-abd4-43b0-83fd-bd45382de5ba
📒 Files selected for processing (7)
apps/playground/src/app/components/layout/text-expand/text-expand.component.tslibs/components/core/src/lib/modules/animations/shared/animation-handler.spec.tslibs/components/core/src/lib/modules/animations/shared/animation-handler.tslibs/components/core/src/lib/modules/animations/shared/mimic-css-motion-event.tslibs/components/core/src/lib/modules/animations/shared/transition-handler.spec.tslibs/components/core/src/lib/modules/animations/shared/transition-handler.tslibs/components/core/src/lib/modules/animations/shared/utils.ts
💤 Files with no reviewable changes (1)
- libs/components/core/src/lib/modules/animations/shared/mimic-css-motion-event.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/playground/src/app/components/layout/text-expand/text-expand.component.ts
## [14.0.0-alpha.10](14.0.0-alpha.9...14.0.0-alpha.10) (2026-03-18) ### ⚠ BREAKING CHANGES * **components/layout:** replace `@angular/animations` in text expand repeater component with CSS transitions (#4317) * **components/layout:** replace `@angular/animations` in text expand component with CSS transitions (#4308) * **components/inline-form:** replace `@angular/animations` with CSS transitions (#4315) * **components/popovers:** replace `@angular/animations` with CSS transitions (#4313) ### Features * **components/modals:** modal header close button is shown in modern theme ([#4265](#4265)) ([db2a615](db2a615)) ### Bug Fixes * **components/core:** animationend and transitionend handlers detect suppressed animations via `getComputedStyle` ([#4310](#4310)) ([88d7b0f](88d7b0f)) * **components/inline-form:** replace `@angular/animations` with CSS transitions ([#4315](#4315)) ([5254dbb](5254dbb)) * **components/layout:** replace `@angular/animations` in text expand component with CSS transitions ([#4308](#4308)) ([bbde359](bbde359)) * **components/layout:** replace `@angular/animations` in text expand repeater component with CSS transitions ([#4317](#4317)) ([bb4a3c7](bb4a3c7)) * **components/popovers:** replace `@angular/animations` with CSS transitions ([#4313](#4313)) ([28088aa](28088aa)) * **sdk/skyux-eslint:** remove `no-barrel-exports` rule ([#4320](#4320)) ([73dafd6](73dafd6)), closes [AB#3614172](https://dev.azure.com/blackbaud/Products/_workitems/edit/3614172) [#4268](#4268) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Animation behavior updated across multiple components * **New Features** * Added close button to modal headers in the modern theme * **Bug Fixes** * Resolved animation handling issues affecting multiple components * Fixed related stability issues across components <!-- end of auto-generated comment: release notes by coderabbit.ai -->
BREAKING CHANGE
SkyTextExpandComponenthas replaced@angular/animationswith CSS transitions. Tests that interact with text expand may need to addprovideNoopSkyAnimations()from@skyux/coreto theirTestBedproviders to disable SKY UX CSS transitions during tests.AB#3913628
Summary by CodeRabbit
Release Notes
New Features
Refactor