Skip to content

feat: Add UnoSplashScreenScale MSBuild property to Uno.Sdk#22759

Open
Copilot wants to merge 2 commits intomasterfrom
copilot/add-scale-prop-for-unosplashscreen
Open

feat: Add UnoSplashScreenScale MSBuild property to Uno.Sdk#22759
Copilot wants to merge 2 commits intomasterfrom
copilot/add-scale-prop-for-unosplashscreen

Conversation

Copy link
Contributor

Copilot AI commented Mar 2, 2026

UnoSplashScreen supports a Scale metadata property in Uno.Resizetizer, but Uno.Sdk never exposed a corresponding MSBuild property — forcing users to redefine the entire UnoSplashScreen item just to set the scale.

Changes

  • Uno.DefaultItems.Resizetizer.targets: Pass Scale="$(UnoSplashScreenScale)" to the default UnoSplashScreen item
  • Sdk.props.buildschema.json: Add UnoSplashScreenScale, UnoSplashScreenFile, UnoSplashScreenBaseSize, and UnoSplashScreenColor to the properties section for IDE IntelliSense support (the latter three were already used in targets but undocumented in the schema)

Usage

<PropertyGroup>
  <UnoSplashScreenScale>0.5</UnoSplashScreenScale>
</PropertyGroup>

PR Type:

✨ Feature

What is the current behavior? 🤔

Uno.Sdk exposes UnoSplashScreenFile, UnoSplashScreenBaseSize, and UnoSplashScreenColor as overridable MSBuild properties, but not Scale. To control scaling, users must remove the SDK-generated default item and redefine the entire UnoSplashScreen item manually.

What is the new behavior? 🚀

Users can set <UnoSplashScreenScale> in their <PropertyGroup> and it flows through to the Scale metadata on the default UnoSplashScreen item, consistent with how UnoIconForegroundScale works for app icons.

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

The Scale metadata on UnoSplashScreen is documented in Uno.Resizetizer properties. When unset, the value passed is an empty string, which Resizetizer treats as unset (uses its own default).

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing prop in Uno.Sdk for UnoSplashScreen.Scale</issue_title>
<issue_description>### Current behavior

We currently have these props to customize the UnoSplashScreen.

Looking at the docs, UnoSplashScreen has a Scale property that should be customizable without needing to re-define the whole UnoSplashScreen item.

Creating a new project results in the splashscreen looking like this, depending on the image size.

image

If I were to define my own UnoSplashScreen in the csproj I can specify a Scale on it:

  <UnoSplashScreen Include="$(UnoSplashScreenFile)"
        BaseSize="$(UnoSplashScreenBaseSize)"
        Color="$(UnoSplashScreenColor)"
        IsDefaultItem="true"
        Scale="0.5"
        Exclude="@(UnoSplashScreen)"
        Condition="Exists('$(UnoSplashScreenFile)')" />

It then no longer clips

image

Expected behavior

We should have a UnoSplashScreenScale property </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Mar 2, 2026
Copilot AI review requested due to automatic review settings March 2, 2026 09:11
Copilot AI review requested due to automatic review settings March 2, 2026 09:11
Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot March 2, 2026 09:15
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI changed the title [WIP] Add missing Scale prop to UnoSplashScreen customization feat: Add UnoSplashScreenScale MSBuild property to Uno.Sdk Mar 2, 2026
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22759/wasm-skia-net9/index.html

@MartinZikmund MartinZikmund marked this pull request as ready for review March 2, 2026 12:58
Copy link
Contributor

Copilot AI left a 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 adds an MSBuild property (UnoSplashScreenScale) to Uno.Sdk so developers can control UnoSplashScreen scaling without redefining the default UnoSplashScreen item, and updates the build schema to improve IDE IntelliSense for related splash screen properties.

Changes:

  • Pass Scale="$(UnoSplashScreenScale)" into the SDK-generated default UnoSplashScreen item.
  • Add UnoSplashScreenScale plus existing-but-undocumented splash screen properties (UnoSplashScreenFile, UnoSplashScreenBaseSize, UnoSplashScreenColor) to the MSBuild schema for IntelliSense.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Uno.Sdk/targets/Uno.DefaultItems.Resizetizer.targets Threads the new UnoSplashScreenScale property into the default UnoSplashScreen item metadata.
src/Uno.Sdk/Sdk/Sdk.props.buildschema.json Documents splash screen-related MSBuild properties for IDE IntelliSense (including the new scale property).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

},
"UnoSplashScreenScale": {
"description": "Used to scale the image that will be used as the SplashScreen.",
"type": "float"
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the build schema, UnoSplashScreenScale is declared as a float, but the UnoSplashScreen item metadata later in this same file declares Scale/AndroidScale/etc as int. This inconsistency can lead to confusing/incorrect IDE validation or IntelliSense when users set fractional values (e.g., 0.5). Consider aligning the schema types (e.g., update the UnoSplashScreen item metadata scale fields to float/string, or change the property type to match).

Suggested change
"type": "float"
"type": "int"

Copilot uses AI. Check for mistakes.
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22759/wasm-skia-net9/index.html

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.

Missing prop in Uno.Sdk for UnoSplashScreen.Scale

5 participants