Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Jul 9, 2025

Describe your changes

When applying currency formatting via number or progress column, we always want to show the narrow symbol for dollar, euro, and yen.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Jul 9, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11895/streamlit-1.48.0-py3-none-any.whl
🕹️ Preview app pr-11895.streamlit.app (☁️ Deploy here if not accessible)

@lukasmasuch lukasmasuch added security-assessment-completed Security assessment has been completed for PR change:bugfix PR contains bug fix implementation impact:users PR changes affect end users labels Jul 9, 2025
@lukasmasuch lukasmasuch marked this pull request as ready for review July 9, 2025 11:48
return formatIntlNumberWithLocales(value, {
style: "currency",
currency: "EUR",
currencyDisplay: "narrowSymbol",
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Is it expected that this change did not yield an e2e snapshot change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The narrow symbol is already used in our test cases. If this is not set, I think it depends on the locale if it shows a narrow or full symbol for a specific currency.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a unit test. If narrowSymbol wouldn't be set for "pt-BR", the yen would be shown with the wide symbol: JP¥ 10

@streamlit streamlit deleted a comment from sfc-gh-lmasuch Aug 12, 2025
@lukasmasuch lukasmasuch enabled auto-merge (squash) August 12, 2025 16:10
@lukasmasuch lukasmasuch merged commit 797bd0b into develop Aug 12, 2025
35 checks passed
@lukasmasuch lukasmasuch deleted the ensure-narrow-curency-symbol-number-formatting branch August 12, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:bugfix PR contains bug fix implementation impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants