Skip to content

feat: Add Simple theme default and opt-in sample content for recommended preset#2021

Merged
Kunal22shah merged 1 commit into
mainfrom
dev/sb/recommended-blank
Mar 11, 2026
Merged

feat: Add Simple theme default and opt-in sample content for recommended preset#2021
Kunal22shah merged 1 commit into
mainfrom
dev/sb/recommended-blank

Conversation

@Kunal22shah

Copy link
Copy Markdown
Contributor

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:

  • Associated with an issue (GitHub or internal)

Other information

Internal Issue (If applicable):

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 sample template 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.

Comment thread specs/recommended-preset-blank-page.md Outdated
Comment thread src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json Outdated
Comment thread src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json Outdated
Comment thread specs/001-recommended-preset-blank-page/spec.md
@Kunal22shah
Kunal22shah force-pushed the dev/sb/recommended-blank branch from 48fbe83 to 587eb77 Compare March 10, 2026 20:22
@Kunal22shah
Kunal22shah force-pushed the dev/sb/recommended-blank branch 2 times, most recently from cfd56e8 to c8b7b56 Compare March 10, 2026 20:55
Comment thread specs/001-recommended-preset-blank-page/spec.md
Comment thread specs/001-recommended-preset-blank-page/spec.md
@Kunal22shah
Kunal22shah force-pushed the dev/sb/recommended-blank branch 3 times, most recently from b46879f to 6048c6d Compare March 11, 2026 14:21
@Kunal22shah
Kunal22shah force-pushed the dev/sb/recommended-blank branch from 6048c6d to 49b1f22 Compare March 11, 2026 18:29
@Kunal22shah
Kunal22shah force-pushed the dev/sb/recommended-blank branch from 49b1f22 to 64f9441 Compare March 11, 2026 18:35
@Kunal22shah
Kunal22shah enabled auto-merge March 11, 2026 18:36
@Kunal22shah
Kunal22shah merged commit 2e42559 into main Mar 11, 2026
76 checks passed
@Kunal22shah
Kunal22shah deleted the dev/sb/recommended-blank branch March 11, 2026 20:37
agneszitte added a commit that referenced this pull request May 1, 2026
…e-6.6

revert: Remove Simple Theme from 6.6 release (PRs #2017 and #2021)
This was referenced Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify Recommended Template

4 participants