[Advanced Paste] Add single-line paste formatting - #49647
[Advanced Paste] Add single-line paste formatting#49647massimomazzariol wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Thank you for contributing to PowerToys. We've detected that this PR might include a new or modified telemetry event. Please ensure the following before merging:
|
|
@chatasweetie This PR does not introduce a new telemetry event name. It extends the existing AdvancedPaste_Settings event with the PasteSingleLineHotkey field and uses the existing AdvancedPaste_InvokeAdvancedPaste event with the new SingleLineDirect action value. Both events are already listed in DATA_AND_PRIVACY.md, and no clipboard or pasted text content is collected. Could you please confirm whether a DATA_AND_PRIVACY.md update or any additional telemetry registration step is required? |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 49647 in repo microsoft/PowerToys |
There was a problem hiding this comment.
Preserve telemetry enum values
Severity: high
Assign explicit stable values and a new value for SingleLine.
Review validation: Fixed; Advanced Paste tests and modules pass on fork PR 211
There was a problem hiding this comment.
Include shortcut in conflict warnings
Severity: medium
Include SingleLine in copy-shortcut conflict detection.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Collapse indented blank lines
Severity: medium
Keep horizontal whitespace inside repeated line-break matching.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Show shortcut on dashboard
Severity: low
Surface configured SingleLine shortcuts.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Prevent regex backtracking
Severity: medium
Use RegexOptions.NonBacktracking.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Surface shortcut in OOBE
Severity: low
Add the optional localized shortcut summary.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Preserve core-action ordering
Severity: medium
Explicitly order core actions before optional actions.
Review validation: Fixed and verified on fork PR 211
There was a problem hiding this comment.
Handle missing upgrade setting
Severity: medium
Parse the new shortcut only when its JSON key exists.
Review validation: Fixed; 191 tests pass and XamlStyler/diff checks pass on fork PR 211
Summary of the Pull Request
Adds a new Paste as single line core action to Advanced Paste.
The action converts clipboard text to one line by replacing line-break sequences with a single space while preserving other text, including Unicode content. It is available from the Advanced Paste UI and can also be assigned an optional global shortcut from Settings.
Partially addresses #33109.
Scope
This PR intentionally implements only the single-line transformation requested in #33109.
Text case transformations requested in #38690 and #46354—including uppercase, lowercase, title case, sentence case, toggle case, and similar casing operations—remain out of scope for this PR and can be implemented separately.
PR Checklist
Help Wanted; [Advanced Paste][Feature Request] Add ability to paste text in different cases (uppercase, lowercase, toggle case, etc.) #38690 and Advanced Paste: Text Case Manipulations (ALL UPPER, all lower, Title Casing etc.) #46354 were closed as duplicates of that umbrella issueDetailed Description of the Pull Request / Additional comments
Single-line transform
PasteFormats.SingleLineas a non-AI, text-only core action.Configurable direct shortcut
settings.jsonunderpaste-as-single-line-hotkey.Explicitly not included
This PR does not add uppercase, lowercase, title case, sentence case, toggle case, camel case, or other case-conversion actions. Those requests remain tracked under the broader #33109 discussion, with #38690 and #46354 as related duplicates.
Validation Steps Performed
Automated
Manual end-to-end
Validated with one coherent local Debug build: