feat(Calculator): add thousands separators to display title only#47006
Open
SAY-5 wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(Calculator): add thousands separators to display title only#47006SAY-5 wants to merge 1 commit intomicrosoft:mainfrom
SAY-5 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Formats the Title with locale-aware thousands separators while keeping the raw value in SaveCommand, CopyTextCommand, and TextToSuggest. This prevents the regression where formatted values like '1,234,567' would poison copy-paste, saved expressions, and query suggestions. The separation follows the same pattern PowerToys Run uses with Title vs QueryTextDisplay. Fixes microsoft#40203
Member
|
include a pic of before / after |
Author
|
Working on getting a Windows build set up for screenshots. In the meantime, the visual change is: Before: Calculator result for The Title display changes, but copy/paste still gives the raw |
Member
|
Screenshot please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Rework of #47001, which was correctly closed because it poisoned SaveCommand, CopyTextCommand, and TextToSuggest with formatted values.
This version strictly separates display formatting from data values:
resultstring so saved expressions can be re-parseddecimalResultso pasting into code/spreadsheets worksdecimalResultfor query re-submissionThis follows the same pattern that PowerToys Run uses, where Title and QueryTextDisplay are separate values.
PR Checklist