feat: Add Simple theme default and opt-in sample content for recommended preset#2021
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the unoapp template’s Recommended preset to default to the Simple theme and generate a blank single-page experience by default, while making the previous multi-page/sample flow opt-in via a new sample parameter.
Changes:
- Add a
sampletemplate parameter (useSampleContent) and gate the sample UI, navigation routes, and viewmodel logic behind it. - Switch the Recommended preset default theme to Simple and wire Simple theme resources into XAML + C# markup variants.
- Update UI tests and add a detailed spec document describing the intended preset behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Presentation/MainViewModel.cs | Gate Second-page sample navigation/state behind useSampleContent. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Presentation/MainModel.cs | Gate MVUX sample navigation/state behind useSampleContent. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Presentation/MainPage.xaml | Render sample page UI only when useSampleContent; otherwise show “Hello Uno Platform!”. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/Presentation/MainPage.xaml.cs | Same as XAML variant for C# Markup: sample UI vs blank page. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/MyExtensionsApp.1.csproj | Add SimpleTheme UnoFeature when useSimple is selected. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/App.xaml | Add Simple theme resource dictionaries (toolkit + non-toolkit). |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/App.recommended.cs | Add Simple theme loading for C# markup; gate SecondPage route registration on useSampleContent. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1/App.blank.cs | Add Simple theme loading for C# markup in blank app variant. |
| src/Uno.Templates/content/unoapp/MyExtensionsApp.1.UITests/Given_MainPage.cs | Update smoke test to only navigate to SecondPage when sample content is enabled. |
| src/Uno.Templates/content/unoapp/.template.config/template.json | Add sample parameter, useSampleContent computed value, Recommended default theme=Simple, and sample exclusions. |
| src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json | Add Simple theme choice + new sample feature option; set Recommended defaults accordingly. |
| specs/recommended-preset-blank-page.md | New spec documenting the intended simplified Recommended preset output. |
Comments suppressed due to low confidence (1)
src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json:146
- The Recommended preset now sets appTheme to "simple", but the preset still enables "dspGenerator": "true". In this template, DSP import is Material-specific (and the wizard metadata requires appTheme == material), so this combination is inconsistent and the DSP option will be ignored/invalid for the default Recommended configuration. Consider setting dspGenerator to false for the Recommended preset when appTheme is simple (or updating the DSP constraints/implementation if it is intended to support Simple).
"Parameters": {
"appTheme": "simple",
"architecture": "mvux",
"authentication": "none",
"configuration": "true",
"cultures": "es|fr|pt-BR",
"dependencyInjection": "true",
"http": "kiota",
"localization": "true",
"logging": "default",
"markup": "xaml",
"mediaPlayerElement": "false",
"navigation": "regions",
"platforms": "android|ios|wasm|desktop",
"rider": "true",
"sample": "false",
"server": "false",
"skipRestore": "true",
"tests": "none",
"tfm": "net10.0",
"toolkit": "true",
"vscode": "true",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Kunal22shah
force-pushed
the
dev/sb/recommended-blank
branch
from
March 10, 2026 20:22
48fbe83 to
587eb77
Compare
Kunal22shah
force-pushed
the
dev/sb/recommended-blank
branch
2 times, most recently
from
March 10, 2026 20:55
cfd56e8 to
c8b7b56
Compare
jeromelaban
reviewed
Mar 10, 2026
jeromelaban
reviewed
Mar 10, 2026
Kunal22shah
force-pushed
the
dev/sb/recommended-blank
branch
3 times, most recently
from
March 11, 2026 14:21
b46879f to
6048c6d
Compare
kazo0
approved these changes
Mar 11, 2026
Kunal22shah
force-pushed
the
dev/sb/recommended-blank
branch
from
March 11, 2026 18:29
6048c6d to
49b1f22
Compare
Kunal22shah
force-pushed
the
dev/sb/recommended-blank
branch
from
March 11, 2026 18:35
49b1f22 to
64f9441
Compare
Kunal22shah
enabled auto-merge
March 11, 2026 18:36
This was referenced Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue (If applicable): closes #2019
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Internal Issue (If applicable):