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

refactor: deprecated InputBoolean, InputNumber and InputCssPixel #8487

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HyperLife1119
Copy link
Collaborator

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)
[x] 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?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Copy link

zorro-bot bot commented Apr 8, 2024

This preview will be available after the AzureCI is passed.

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 96.75676% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 91.51%. Comparing base (710e20e) to head (9b41fc2).
Report is 4 commits behind head on master.

Files Patch % Lines
...omponents/table/src/cell/th-selection.component.ts 0.00% 4 Missing ⚠️
components/code-editor/code-editor.component.ts 0.00% 2 Missing ⚠️
components/core/util/convert.ts 66.66% 2 Missing ⚠️
...s/cdk/resize-observer/resize-observer.directive.ts 0.00% 1 Missing ⚠️
components/table/src/styled/ellipsis.directive.ts 0.00% 1 Missing ⚠️
...omponents/table/src/styled/word-break.directive.ts 0.00% 1 Missing ⚠️
components/tree/tree-drop-indicator.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8487      +/-   ##
==========================================
- Coverage   91.56%   91.51%   -0.06%     
==========================================
  Files         532      535       +3     
  Lines       18337    18424      +87     
  Branches     2803     2814      +11     
==========================================
+ Hits        16790    16860      +70     
- Misses       1229     1245      +16     
- Partials      318      319       +1     

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

Copy link
Collaborator

@Laffery Laffery left a comment

Choose a reason for hiding this comment

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

LGTM:)

@HyperLife1119
Copy link
Collaborator Author

WIP

@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch from f1088a4 to f4df9ce Compare April 18, 2024 08:06
@Laffery Laffery added this to the v18 Support milestone May 24, 2024
@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch 2 times, most recently from 1f07e94 to 19869a3 Compare May 31, 2024 04:21
@Laffery
Copy link
Collaborator

Laffery commented May 31, 2024

围观 ing 🍉

@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch 2 times, most recently from a8dce6b to 4a9d345 Compare May 31, 2024 07:34
@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch from 4a9d345 to 286051d Compare May 31, 2024 07:44
@HyperLife1119 HyperLife1119 marked this pull request as ready for review May 31, 2024 07:49
@HyperLife1119
Copy link
Collaborator Author

HyperLife1119 commented May 31, 2024

围观 ing 🍉

I did it 🥹

@Input() @InputNumber() nzStep = 1;
@Input({ transform: numberAttribute }) nzMax = 100;
@Input({ transform: numberAttribute }) nzMin = 0;
@Input({ transform: numberAttributeWithZeroFallback }) nzStep = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nzStep's fallback value should be 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As far as I can see, the old @InputNumber decorator has a fallbackValue of 0. Changing the fallbackValue to 1 breaks the should stop at new steps when step=null or dots=true test case, because nzStep also supports passing in null

Copy link
Collaborator

@Laffery Laffery left a comment

Choose a reason for hiding this comment

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

fancy work but partially approved, we should be careful to use numberAttributeZeroFallback

@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch 3 times, most recently from 87df1bb to 1369b5e Compare June 3, 2024 07:18
@HyperLife1119 HyperLife1119 force-pushed the refactor/deprecated-custom-input-decorators branch from 1369b5e to 9b41fc2 Compare June 3, 2024 07:20
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.

None yet

2 participants