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:overlay): format number InvariantCulture #1956

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

bezysoftware
Copy link
Contributor

In cultures where decimal separator is ',' overlay would be ill-positioned

🤔 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?)

🔗 #1955

💡 Background and solution

If user has locale with ',' as decimal separator and the calculated left / top values have a decimal part the resulting formatted value will be not be parsable by browser:
image

📝 Changelog

Language Changelog
🇺🇸 English Fix positioning overlay items when locale has ',' as decimal separator
🇨🇳 Chinese

☑️ 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

In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves ant-design-blazor#1955
@dnfadmin
Copy link

dnfadmin commented Sep 17, 2021

CLA assistant check
All CLA requirements met.

@github-actions
Copy link

github-actions bot commented Sep 17, 2021

@ElderJames
Copy link
Member

Thanks for contribute this.

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #1956 (23cd641) into master (300a2fb) will increase coverage by 1.85%.
The diff coverage is 100.00%.

❗ Current head 23cd641 differs from pull request most recent head df0e2b8. Consider uploading reports for the commit df0e2b8 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1956      +/-   ##
==========================================
+ Coverage   25.44%   27.30%   +1.85%     
==========================================
  Files         487      510      +23     
  Lines       31942    24359    -7583     
  Branches        0      233     +233     
==========================================
- Hits         8129     6651    -1478     
+ Misses      23813    17672    -6141     
- Partials        0       36      +36     
Impacted Files Coverage Δ
...re/JsInterop/modules/components/OverlayPosition.cs 100.00% <100.00%> (ø)
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
components/tabs/TabPane.razor 86.66% <0.00%> (-6.20%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
components/input/TextArea.razor.cs 77.52% <0.00%> (-3.05%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
components/timeline/Timeline.razor.cs 63.21% <0.00%> (-2.24%) ⬇️
...onents/date-picker/internal/DatePickerHeader.razor 45.71% <0.00%> (-1.91%) ⬇️
... and 421 more

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 300a2fb...df0e2b8. Read the comment docs.

Copy link
Member

@anddrzejb anddrzejb left a comment

Choose a reason for hiding this comment

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

LGTM

@ElderJames ElderJames enabled auto-merge (squash) September 17, 2021 23:21
@ElderJames ElderJames merged commit b01ab71 into ant-design-blazor:master Sep 17, 2021
@bezysoftware bezysoftware deleted the fix/overlays branch September 23, 2021 13:01
ElderJames added a commit that referenced this pull request Oct 16, 2021
In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves #1955

Co-authored-by: James Yeung <shunjiey@hotmail.com>
anranruye pushed a commit to anranruye/ant-design-blazor that referenced this pull request Nov 14, 2021
…or#1956)

In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves ant-design-blazor#1955

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Apr 23, 2022
In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves #1955

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Apr 30, 2022
In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves #1955

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Sep 6, 2022
In cultures where decimal separator is ',' overlay would be ill-positioned

Resolves #1955

Co-authored-by: James Yeung <shunjiey@hotmail.com>
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

4 participants