feat: Restore debug tools in Settings page with conditional compilation#1539
feat: Restore debug tools in Settings page with conditional compilation#1539
Conversation
|
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1539.eastus2.azurestaticapps.net |
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a Settings page to the Uno Toolkit Samples app that displays application metadata including version, framework, and platform information. The previous behavior (activating a debug panel) has been replaced with a user-facing settings page.
Changes:
- Adds SettingsPage.xaml/cs with responsive layout displaying app metadata, version information, platform detection, and documentation links
- Updates navigation logic in App.xaml.Navigation.cs to instantiate and cache the SettingsPage
- Modifies build configuration to support Skia renderer conditionally through UnoFeatures
- Updates CI/CD scripts to use native renderer for UI tests and adds build pipeline infrastructure improvements
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml | New XAML file defining the Settings page UI with version, framework, platform info and documentation links |
| samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs | Code-behind implementing platform detection using compile-time directives and runtime detection for Skia builds |
| samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs | Removed duplicate using statement and updated navigation to display cached SettingsPage instead of debug panel |
| samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj | Added crosstargeting override import and conditional SkiaRenderer feature configuration |
| build/workflow/scripts/wasm-uitest-run.sh | Added UseNativeRenderer property to WASM UI test build |
| build/workflow/scripts/ios-uitest-build.sh | Added UseNativeRenderer property to iOS UI test build |
| build/workflow/scripts/android-uitest-build.sh | Added UseNativeRenderer property to Android UI test build |
| build/workflow/copilot/restore-solution.sh | Added crosstargeting override file generation, workload installation, and dev server preloading |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.csproj
Outdated
Show resolved
Hide resolved
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs
Outdated
Show resolved
Hide resolved
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml.cs
Show resolved
Hide resolved
988a866 to
e2380e6
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1539.eastus2.azurestaticapps.net |
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1539.eastus2.azurestaticapps.net |
|
|
| set -euo pipefail | ||
|
|
||
| # Create a desktop-only crosstargeting override for build pipelines | ||
| cat > "src/crosstargeting_override.props" << 'EOF' |
There was a problem hiding this comment.
This file writes src/crosstargeting_override.props and the samples csproj auto-imports it if present. That can affect local builds after the script runs. Maybe consider scoping/cleanup or env-gated import no ?
There was a problem hiding this comment.
This is a workaround until the devserver fixes a few things, it probably won't get merged as-is.
| } | ||
| #endif | ||
|
|
||
| private void OnNavigationItemInvoked(MUXC.NavigationView sender, MUXC.NavigationViewItemInvokedEventArgs e) |
There was a problem hiding this comment.
When Settings is invoked, any active nested sample overlay remains visible. Should we call ExitNestedSample() before swapping NavigationView.Content to settings?
There was a problem hiding this comment.
good concern but no need,
"nested" navigation are shown full screen blocking the navigation-view completely, no way to click settings while in "nested" page
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml
Outdated
Show resolved
Hide resolved
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/Content/SettingsPage.xaml
Outdated
Show resolved
Hide resolved
samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples/App.xaml.Navigation.cs
Outdated
Show resolved
Hide resolved
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1539.eastus2.azurestaticapps.net |
|
|
GitHub Issue (If applicable): #
PR Type
What is the current behavior?
Settings page replaced the debug panel overlay, losing access to visual tree inspection and visual state testing tools previously available via the Settings button.
What is the new behavior?
Debug tools integrated into Settings page, visible only in DEBUG builds via conditional compilation:
SettingsPage.xaml
x:Load="False", materialized only in DEBUG viaFindName()SettingsPage.xaml.cs
SetShell(Shell)method receives Shell reference from App#if DEBUGShell.xaml.cs
DebugCopyVisualTree()andDebugTestVisualState()expose existing private debug methodsApp.xaml.Navigation.cs
Zero impact on RELEASE builds—section never loads, handlers not compiled.
PR Checklist
Other information
Debug tools now more discoverable than previous overlay panel approach. Same functionality, better organization.
Internal Issue (If applicable):
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.