Skip to content

feat(module:float-button): add pop animation to float button menu - #9413

Merged
Laffery merged 1 commit into
NG-ZORRO:masterfrom
WwwHhhYran:feat/animation_for_float_button_pop
Nov 14, 2025
Merged

Laffery merged 1 commit into
NG-ZORRO:masterfrom
WwwHhhYran:feat/animation_for_float_button_pop

Conversation

@WwwHhhYran

Copy link
Copy Markdown
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The float button menu has no popup animation.
https://ng.ant.design/components/float-button/zh#components-float-button-demo-group-placement

What is the new behavior?

set popup animation for nzPlacement, if nzPlacement is 'top', the float button menu will popup from bottom to top

Does this PR introduce a breaking change?

  • Yes
  • No

@WwwHhhYran
WwwHhhYran requested review from HyperLife1119, Nicoss54 and OriginRing and removed request for OriginRing September 15, 2025 13:17
@codecov

codecov Bot commented Sep 15, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.39%. Comparing base (74c2173) to head (5763335).
⚠️ Report is 67 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9413      +/-   ##
==========================================
- Coverage   92.13%   91.39%   -0.75%     
==========================================
  Files         561      561              
  Lines       19758    19736      -22     
  Branches     3033     3031       -2     
==========================================
- Hits        18204    18037     -167     
- Misses       1223     1371     +148     
+ Partials      331      328       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WwwHhhYran
WwwHhhYran force-pushed the feat/animation_for_float_button_pop branch from 695c0a8 to 5763335 Compare September 16, 2025 15:06
@WwwHhhYran

Copy link
Copy Markdown
Member Author

@Laffery I have refactored the code I submitted last time by the new animation APIs of Angular.

Could you please review it again? :)

@Nicoss54 Nicoss54 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Basically LGTM

@Laffery Laffery left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Basically LGTM

@Nicoss54 @HyperLife1119 I am not expert in angular's animation, I have two questions:

  1. Does provideNoopAnimations work for native animation APIs?
  2. The native animation APIs were supported in v20.2, does this mean we should update ng-zorro-antd's peerDependencies to ^20.2? Or should we put it on hold until the next major release?

@HyperLife1119

Copy link
Copy Markdown
Collaborator

As far as I know, provideNoopAnimations no longer works with ng-native animations.

A brief investigation of @angular/material revealed that they provide a MATERIAL_ANIMATIONS DI token to disable animations. This is done by applying the _mat-animation-noopable CSS class and setting transition or animation to none in each component that requires animations.

https://github.com/angular/components/blob/f0047282a10551bb9044c74e4b441e795bec1de9/src/material/core/animation/animation.ts#L50-L60

https://github.com/angular/components/blob/f0047282a10551bb9044c74e4b441e795bec1de9/src/material/badge/badge.scss#L112-L115

To move away from @angular/animations, I think we need to do the same, and I think this would be a good place to do it in v21.

@Laffery

Laffery commented Sep 19, 2025

Copy link
Copy Markdown
Collaborator

To move away from @angular/animations, I think we need to do the same, and I think this would be a good place to do it in v21.

agree with you

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Laffery
Laffery merged commit b40ad91 into NG-ZORRO:master Nov 14, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants