Repository navigation
Fix Rectangle Rendering as a Thin Line for Small Heights - #37319
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37319Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37319" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 5 findings
See inline comments for details.
|
|
||
| if (!double.IsNaN(minimumDimension) && | ||
| !double.IsInfinity(minimumDimension) && | ||
| minimumDimension <= strokeThickness * 2) |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Logic and Correctness — The minimumDimension <= strokeThickness * 2 threshold makes the rendered fill non-monotonic in the requested size. With the default StrokeThickness = 1 and Stroke = null: a Rectangle with HeightRequest = 2.0 takes the return 0 branch and paints a 2.0pt-tall fill, while HeightRequest = 2.01 falls through to return strokeThickness and paints a 1.01pt-tall fill. Growing the requested height by 0.01 halves the visible shape, and the mismatch with BoxView that this PR fixes below the threshold still exists above it (height 3 renders 2).
Second scenario — the suppression is keyed on strokeThickness * 2, not on a small absolute size, so it also fires on large shapes: a fill-only Rectangle with StrokeThickness = 20 (no Stroke brush) at 40x40 previously painted a 20x20 centered fill and now paints the full 40x40. That is a much wider behavior change than the reported small-height case, and nothing in the PR exercises it.
A continuous rule avoids both: either suppress the inset whenever Stroke is null (no stroke is ever painted, so there is no stroke to inset for), or clamp it continuously, e.g. Math.Min(strokeThickness, minimumDimension), so the rendered size never decreases as the shape grows.
|
|
||
| widthConstraint -= StrokeThickness; | ||
| heightConstraint -= StrokeThickness; | ||
| var strokeInset = GetPathStrokeInset(widthConstraint, heightConstraint); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[moderate] Layout Measure-Arrange — The inset here is decided from widthConstraint/heightConstraint (available size), but Rectangle.GetPath()/Ellipse.GetPath() decide it from WidthForPathComputation/HeightForPathComputation (arranged size). The two can disagree, so measure and the drawn path use different geometry rules. Concrete scenario: a fill-only shape reaches this fallback branch with heightConstraint = 1.5 (<= 2 * 1), so strokeInset = 0 and line 538 adds no stroke space to DesiredSize; the shape is then arranged taller than the threshold, and GetPath() uses strokeInset = 1, shrinking the path by 1pt that measure never accounted for. The reverse (measure with an infinite constraint → inset 1, arrange at 1.2 → inset 0) also occurs. Derive the inset from a single source for both passes.
| viewBounds.Y += StrokeThickness / 2; | ||
| viewBounds.Width -= StrokeThickness; | ||
| viewBounds.Height -= StrokeThickness; | ||
| var strokeInset = GetPathStrokeInset(viewBounds.Width, viewBounds.Height); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[moderate] Layout Measure-Arrange — TransformPathForBounds computes the inset from viewBounds, but the path it is transforming was built by GetPath() using WidthForPathComputation/HeightForPathComputation. These only agree while the shape is unarranged (Width == -1, where PathForBounds seeds _fallbackWidth/_fallbackHeight from viewBounds just above). Once Width/Height have real values and PathForBounds is called with bounds that differ from them — e.g. a resize where the platform view bounds arrive before the new arranged size — a fill-only shape can cross the threshold in one call site but not the other: GetPath() emits a full-bounds rect (inset 0) while this code shrinks viewBounds by StrokeThickness, and the non-Stretch.None scale path then scales that path against the shrunken bounds, rendering the shape at the wrong size/offset. Pass the same width/height used by GetPath().
|
|
||
| // Rectangle should render as a filled shape just like BoxView, | ||
| // not collapse into a thin stroked line for small height values. | ||
| VerifyScreenshot(); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Regression Prevention and Test Coverage — VerifyScreenshot() is called from a shared test with no platform exclusion, but the PR only adds baselines for TestCases.Android.Tests/snapshots/android, TestCases.iOS.Tests/snapshots/ios and snapshots/ios-26. TestCases.Mac.Tests/snapshots/mac and TestCases.WinUI.Tests/snapshots/windows both exist in the repo (1537 and 1527 baselines respectively) and receive no RectangleWithSmallHeightRendersAsFilledShape.png, so this test fails with a missing-baseline error on Mac and Windows. The change in Shape.cs is platform-agnostic and affects Windows/Mac rendering too, so those baselines should be added rather than the platforms excluded.
| { | ||
| App.WaitForElement("TestBoxView"); | ||
|
|
||
| // Rectangle should render as a filled shape just like BoxView, |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[moderate] Regression Prevention and Test Coverage — This exercises only the positive case (fill-only shape below the threshold). The new branch in Shape.GetPathStrokeInset has no test for the inputs that must NOT trip it: (a) a small shape that does have a Stroke brush, which must keep the legacy inset and still render its stroke, and (b) the threshold boundary itself (minimumDimension == strokeThickness * 2 vs slightly above), where the rendered size currently jumps. A single full-page screenshot cannot discriminate those. GetPathStrokeInset is internal and pure, so cheap Controls.Core.UnitTests cases over (Stroke set/null, StrokeThickness, width/height including NaN/infinity) would cover the branch deterministically without new baselines.
kubaflo
left a comment
There was a problem hiding this comment.
What's the status of this one? Is it ready for review?
31c28c7 to
2f9f1c6
Compare
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
|
Validated the AI summary, addressed the valid concern, and updated the implementation accordingly. |
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@Dhivya-SF4094 — new AI review results are available based on commit
ec97155.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: ANDROID · Base: main · Merge base: 51cf98f2
✅ Verified (new API / feature) — this PR adds new API and a test that references it in the same project, so reverting the fix un-compiles the test: there is no valid "fails without the fix" baseline to establish (a compile-coupled baseline). The gate instead verified the fix by a clean build + pass with the fix, so this is a real PASS rather than a non-committal INCONCLUSIVE.
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🧪 StrokeShapeTests StrokeShapeTests |
🛠️ BUILD ERROR | ✅ PASS — 94s |
🖥️ Issue31330 Issue31330 |
✅ FAIL — 2399s | ✅ PASS — 642s |
🔴 Without fix — 🧪 StrokeShapeTests: 🛠️ BUILD ERROR · 151s
Error-relevant lines (filtered from the build log):
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/StrokeShapeTests.cs(405,101): error CS1739: The best overload for 'InnerPathForBounds' does not have a parameter named 'includeShapeStroke' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/StrokeShapeTests.cs(421,101): error CS1739: The best overload for 'InnerPathForBounds' does not have a parameter named 'includeShapeStroke' [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/StrokeShapeTests.cs(426,40): error CS0246: The type or namespace name 'IShapeWithStroke' could not be found (are you missing a using directive or an assembly reference?) [/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj]
🟢 With fix — 🧪 StrokeShapeTests: PASS ✅ · 94s
(no coded error found; showing last 1200 chars)
ed TestRectangleConstructor(value: "rectangle") [< 1 ms]
Passed DefaultBorderStrokeShapeRetainsPathInset [1 ms]
Passed TestRoundRectangleSingleValue(value: "20") [< 1 ms]
Passed ReplacingBorderStrokeShapeDoesNotChangeEitherShapesStandaloneGeometry [2 ms]
Passed TestEllipseConstructor(value: "ellipse") [< 1 ms]
Passed TestEllipseConstructor(value: "Ellipse") [< 1 ms]
Passed EllipseWithStrokeInsetsPath [3 ms]
Passed RoundRectangleWithStrokeInsetsInnerPath [< 1 ms]
Passed DynamicStrokeShapeAssignmentsImmediatelyUpdateBorderGeometry [88 ms]
Passed RectangleWithStrokeInsetsPath [< 1 ms]
Passed RectangleUsedAsBorderStrokeShapeRetainsPathInset [< 1 ms]
Passed SharedShapeRetainsBorderGeometryWhenRemovedFromAnotherBorder [< 1 ms]
Passed PolygonChangingStrokeFromNullToNonNullInvalidatesMeasure [1 ms]
Passed RoundRectangleUsedAsBorderShadowShapeWithoutStrokeRetainsInnerPathInset [1 ms]
Passed EllipseWithoutStrokeUsesFullBounds [< 1 ms]
[xUnit.net 00:00:01.70] Finished: Microsoft.Maui.Controls.Core.UnitTests
Passed PolygonChangingStrokeFromNonNullToNullInvalidatesMeasure [< 1 ms]
Test Run Successful.
Total tests: 55
Passed: 55
Total time: 2.2152 Seconds
🔴 Without fix — 🖥️ Issue31330: FAIL ✅ · 2399s
Error-relevant lines (filtered from the build log):
at Microsoft.Maui.TestCases.Tests.UtilExtensions.WaitForGoToTestButtonWithRecovery(IApp app, String timeoutMessage) in /_/src/Controls/tests/TestCases.Shared.Tests/UtilExtensions.cs:line 91
at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 579
at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
🟢 With fix — 🖥️ Issue31330: PASS ✅ · 642s
(no coded error found; showing last 1200 chars)
g test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.13)
[xUnit.net 00:00:00.13] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.42] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 10/15/2026 13:35:56 FixtureSetup for Issue31330(Android)
>>>>> 10/15/2026 13:35:59 RectangleWithSmallHeightRendersAsFilledShape Start
>>>>> 10/15/2026 13:36:03 RectangleWithSmallHeightRendersAsFilledShape Stop
Passed RectangleWithSmallHeightRendersAsFilledShape [3 s]
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue31330.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 20.3951 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue31330.trx
⚠️ Failure Details
- 🛠️ StrokeShapeTests without fix: build failed before tests could run
/home/vsts/work/1/s/src/Controls/tests/Core.UnitTests/StrokeShapeTests.cs(405,101): error CS1739: The best overload for 'InnerPathForBounds' does not have a parameter named 'includeShapeStroke' [/home...
📁 Fix files reverted (14 files)
src/Controls/src/Core/Border/Border.cssrc/Controls/src/Core/Shapes/Ellipse.cssrc/Controls/src/Core/Shapes/Rectangle.cssrc/Controls/src/Core/Shapes/RoundRectangle.cssrc/Controls/src/Core/Shapes/Shape.cssrc/Core/src/Graphics/IShape.cssrc/Core/src/Graphics/MauiDrawable.Android.cssrc/Core/src/Graphics/MauiDrawable.Tizen.cssrc/Core/src/Platform/Android/ContentViewGroup.cssrc/Core/src/Platform/Android/ShapeExtensions.cssrc/Core/src/Platform/Windows/BorderExtensions.cssrc/Core/src/Platform/Windows/ContentPanel.cssrc/Core/src/Platform/iOS/ContentView.cssrc/Core/src/Platform/iOS/MauiCALayer.cs
📋 Pre-Flight — Context & Validation
Pre-Flight Context
PR snapshot: #37319 is open against main, from base 904c03280b833515a5518c49d9c08462a620a152 to submitted head ec971551a0b23c2e506c4fdc14508595aa39f9d7. GitHub reports 140 changed files, 548 additions, 41 deletions, and 8 commits. Its merge state is blocked; the specific blocking reason was not established.
Reported problem
Linked issue #31330 reports that a Rectangle sized approximately 20 × 1.2 inside an AbsoluteLayout renders as a thin horizontal line instead of a filled rectangle, while an equivalently sized BoxView renders correctly. The issue narrative mentions iOS and Android, while its structured affected-platform field and a verification comment specifically identify Android. The reported version is .NET MAUI 9.0.100 SR10 on Android API 35; whether this is a regression and the last working version are unknown.
The submitted explanation attributes the behavior to the default Shape.StrokeThickness of 1: path and measurement calculations reserve that thickness even when Stroke is null. For a 1.2-high rectangle, this leaves approximately 0.2 units for the fill.
Changed mechanism and relevant files
The central change makes stroke inset depend on rendering context:
src/Controls/src/Core/Shapes/Shape.cs- Adds
GetPathStrokeInset(bool includeStroke = false), returning zero whenStrokeis absent unless a consumer explicitly requests stroke-inclusive geometry. - Uses that inset consistently when generating/translating bounded paths and in
MeasureOverride. - Invalidates measure when
Strokechanges between null and non-null. - Implements the new internal
IShapeWithStrokecontract.
- Adds
src/Controls/src/Core/Shapes/Rectangle.csandEllipse.cs- Add internal path overloads accepting the selected inset.
- Standalone fill-only instances use their full arranged bounds; stroked instances retain the inset.
src/Controls/src/Core/Shapes/RoundRectangle.cs- Adds stroke-context-aware bounded and inner-path generation.
src/Core/src/Graphics/IShape.cs- Adds internal
IShapeWithStroke.PathForBounds(bounds, includeStroke). - Extends the internal
IRoundRectangle.InnerPathForBoundscontract withincludeShapeStroke.
- Adds internal
src/Controls/src/Core/Border/Border.cs- Changes the default
StrokeShapefrom one sharedRectangleinstance to a per-Borderdefault-value instance. - This complements the consumer-driven geometry approach and avoids shared mutable shape context.
- Changes the default
Border remains intentionally different from a standalone shape: border drawing and clipping explicitly request stroke-inclusive geometry even if the reused shape itself has no Stroke. This preserves the border’s existing inset while allowing the same shape to use full bounds when rendered standalone.
Platform-sensitive paths
- Android
src/Core/src/Platform/Android/ShapeExtensions.cspreserves the public conversion overload withincludeShapeStroke: falseand adds an internal context-aware overload.src/Core/src/Platform/Android/ContentViewGroup.csrequests stroke-inclusive geometry for border content clipping.src/Core/src/Graphics/MauiDrawable.Android.csrequests stroke-inclusive geometry for border clip paths and full clip paths.- Android density conversion, round-rectangle inner paths, border drawing, and content clipping are therefore directly in scope.
- iOS and Mac Catalyst
src/Core/src/Platform/iOS/ContentView.csandMauiCALayer.csrequest stroke-inclusive border and clip geometry. These paths are relevant to both iOS and Mac Catalyst behavior.
- Windows
src/Core/src/Platform/Windows/BorderExtensions.csandContentPanel.csuse stroke-inclusive paths for border rendering and content clipping, including non-round shapes.
- Tizen
src/Core/src/Graphics/MauiDrawable.Tizen.csdistinguishes border geometry from ordinary shape/clip geometry.
- The shared
Shapemeasurement and path changes are platform-independent, so behavior outside the explicitly modified renderer paths remains relevant.
Test and validation context
Confirmed test-related changes include:
src/Controls/tests/Core.UnitTests/StrokeShapeTests.csadds coverage for:- Unstroked rectangles at heights
1.2,2.0,2.01, and20.0. - Stroked rectangle and ellipse insets.
- Round-rectangle inner paths.
- Null/non-null
Stroketransitions invalidating measure. - Default, dynamically replaced, and shared border stroke shapes.
- Independent standalone versus border geometry.
- Unstroked rectangles at heights
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31330.csadds a screenshot test which waits forIssue31330_labeland captures both the documented fill case and the originalBackgroundColorreproduction.- The PR contains extensive snapshot changes under Android, Mac, WinUI, and iOS directories. A new Android and iOS
RectangleWithSmallHeightRendersAsFilledShape.pngbaseline was directly observed; the complete 140-file snapshot inventory was not enumerated.
Required platform: Android.
Provided Gate evidence: Gate passed, with tests failing without the fix and passing with the submitted fix. This was not rerun.
Android validation should specifically preserve these distinctions:
- A fill-only
Rectangleat the reported fractional height uses its full bounds. - A shape with an actual
Strokestill reserves the configured thickness. - Border drawing and content clipping continue using stroke-inclusive geometry.
- Reusing or replacing a shape does not leak border-specific geometry into standalone rendering.
- Changing
Strokebetween null and non-null causes layout to be remeasured.
Remaining uncertainties
- The supplied diff was explicitly partial, and the full snapshot set was not inspected; this is context gathering, not an exhaustive review.
- The PR description claims validation on Android, Windows, iOS, and Mac, but no independent platform-run or CI evidence was queried beyond the supplied Gate result.
- One current unresolved discussion asks for a direct assertion of the desired size produced by
MeasureOverride; existing visible tests assert path bounds and measure invalidation, but the submitted evidence did not establish whether a desired-size comparison exists elsewhere. - Earlier discussion questioned missing Mac and Windows screenshot baselines. A later duplicate thread was resolved and subsequent commits mention baseline additions, but exact current per-platform baseline completeness was not fully confirmed.
- The linked issue’s attached reproduction artifacts were not inspected. Workaround, regression origin, and last-known-good version remain unknown.
- The reason GitHub currently reports the PR as blocked is unknown.
🔬 Code Review — Deep Analysis
Expert Review — PR #37319
Independent Assessment
What this changes: The submitted fix makes standalone shapes reserve stroke space only when they have an actual Stroke, while allowing Border renderers and clip paths to request stroke-inclusive geometry explicitly. It also gives each Border its own default Rectangle, invalidates measure when stroke presence changes, and adds unit and screenshot coverage for the affected geometry.
Inferred motivation: A fill-only shape with the default StrokeThickness currently loses one logical unit of usable size even though no stroke is drawn. At a requested height such as 1.2, that phantom inset collapses the fill to approximately 0.2.
Review Evidence
- The single required
maui-expert-reviewerpass completed with its normal platform tracing and dimension fanout. inline-findings.jsonwas written and schema-validated as an empty JSON array.- No concrete error, warning, unresolved behavioral mechanism, or prior error-level finding survived expert validation.
- The trusted Android Gate passed: the relevant tests fail without the submitted fix and pass with it. Gate verification was not rerun.
- Full CI state beyond the trusted Gate was not independently established in this phase; this evaluation does not claim that every repository check is complete.
Blast Radius and Failure-Mode Probing
- Fill-only standalone shape: Uses the full arranged bounds because no stroke is rendered.
- Actually stroked shape: Continues to reserve the configured stroke inset.
- Border drawing and clipping: Explicitly request stroke-inclusive geometry and therefore preserve existing border semantics.
- Shared or replaced shape: Consumer-selected geometry avoids storing mutable border context on a shared shape instance; the submitted tests cover standalone and border reuse.
- Dynamic stroke transition: Null/non-null
Stroketransitions invalidate measure so desired size and geometry are recomputed. - Startup/static state: The change introduces no startup path or global mutable state. The per-
Borderdefault shape removes the prior shared default instance.
External Output Contract
Not applicable.
Findings
No actionable findings.
Verdict: LGTM
Confidence: medium
Summary: The submitted mechanism matches the reported failure, preserves the distinct border geometry contract across platform renderers, and is covered by targeted shared and UI tests. The trusted Gate passed and the expert pass found no blocking or discussion-level issue, so the evidence threshold for a reviewer refinement was not met.
🛠️ Try-Fix — Analysis & Comparison
Alternative generation: not requested
Evidence-first mode intentionally omits routine Try-Fix attempts. This is not a failed
attempt, a completed alternative search, or evidence that alternatives have no value.
The expert review may still produce one evidence-backed PR refinement.
📝 PR Finalize — Recommended Title & Description
Assessment: ✏️ Recommend updating — the current title omits the cross-platform Shapes component and describes only Rectangle, while the submitted fix changes shared Shape, Rectangle, Ellipse, RoundRectangle, and Border geometry behavior.
Recommended title
[All] Shapes: Preserve full bounds for unstroked standalone shapes
Recommended description
### Issue Detail
When height is a small non-integer value (for example, `1.2`), a standalone shape renders incorrectly as a thin stroked line instead of a filled shape.
### Root Cause
- `Shape.StrokeThicknessProperty` defaults to `1.0`. The path and measurement logic in `Shape.TransformPathForBounds`, `Shape.MeasureOverride`, `Rectangle.GetPath`, `Ellipse.GetPath`, and `RoundRectangle.GetInnerPath` / `InnerPath` always applied an inset of `StrokeThickness / 2` on each side, even when `Stroke` was `null` and no stroke was rendered.
- For example, a `Rectangle` with `HeightRequest="1.2"` and no `Stroke` still applied the default stroke inset. This consumed `1.0` of the available `1.2` height as a phantom stroke, leaving only a `0.2`-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle.
- `BoxView` is unaffected because it does not have `Stroke` or `StrokeThickness` properties.
- Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same shape would not apply an inset when rendered standalone.
### Description of Change
- Standalone shapes now apply the stroke inset only when their own `Stroke` is present.
- Added an internal `IShapeWithStroke` contract so `Border` renderers can explicitly request stroke-aware geometry.
- Updated Android, iOS, Mac Catalyst, Windows, and Tizen `Border` rendering paths to use the appropriate geometry context.
- Kept the rendering decision with the consumer instead of storing mutable `Border` state on shared `Shape` instances.
- Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each `Border`.
- Updated shared `Shape` measurement and `Rectangle`, `Ellipse`, and `RoundRectangle` path calculations.
### Validated the behavior on the following platforms
- [x] Android
- [x] Windows
- [x] iOS
- [x] Mac Catalyst
### Issues Fixed
Fixes #31330
### Screenshots
| Before | After |
|--------|-------|
| <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
🏁 Report — Final Recommendation
✅ Final Recommendation: APPROVE
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Trusted read-only evidence-first context consumed |
| Expert Review | LGTM (medium) | 0 actionable findings; inline findings persisted |
| Gate | ✅ PASSED | Android; tests fail without the fix and pass with it |
| Try-Fix | Not requested | Intentional evidence-first omission; no alternatives generated |
| Refinement | Not generated | No concrete source/test-backed defect met the refinement threshold |
| Report | ✅ COMPLETE |
Code Review and Candidate Comparison
| Rank | Candidate | Evidence | Result |
|---|---|---|---|
| 1 | pr |
Trusted Gate passed; expert review found no blocking or discussion-level issue | Winner |
The raw submitted PR is the only real candidate. No pr-plus-reviewer patch was implemented because the expert review identified no actionable defect or unresolved behavioral mechanism. Routine Try-Fix alternatives were intentionally not requested, not attempted, and not treated as an exhausted search.
Summary
The submitted fix wins because it addresses the phantom stroke inset while retaining stroke-aware geometry for Border rendering and clipping. The trusted Android Gate validates the submitted candidate, and the expert review produced no inline findings. This recommendation does not assert the state of repository checks outside the supplied Gate evidence.
Root Cause
Shape path and measurement calculations reserved the default StrokeThickness even when Stroke was null. For very small fractional heights, the unused inset consumed nearly all available fill space and made a filled rectangle appear as a thin line.
Fix Quality
The fix keeps geometry selection with the consumer: standalone unstroked shapes use their full bounds, actually stroked shapes retain their inset, and border renderers explicitly request stroke-inclusive paths. Per-instance default border shapes avoid shared mutable context, null/non-null stroke changes invalidate measure, and the submitted tests cover fractional sizes, stroked shapes, border reuse/replacement, and the reported rendering scenario.
📱 UI Tests — Border,Shape,ViewBaseTests
Detected UI test categories: Border,Shape,ViewBaseTests
✅ Deep UI tests — 245 passed, 0 failed, 1 skipped across 3 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
Border |
65/65 ✓ | — |
Shape |
62/62 ✓ | — |
ViewBaseTests |
118/119 (1 skipped) ✓ | — |
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs) |
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis
🧪 CI Analysis — click to expand📊 maui-prNo failures found. 🧪 maui-pr-devicetests
🧪 maui-pr-uitests
Insufficient data — UI coverage: canceled Shell legs and truncated current/history results prevent exhaustive attribution. Publish-step errors report test failures. 🧭 Follow-up — actions and refreshNext action: Inspect unresolved screenshots/crashes and restore complete result collection.
|
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Detail When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle. ### Root Cause - Shape.StrokeThicknessProperty defaults to 1.0. The path and measurement logic in Shape.TransformPathForBounds, Shape.MeasureOverride, Rectangle.GetPath, Ellipse.GetPath, and RoundRectangle.GetInnerPath / InnerPath always applies an inset of StrokeThickness / 2 on each side, even when Stroke is null and no stroke is actually rendered. - For example, a Rectangle with HeightRequest="1.2" and no Stroke would still apply the default stroke inset. This consumed 1.0of the available 1.2 height as a phantom stroke, leaving only a 0.2-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle. - BoxView is unaffected because it does not have Stroke or StrokeThickness properties. - Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone. ### Description of Change - Standalone Shapes now apply the stroke inset only when their own `Stroke` is present. - Added an internal `IShapeWithStroke` contract so Border renderers can explicitly request stroke-aware geometry. - Updated Android, iOS, Mac Catalyst, Windows, and Tizen Border rendering paths to use the appropriate geometry context. - Kept the rendering decision with the consumer instead of storing mutable Border state on shared Shape instances. - Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each Border. - Updated Rectangle, Ellipse, and RoundRectangle path and measurement calculations. ### Validated the behaviour in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed: Fixes #31330 ### Screenshots | Before | After | |---------|--------| | <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Detail When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle. ### Root Cause - Shape.StrokeThicknessProperty defaults to 1.0. The path and measurement logic in Shape.TransformPathForBounds, Shape.MeasureOverride, Rectangle.GetPath, Ellipse.GetPath, and RoundRectangle.GetInnerPath / InnerPath always applies an inset of StrokeThickness / 2 on each side, even when Stroke is null and no stroke is actually rendered. - For example, a Rectangle with HeightRequest="1.2" and no Stroke would still apply the default stroke inset. This consumed 1.0of the available 1.2 height as a phantom stroke, leaving only a 0.2-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle. - BoxView is unaffected because it does not have Stroke or StrokeThickness properties. - Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone. ### Description of Change - Standalone Shapes now apply the stroke inset only when their own `Stroke` is present. - Added an internal `IShapeWithStroke` contract so Border renderers can explicitly request stroke-aware geometry. - Updated Android, iOS, Mac Catalyst, Windows, and Tizen Border rendering paths to use the appropriate geometry context. - Kept the rendering decision with the consumer instead of storing mutable Border state on shared Shape instances. - Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each Border. - Updated Rectangle, Ellipse, and RoundRectangle path and measurement calculations. ### Validated the behaviour in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed: Fixes #31330 ### Screenshots | Before | After | |---------|--------| | <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Detail When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle. ### Root Cause - Shape.StrokeThicknessProperty defaults to 1.0. The path and measurement logic in Shape.TransformPathForBounds, Shape.MeasureOverride, Rectangle.GetPath, Ellipse.GetPath, and RoundRectangle.GetInnerPath / InnerPath always applies an inset of StrokeThickness / 2 on each side, even when Stroke is null and no stroke is actually rendered. - For example, a Rectangle with HeightRequest="1.2" and no Stroke would still apply the default stroke inset. This consumed 1.0of the available 1.2 height as a phantom stroke, leaving only a 0.2-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle. - BoxView is unaffected because it does not have Stroke or StrokeThickness properties. - Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone. ### Description of Change - Standalone Shapes now apply the stroke inset only when their own `Stroke` is present. - Added an internal `IShapeWithStroke` contract so Border renderers can explicitly request stroke-aware geometry. - Updated Android, iOS, Mac Catalyst, Windows, and Tizen Border rendering paths to use the appropriate geometry context. - Kept the rendering decision with the consumer instead of storing mutable Border state on shared Shape instances. - Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each Border. - Updated Rectangle, Ellipse, and RoundRectangle path and measurement calculations. ### Validated the behaviour in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed: Fixes #31330 ### Screenshots | Before | After | |---------|--------| | <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Detail When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle. ### Root Cause - Shape.StrokeThicknessProperty defaults to 1.0. The path and measurement logic in Shape.TransformPathForBounds, Shape.MeasureOverride, Rectangle.GetPath, Ellipse.GetPath, and RoundRectangle.GetInnerPath / InnerPath always applies an inset of StrokeThickness / 2 on each side, even when Stroke is null and no stroke is actually rendered. - For example, a Rectangle with HeightRequest="1.2" and no Stroke would still apply the default stroke inset. This consumed 1.0of the available 1.2 height as a phantom stroke, leaving only a 0.2-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle. - BoxView is unaffected because it does not have Stroke or StrokeThickness properties. - Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone. ### Description of Change - Standalone Shapes now apply the stroke inset only when their own `Stroke` is present. - Added an internal `IShapeWithStroke` contract so Border renderers can explicitly request stroke-aware geometry. - Updated Android, iOS, Mac Catalyst, Windows, and Tizen Border rendering paths to use the appropriate geometry context. - Kept the rendering decision with the consumer instead of storing mutable Border state on shared Shape instances. - Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each Border. - Updated Rectangle, Ellipse, and RoundRectangle path and measurement calculations. ### Validated the behaviour in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed: Fixes #31330 ### Screenshots | Before | After | |---------|--------| | <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Detail When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle. ### Root Cause - Shape.StrokeThicknessProperty defaults to 1.0. The path and measurement logic in Shape.TransformPathForBounds, Shape.MeasureOverride, Rectangle.GetPath, Ellipse.GetPath, and RoundRectangle.GetInnerPath / InnerPath always applies an inset of StrokeThickness / 2 on each side, even when Stroke is null and no stroke is actually rendered. - For example, a Rectangle with HeightRequest="1.2" and no Stroke would still apply the default stroke inset. This consumed 1.0of the available 1.2 height as a phantom stroke, leaving only a 0.2-pixel-tall fill area. As a result, the rectangle appeared as a thin line instead of a filled rectangle. - BoxView is unaffected because it does not have Stroke or StrokeThickness properties. - Shape geometry is also consumed by `Border`, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone. ### Description of Change - Standalone Shapes now apply the stroke inset only when their own `Stroke` is present. - Added an internal `IShapeWithStroke` contract so Border renderers can explicitly request stroke-aware geometry. - Updated Android, iOS, Mac Catalyst, Windows, and Tizen Border rendering paths to use the appropriate geometry context. - Kept the rendering decision with the consumer instead of storing mutable Border state on shared Shape instances. - Changed the default `Border.StrokeShape` to create a separate `Rectangle` for each Border. - Updated Rectangle, Ellipse, and RoundRectangle path and measurement calculations. ### Validated the behaviour in the following platforms - [x] Android - [x] Windows - [x] iOS - [x] Mac ### Issues Fixed: Fixes #31330 ### Screenshots | Before | After | |---------|--------| | <img src="https://github.com/user-attachments/assets/ed5ef7d2-7324-4855-af8c-69201ea2152f"> | <img src="https://github.com/user-attachments/assets/8ef27d00-0af8-495b-a616-d441d0f0ed22"> |
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Description of Change <!-- Enter description of the fix in this section --> Restore custom Shape implementations of `IShape.PathForBounds` when a renderer requests stroke-aware geometry. **Regression introduced by** [PR #37319 — Fix Rectangle Rendering as a Thin Line for Small Heights](#37319). The supplied reproduction works on MAUI `10.0.120` and fails on `10.0.130` on Android and iOS. **Root cause** That PR introduced the internal `IShapeWithStroke` interface to distinguish standalone shape geometry from Border stroke-aware geometry. Platform renderers were updated to prefer this interface over `IShape.PathForBounds`. Custom Shapes inherit `IShapeWithStroke` from `Shape`, even when they re-implement the public `IShape.PathForBounds` contract. The inherited stroke-aware implementation directly calls the base path-building method, bypassing the custom implementation. Applications cannot re-implement `IShapeWithStroke` because it is internal. In the reported `FieldShape`, the skipped method initializes the fallback width and height used to construct the outline. Without that call, the shape uses incorrect dimensions, producing a malformed outline instead of the expected rounded border and label gap. **Fix** - Dispatch `Shape.IShapeWithStroke.PathForBounds` through `IShape.PathForBounds`, honoring custom implementations. - Preserve the requested stroke context for built-in shapes using the base implementation. - Save and restore that context with `try`/`finally`, including when path generation throws. - Leave RoundRectangle's dedicated implementation unchanged. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #40129 <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Description of Change <!-- Enter description of the fix in this section --> Restore custom Shape implementations of `IShape.PathForBounds` when a renderer requests stroke-aware geometry. **Regression introduced by** [PR #37319 — Fix Rectangle Rendering as a Thin Line for Small Heights](#37319). The supplied reproduction works on MAUI `10.0.120` and fails on `10.0.130` on Android and iOS. **Root cause** That PR introduced the internal `IShapeWithStroke` interface to distinguish standalone shape geometry from Border stroke-aware geometry. Platform renderers were updated to prefer this interface over `IShape.PathForBounds`. Custom Shapes inherit `IShapeWithStroke` from `Shape`, even when they re-implement the public `IShape.PathForBounds` contract. The inherited stroke-aware implementation directly calls the base path-building method, bypassing the custom implementation. Applications cannot re-implement `IShapeWithStroke` because it is internal. In the reported `FieldShape`, the skipped method initializes the fallback width and height used to construct the outline. Without that call, the shape uses incorrect dimensions, producing a malformed outline instead of the expected rounded border and label gap. **Fix** - Dispatch `Shape.IShapeWithStroke.PathForBounds` through `IShape.PathForBounds`, honoring custom implementations. - Preserve the requested stroke context for built-in shapes using the base implementation. - Save and restore that context with `try`/`finally`, including when path generation throws. - Leave RoundRectangle's dedicated implementation unchanged. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #40129 <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
- Maui11Version 11.0.10 (net11 floor; 11.0.0 had dropped effective visibility, 11.0.10 restores it). - SkUiDecimal.FromDouble: .NET 11 converts double to decimal exactly; keep .NET 10's 15 significant digits for screen readers setting decimal steppers (both layers), the numeric entry writing out large doubles and the typed stepper demo's check. - Shapes follow MAUI 11's stroke inset (dotnet/maui#37319): no Stroke, no room for StrokeThickness on net11 (SkUiShapeGeometry.StrokeInset, both layers); a stroke appearing or going re-measures. - MauiApiParityTests: MAUI 11's BoxView.Fill and Editor.ReturnCommand(Parameter) as net11 known gaps. - Tests follow the per-line shape inset; plan and roadmap record the findings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Description of Change <!-- Enter description of the fix in this section --> Restore custom Shape implementations of `IShape.PathForBounds` when a renderer requests stroke-aware geometry. **Regression introduced by** [PR #37319 — Fix Rectangle Rendering as a Thin Line for Small Heights](#37319). The supplied reproduction works on MAUI `10.0.120` and fails on `10.0.130` on Android and iOS. **Root cause** That PR introduced the internal `IShapeWithStroke` interface to distinguish standalone shape geometry from Border stroke-aware geometry. Platform renderers were updated to prefer this interface over `IShape.PathForBounds`. Custom Shapes inherit `IShapeWithStroke` from `Shape`, even when they re-implement the public `IShape.PathForBounds` contract. The inherited stroke-aware implementation directly calls the base path-building method, bypassing the custom implementation. Applications cannot re-implement `IShapeWithStroke` because it is internal. In the reported `FieldShape`, the skipped method initializes the fallback width and height used to construct the outline. Without that call, the shape uses incorrect dimensions, producing a malformed outline instead of the expected rounded border and label gap. **Fix** - Dispatch `Shape.IShapeWithStroke.PathForBounds` through `IShape.PathForBounds`, honoring custom implementations. - Preserve the requested stroke context for built-in shapes using the base implementation. - Save and restore that context with `try`/`finally`, including when path generation throws. - Leave RoundRectangle's dedicated implementation unchanged. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #40129 <!-- Verify the target branch follows the release workflow in docs/ReleaseBranchWorkflow.md. Infrastructure and documentation changes should target the branch where they apply. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Detail
When height is a small non-integer value (e.g., 1.2), the shape renders incorrectly as a thin stroked line instead of a filled rectangle.
Root Cause
Border, which must preserve stroke-aware geometry even when the same Shape would not apply an inset when rendered standalone.Description of Change
Strokeis present.IShapeWithStrokecontract so Border renderers can explicitly request stroke-aware geometry.Border.StrokeShapeto create a separateRectanglefor each Border.Validated the behaviour in the following platforms
Issues Fixed:
Fixes #31330
Screenshots