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

fix(module:spin): make delay behave more accurately #5930

Merged
merged 3 commits into from Oct 16, 2020

Conversation

Airblader
Copy link
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[X] 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 new behavior?

  • delay is now also respected when the component is initialized
  • delay is only considered when nzSpinning turns from false to true, but not vice versa

If you don't agree with either change let me know and I can update the PR.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

fixes #5926
fixes #5928

@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #5930 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5930      +/-   ##
==========================================
- Coverage   90.02%   90.00%   -0.03%     
==========================================
  Files         463      463              
  Lines       13948    13947       -1     
  Branches     2202     2202              
==========================================
- Hits        12557    12553       -4     
- Misses        856      857       +1     
- Partials      535      537       +2     
Impacted Files Coverage Δ
components/spin/spin.component.ts 100.00% <ø> (ø)
components/core/util/text-measure.ts 89.56% <0.00%> (-1.74%) ⬇️
components/time-picker/time-holder.ts 94.73% <0.00%> (-1.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fbeaf7...183dab1. Read the comment docs.

@Airblader
Copy link
Collaborator Author

Airblader commented Oct 15, 2020

Accidentally disabled most tests, will fix this in a bit.
Edit: Done.

This also cleans up the rxjs in this component which would actually create
a memory leak over time if the delay input changes a lot (which is very
hypothetical).

fixes NG-ZORRO#5926
@Airblader Airblader changed the title [5926][5928] nz-spin fixes fix(module:spin): make delay behave more accurately Oct 15, 2020
Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

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

LGTM, good work @Airblader

@vthinkxie vthinkxie merged commit 5c901a0 into NG-ZORRO:master Oct 16, 2020
@github-actions
Copy link

github-actions bot commented Oct 16, 2020

😭 Deploy PR Preview 5c901a0 failed. Build logs

🤖 By surge-preview

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.

nz-spin does not respect delay on start nz-spin delay should only work in one direction
2 participants