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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(module:avatar): text size calc regional independent #1352

Merged
merged 3 commits into from
Apr 15, 2021

Conversation

anddrzejb
Copy link
Member

馃 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

Fixes #1340

馃挕 Background and solution

When scale was applied to styles, it was not made regional settings resilient. So there would be a scenario when avatar style would get something like this scale(0,9340293843421312) (with comma instead of dot). So when js getDomInfo was reading this, it was getting a value that was much grater than Int32. When c# was trying to put that into Int32, it was failing, thus exception.

@TsakiDev, thank you for you invaluable help! I could not have discovered this without your help.

鈽戯笍 Self Check before Merge

鈿狅笍 Please check all items below before review. 鈿狅笍

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Apr 15, 2021

@anddrzejb
Copy link
Member Author

@ElderJames I think the same problem might have been in Overlay.razor.cs and that might have been the source for #639. Do you want me to add the fix for Overlay here as well?

@ElderJames
Copy link
Member

@anddrzejb Please fix the overlay at another PR, within the JS issue

@ElderJames ElderJames enabled auto-merge (squash) April 15, 2021 08:59
@ElderJames ElderJames merged commit 0585ee8 into ant-design-blazor:master Apr 15, 2021
@anddrzejb anddrzejb deleted the avatarTextSizeCalc branch May 5, 2021 19:21
ElderJames pushed a commit that referenced this pull request Apr 23, 2022
* fix(module:avatar): text size calc regional independent

* fix(module: avatar): removed limitation on number of decimal laces
ElderJames pushed a commit that referenced this pull request Apr 30, 2022
* fix(module:avatar): text size calc regional independent

* fix(module: avatar): removed limitation on number of decimal laces
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.

JS interop exception on Avatar content.
2 participants