[PR #903] [MERGED] Add an error dialog when we fail to parse settings #24372

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/903
Author: @zadjii-msft
Created: 5/20/2019
Status: Merged
Merged: 5/23/2019
Merged by: @zadjii-msft

Base: masterHead: dev/migrie/f/gh-error-dialog


📝 Commits (10+)

  • d0121a1 start work on an error dialog
  • effefeb Continue work on an error dialog
  • 00a8da4 This unfortunately didn't work
  • 643a177 Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog
  • b51d03f I'm just committing all of this, even though I really don't need most of it.
  • c1d17f6 Cleanup for PR
  • cb55215 Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog
  • e8f5fb8 Merge branch 'master' into dev/migrie/f/gh-error-dialog
  • 5547ca5 PR feedback
  • af45535 Minor PR nits

📊 Changes

8 files changed (+224 additions, -62 deletions)

View changed files

📝 src/cascadia/CascadiaPackage/Resources/en-US/Resources.resw (+42 -27)
📝 src/cascadia/TerminalApp/App.cpp (+138 -9)
📝 src/cascadia/TerminalApp/App.h (+8 -0)
📝 src/cascadia/TerminalApp/App.xaml (+19 -1)
📝 src/cascadia/TerminalApp/CascadiaSettings.cpp (+1 -1)
📝 src/cascadia/TerminalApp/CascadiaSettings.h (+2 -1)
📝 src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp (+13 -23)
📝 src/cascadia/WindowsTerminal/IslandWindow.cpp (+1 -0)

📄 Description

Summary of the Pull Request

Add an error dialog when we fail to parse settings.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Sneak peek:
image

  • If we fail to load the settings, we'll temporarily use the default settings. These defaults won't get written back to the profiles.json file, so people don't need to worry about blowing their settings away with a simple typo.
  • This includes a bit of a XAML hack to make the button appear correctly when the app's theme is opposite that of the system theme. ContentDialog does a weird thing where it takes its child and moves that to the popup and leaves itself in the tree. That causes things like ElementTheme inheritance to break. So instead, we're theming the CloseButton manually, to make sure it's always visible.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/903 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/20/2019 **Status:** ✅ Merged **Merged:** 5/23/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `dev/migrie/f/gh-error-dialog` --- ### 📝 Commits (10+) - [`d0121a1`](https://github.com/microsoft/terminal/commit/d0121a10f4b238db28df7c7d76ced8cf37accef8) start work on an error dialog - [`effefeb`](https://github.com/microsoft/terminal/commit/effefeb95918abfc5775fad46dbb183227a22bd9) Continue work on an error dialog - [`00a8da4`](https://github.com/microsoft/terminal/commit/00a8da4045769f057ea32e64c06fc837e9070496) This unfortunately didn't work - [`643a177`](https://github.com/microsoft/terminal/commit/643a17798ca3dab5c9d86a48b7032b4d38306e10) Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog - [`b51d03f`](https://github.com/microsoft/terminal/commit/b51d03fa664d223db0ff76a23eba612324585977) I'm just committing all of this, even though I really don't need most of it. - [`c1d17f6`](https://github.com/microsoft/terminal/commit/c1d17f69103c9c022dcb32eb9097983f2501d068) Cleanup for PR - [`cb55215`](https://github.com/microsoft/terminal/commit/cb55215372987295e16e9bc0842bbe8a6c7c6bd3) Merge remote-tracking branch 'origin/master' into dev/migrie/f/gh-error-dialog - [`e8f5fb8`](https://github.com/microsoft/terminal/commit/e8f5fb8f97311a6ed56837a82099c9ebd81e1956) Merge branch 'master' into dev/migrie/f/gh-error-dialog - [`5547ca5`](https://github.com/microsoft/terminal/commit/5547ca56efeaa74b0b71176dd39cf408b53831a2) PR feedback - [`af45535`](https://github.com/microsoft/terminal/commit/af455356490849ab4f0f4e2a36caf75af09ed8d0) Minor PR nits ### 📊 Changes **8 files changed** (+224 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/CascadiaPackage/Resources/en-US/Resources.resw` (+42 -27) 📝 `src/cascadia/TerminalApp/App.cpp` (+138 -9) 📝 `src/cascadia/TerminalApp/App.h` (+8 -0) 📝 `src/cascadia/TerminalApp/App.xaml` (+19 -1) 📝 `src/cascadia/TerminalApp/CascadiaSettings.cpp` (+1 -1) 📝 `src/cascadia/TerminalApp/CascadiaSettings.h` (+2 -1) 📝 `src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp` (+13 -23) 📝 `src/cascadia/WindowsTerminal/IslandWindow.cpp` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request Add an error dialog when we fail to parse settings. ## PR Checklist * [x] Closes #622 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tested manually. * [x] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments Sneak peek: ![image](https://user-images.githubusercontent.com/18356694/58040776-f3f7e400-7afb-11e9-804a-656defc238c1.png) * If we fail to load the settings, we'll temporarily use the default settings. These defaults won't get written back to the profiles.json file, so people don't need to worry about blowing their settings away with a simple typo. * This includes a bit of a XAML hack to make the button appear correctly when the app's theme is opposite that of the system theme. `ContentDialog` does a weird thing where it takes its child and moves that to the popup and leaves itself in the tree. That causes things like `ElementTheme` inheritance to break. So instead, we're theming the `CloseButton` manually, to make sure it's always visible. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:02:52 +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#24372