feat: Add UnoSplashScreenScale MSBuild property to Uno.Sdk#22759
feat: Add UnoSplashScreenScale MSBuild property to Uno.Sdk#22759
Conversation
Co-authored-by: MartinZikmund <1075116+MartinZikmund@users.noreply.github.com>
|
|
|
🤖 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 |
There was a problem hiding this comment.
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 defaultUnoSplashScreenitem. - Add
UnoSplashScreenScaleplus 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" |
There was a problem hiding this comment.
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).
| "type": "float" | |
| "type": "int" |
|
🤖 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 |
UnoSplashScreensupports aScalemetadata property in Uno.Resizetizer, butUno.Sdknever exposed a corresponding MSBuild property — forcing users to redefine the entireUnoSplashScreenitem just to set the scale.Changes
Uno.DefaultItems.Resizetizer.targets: PassScale="$(UnoSplashScreenScale)"to the defaultUnoSplashScreenitemSdk.props.buildschema.json: AddUnoSplashScreenScale,UnoSplashScreenFile,UnoSplashScreenBaseSize, andUnoSplashScreenColorto the properties section for IDE IntelliSense support (the latter three were already used in targets but undocumented in the schema)Usage
PR Type:
✨ Feature
What is the current behavior? 🤔
Uno.SdkexposesUnoSplashScreenFile,UnoSplashScreenBaseSize, andUnoSplashScreenColoras overridable MSBuild properties, but notScale. To control scaling, users must remove the SDK-generated default item and redefine the entireUnoSplashScreenitem manually.What is the new behavior? 🚀
Users can set
<UnoSplashScreenScale>in their<PropertyGroup>and it flows through to theScalemetadata on the defaultUnoSplashScreenitem, consistent with howUnoIconForegroundScaleworks for app icons.PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️
The
Scalemetadata onUnoSplashScreenis 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
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.