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:avatar): avatar not re-scaling properly #8365

Conversation

ParsaArvanehPA
Copy link
Contributor

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 scaling of the avatar component was previously performed by a method named notifyCalc. This method used a setTimeout function to delay the scaling function for 4 milliseconds, ensuring that the avatar component was fully rendered and ready to be scaled.

However, this caused a problem when the avatar component was used within components that had opening animation effects, as the avatar component would have an incorrect width. The avatar component required more than 4 milliseconds in these cases to reach its sinalsize, and calling the scaling function, calcStringSize, too early would result in incorrect scale values for the avatar component.

Issue Number: #8363

What is the new behavior?

Calling calcStringSize after avatar component is fully rendered.

Does this PR introduce a breaking change?

[ ] Yes
[✔] No

Other information

Copy link

zorro-bot bot commented Jan 19, 2024

This preview will be available after the AzureCI is passed.

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6024bcc) 91.74% compared to head (a814b9b) 91.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8365   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files         520      520           
  Lines       18019    18014    -5     
  Branches     2838     2837    -1     
=======================================
- Hits        16531    16527    -4     
+ Misses       1185     1184    -1     
  Partials      303      303           

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

@Nicoss54 Nicoss54 self-requested a review January 22, 2024 22:19
Copy link
Collaborator

@Nicoss54 Nicoss54 left a comment

Choose a reason for hiding this comment

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

@OriginRing build and test schematics job failed sinced the last merged.

This PR fixed the issue: #8367

@ParsaArvanehPA when #8367 will be merged, please rebase to make the build and test schematics pass, then LGTM

@Nicoss54
Copy link
Collaborator

@ParsaArvanehPA could you please rebase the branch, to have the fix for the pipeline and then see if all the job passed

@ParsaArvanehPA
Copy link
Contributor Author

@ParsaArvanehPA could you please rebase the branch, to have the fix for the pipeline and then see if all the job passed

@Nicoss54 Yeah sure

@ParsaArvanehPA ParsaArvanehPA force-pushed the feature/avatart-having-negetive-scale-value branch from b8fa0d4 to a814b9b Compare January 23, 2024 10:31
@Nicoss54 Nicoss54 self-requested a review January 23, 2024 11:12
Copy link
Collaborator

@Nicoss54 Nicoss54 left a comment

Choose a reason for hiding this comment

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

LGTM

@Nicoss54 Nicoss54 self-requested a review January 23, 2024 11:12
@simplejason simplejason merged commit e7b1fa0 into NG-ZORRO:master Mar 11, 2024
9 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.

3 participants