-
Notifications
You must be signed in to change notification settings - Fork 798
Feature: More child dialogs #3234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the PowerShell, PuTTY, and Web Console connect dialogs from the MahApps CustomDialog system to the SimpleChildWindow implementation, consistent with the recent RDP connect dialog changes. This migration improves usability and consistency across the application.
Key Changes:
- Converted three connect dialogs (PowerShell, PuTTY, Web Console) from CustomDialog to ChildWindow
- Removed old dialog UserControl files and created new ChildWindow implementations
- Updated ViewModels to use synchronous callbacks and ChildWindow.IsOpen pattern instead of async dialog coordinator
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Website/docs/changelog/next-release.md | Added changelog entries for the three new child window dialogs and fixed indentation formatting |
| Source/NETworkManager/Views/WebConsoleConnectDialog.xaml.cs | Removed old UserControl-based dialog code-behind |
| Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml.cs | Added new ChildWindow implementation with deferred focus using Dispatcher |
| Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml | Converted from UserControl to ChildWindow with updated styling and margins |
| Source/NETworkManager/Views/RemoteDesktopConnectChildWindow.xaml.cs | Removed unused parentWindow constructor parameter for consistency |
| Source/NETworkManager/Views/RemoteDesktopConnectChildWindow.xaml | Fixed DataContext to use correct RemoteDesktopConnectViewModel |
| Source/NETworkManager/Views/PuTTYConnectDialog.xaml.cs | Removed old UserControl-based dialog code-behind |
| Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml.cs | Added new ChildWindow implementation with deferred focus using Dispatcher |
| Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml | Converted from UserControl to ChildWindow with updated styling and margins |
| Source/NETworkManager/Views/PowerShellConnectDialog.xaml.cs | Removed old UserControl-based dialog code-behind |
| Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml.cs | Added new ChildWindow implementation with deferred focus using Dispatcher |
| Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml | Converted from UserControl to ChildWindow with updated styling and margins |
| Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs | Refactored Connect method to use ChildWindow with synchronous callbacks |
| Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs | Removed parentWindow parameter from ChildWindow instantiation |
| Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs | Refactored Connect method to use ChildWindow, simplified PuTTY.BuildCommandLine call |
| Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs | Refactored Connect method to use ChildWindow with synchronous callbacks |
| Source/NETworkManager/ViewModels/PowerShellConnectViewModel.cs | Modernized collection initialization syntax (new() to []) |
| Source/NETworkManager/Resources/Styles/ChildWindowStyles.xaml | Increased default ChildWindow width from 450 to 500 pixels |
Comments suppressed due to low confidence (3)
Source/NETworkManager/Views/WebConsoleConnectChildWindow.xaml:11
- The
xmlns:iconPacksnamespace declaration is not used in this file and should be removed to keep the code clean.
Source/NETworkManager/Views/PuTTYConnectChildWindow.xaml:12 - The
xmlns:iconPacksnamespace declaration is not used in this file and should be removed to keep the code clean.
Source/NETworkManager/Views/PowerShellConnectChildWindow.xaml:12 - The
xmlns:iconPacksnamespace declaration is not used in this file and should be removed to keep the code clean.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, _ => | ||
| { | ||
| childWindow.IsOpen = false; | ||
| ConfigurationManager.Current.IsChildWindowOpen = false; | ||
|
|
||
| customDialog.Content = new PuTTYConnectDialog | ||
| { | ||
| DataContext = connectViewModel | ||
| }; | ||
| ConfigurationManager.OnDialogClose(); | ||
| }, host); |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation in the cancel callback. The callback body is indented with extra spaces instead of following the standard indentation pattern used in the connect callback above and in the corresponding PowerShell and WebConsole implementations.
| // Connect | ||
| Connect(sessionInfo); | ||
| }, async _ => | ||
|
|
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent blank line added after Connect(sessionInfo);. The WebConsole and PuTTY implementations don't have this extra blank line before the closing brace of the connect callback. For consistency, this blank line should be removed.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Changes proposed in this pull request
To-Do
Contributing
By submitting this pull request, I confirm the following: