Skip to content

Conversation

@jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Sep 19, 2025

Description of Change

Added more tests to validate the recent changes related with Windows image Aspect: #30936 (comment)

  • Panoramic images with Center, Start, End, and Fill alignments
  • Small images that shouldn't exceed intrinsic size
  • Tall images with vertical alignment validation
  • Square images in all alignment combinations
  • Constrained containers (very narrow/short)
  • Mixed aspect ratios in the same container

Issues Fixed

Fixes #31686

@jsuarezruiz jsuarezruiz added platform/windows area-image Image loading, sources, caching area-testing Unit tests, device tests labels Sep 19, 2025
Copilot AI review requested due to automatic review settings September 19, 2025 11:50
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 comprehensive UI testing coverage for the recent Windows Image Aspect fixes related to issue 30403. The changes validate that images with AspectFit now properly respect VerticalOptions and HorizontalOptions on Windows platforms.

Key changes:

  • Adds extensive test coverage for different image sizes and alignment scenarios
  • Creates dedicated test pages for panoramic images, small images, and general image alignment
  • Implements automated UI tests to verify aspect ratio preservation and alignment behavior

Reviewed Changes

Copilot reviewed 8 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt Adds new public API for Windows ImageHandler.GetDesiredSize override
src/Core/src/Handlers/Image/ImageHandler.Windows.cs Implements GetDesiredSize override and platform constraint management for AspectFit images
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403SmallImages.cs Automated tests for small image behavior with various alignments and container sizes
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403PanoramicImages.cs Automated tests for panoramic image alignment and aspect ratio preservation
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue30403.cs Basic UI test for the original issue scenario
src/Controls/tests/TestCases.HostApp/Issues/Issue30403SmallImages.cs Test page UI for small image scenarios with multiple test cases
src/Controls/tests/TestCases.HostApp/Issues/Issue30403PanoramicImages.cs Test page UI for panoramic image scenarios with interactive elements
src/Controls/tests/TestCases.HostApp/Issues/Issue30403.cs Basic test page for the original issue reproduction
Comments suppressed due to low confidence (1)

src/Core/src/Handlers/Image/ImageHandler.Windows.cs:1

  • Consider adding null checks for ih.PlatformView before setting MaxWidth and MaxHeight properties to prevent potential null reference exceptions.
using System;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-image Image loading, sources, caching area-testing Unit tests, device tests platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants