[PR #19059] Add prompt to choose between opening JSON settings file or folder #31695

Open
opened 2026-01-31 09:48:55 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19059

State: closed
Merged: No


Summary of the Pull Request

This PR introduces a confirmation dialog that allows users to choose between opening the settings JSON file or the containing folder. This enhances user flexibility when accessing configuration files from the terminal.

Motivation

Previously, clicking "Open JSON" would directly open the file. This change adds user choice, improving usability and matching expectations for broader editing or navigation workflows.

References and Relevant Issues

Fixes #14410
Marked as [Good First Issue] in the Microsoft Terminal GitHub repository.

Detailed Description of the Pull Request / Additional comments

•	Modified the sui.OpenJson event handler inside TerminalPage.cpp.
•	Introduced Windows::UI::Popups::MessageDialog to show two options:
•	Open File
•	Open Folder
•	Based on user selection, the appropriate _LaunchSettings() method is called.
•	No breaking changes were introduced.

Validation Steps Performed

•	Verified dialog appears when clicking “Open JSON”
•	Confirmed “Open File” launches the correct settings JSON
•	Confirmed “Open Folder” opens the parent folder using DefaultsFile
•	Ensured no UI crashes or regressions
•	Code compiles and builds cleanly

Contributor License Agreement

@microsoft-github-policy-service agree

I confirm that I am submitting this contribution as an individual, and I own the rights to this code. I am not submitting on behalf of an employer or organization.

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/19059 **State:** closed **Merged:** No --- ## Summary of the Pull Request This PR introduces a confirmation dialog that allows users to choose between opening the settings JSON file or the containing folder. This enhances user flexibility when accessing configuration files from the terminal. ## Motivation Previously, clicking "Open JSON" would directly open the file. This change adds user choice, improving usability and matching expectations for broader editing or navigation workflows. ## References and Relevant Issues Fixes #14410 Marked as [Good First Issue] in the Microsoft Terminal GitHub repository. ## Detailed Description of the Pull Request / Additional comments • Modified the sui.OpenJson event handler inside TerminalPage.cpp. • Introduced Windows::UI::Popups::MessageDialog to show two options: • Open File • Open Folder • Based on user selection, the appropriate _LaunchSettings() method is called. • No breaking changes were introduced. ## Validation Steps Performed • Verified dialog appears when clicking “Open JSON” • Confirmed “Open File” launches the correct settings JSON • Confirmed “Open Folder” opens the parent folder using DefaultsFile • Ensured no UI crashes or regressions • Code compiles and builds cleanly ## Contributor License Agreement @microsoft-github-policy-service agree I confirm that I am submitting this contribution as an individual, and I own the rights to this code. I am not submitting on behalf of an employer or organization. ## PR Checklist - [x] Closes #xxx - [x] Tests added/passed - [x] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [x] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:48:55 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31695