-
Notifications
You must be signed in to change notification settings - Fork 2k
[Mac] Fixed the Issue with the TitleBar TrailingContent not being properly aligned #36541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,17 @@ internal static void IgnoreLayoutSafeArea(this Layout layout) | |
| { | ||
| IgnoreLayoutSafeArea(childLayout); | ||
| } | ||
| else if (child is IContentView contentView) | ||
|
Ahamed-Ali marked this conversation as resolved.
Ahamed-Ali marked this conversation as resolved.
Ahamed-Ali marked this conversation as resolved.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — This only handles
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Logic and Correctness — The new Concrete gap: Consider adding a recursive helper so that when static void IgnoreContentViewSafeArea(IContentView contentView)
{
var inner = contentView.PresentedContent ?? contentView.Content;
if (inner is Layout innerLayout)
IgnoreLayoutSafeArea(innerLayout);
else if (inner is IContentView innerContentView)
IgnoreContentViewSafeArea(innerContentView);
}
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — This only processes
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — The traversal is still rooted on
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness / Layer Placement — The new
TrailingContent = new Border { Content = new StackLayout { Children = { new Label { Text = "Trailing" } } } }
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Raw bytes of the added lines (verified with
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — the recursion still terminates at any non-
This is why the added UI test passes:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
❌ [major] Architectural Layer / Cross-Platform Consistency — The root entry point was not updated, so a non- All three call sites are guarded by an
This PR teaches the walker to step through <TitleBar.TrailingContent>
<Border>
<HorizontalStackLayout>...</HorizontalStackLayout>
</Border>
</TitleBar.TrailingContent>is silently a no-op — The fix is incomplete/asymmetric: either change the extension to accept
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness / Safe Area — The new Concrete failing scenario (a small variation of this PR's own repro): TrailingContent = new HorizontalStackLayout {
Children = {
new Border { Content = new Border { Content = new StackLayout { ... } } }
}
}Outer Recommendation: replace the type-specific static void IgnoreSafeAreaCore(IView? view)
{
switch (view)
{
case Layout layout:
layout.IgnoreSafeArea = true;
foreach (var child in layout.Children)
IgnoreSafeAreaCore(child);
break;
case IContentView cv:
IgnoreSafeAreaCore((cv.PresentedContent ?? cv.Content) as IView);
break;
}
}
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[critical] Logic and Correctness — This traversal only descends one
The added HostApp repro (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
❌ Error — [critical] Logic and Correctness / Layout Safe Area: the walk still only re-enters through Concrete failing scenarios:
The fix only covers the exact one-level
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — The traversal still terminates on nested content-view chains. The new branch only recurses when the content view's content is a Concrete failing scenario (same shape as #29516, one level deeper): TrailingContent = new HorizontalStackLayout {
Children = { new Border { Content = new ContentView { Content = new StackLayout {
Children = { new Label { Text = "TrailingContent" } } } } } }
};
Suggested shape: make the walk element-typed rather than layout-typed, so static void IgnoreSafeAreaForView(IView? view)
{
if (view is Layout layout)
{
layout.IgnoreSafeArea = true;
foreach (var child in layout.Children)
IgnoreSafeAreaForView(child as IView);
}
else if (view is IContentView contentView)
{
IgnoreSafeAreaForView((contentView.PresentedContent ?? contentView.Content) as IView);
}
}
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness Verification — The traversal is extended one hop deep, but the three entry points that call it are still gated on |
||
| { | ||
| if (contentView.PresentedContent is Layout presentedLayout) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Safe Area / Logic and Correctness — This only handles the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Safe Area and Window Insets — The recursion stops unless the immediate
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — Recursion terminates at the first non-
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — Traversal terminates at the first Both branches require TrailingContent = new HorizontalStackLayout {
Children = { new Border { Content = new ContentView { Content = new StackLayout { /* ... */ } } } }
}
Secondary issue on the Also note this helper permanently mutates user-owned content and is never reverted when the slot is cleared or the subtree is reparented (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Both new branches require the content to be a Concrete failure modes (all valid
TrailingContent = new HorizontalStackLayout { // IgnoreSafeArea = true
Children = { new Border { // IContentView -> PresentedContent = inner Border
Content = new Border { // not a Layout -> recursion stops here
Content = new StackLayout { ... } // IgnoreSafeArea stays false
} } } }
Suggested shape: recurse on the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Handler Mapper and Property Patterns / Logic and Correctness — this walk is a one-shot executed from the
This produces order-dependent behavior (works in the codebehind sample added here, silently no-ops for XAML/templated content). Consider applying the walk on child-added / content-changed / handler-connect instead of only at assignment time.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
❌ [critical] Logic and Correctness / Layout — Recursion terminates on the first non- This branch only descends when <TitleBar.TrailingContent>
<HorizontalStackLayout>
<Border>
<ContentView> <!-- Border.PresentedContent == this ContentView -->
<Grid>...</Grid> <!-- never reached -->
</ContentView>
</Border>
</HorizontalStackLayout>
</TitleBar.TrailingContent>
The traversal should be a single generic recursion that handles static void IgnoreSafeArea(IView? view)
{
switch (view)
{
case Layout layout:
layout.IgnoreSafeArea = true;
foreach (var child in layout.Children)
IgnoreSafeArea(child);
break;
case IContentView contentView:
IgnoreSafeArea((contentView.PresentedContent ?? contentView.Content as IView));
break;
}
}As written, the fix is scoped to exactly the one shape covered by the new test (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Safe Area — The fix descends past the intermediate content view without neutralizing that node's own safe-area participation. Result: for Recommendation: when the intermediate node implements
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Logic and Correctness — The
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Handler Mapper and Property Patterns — This walk is one-shot:
If this walk is meant to be authoritative, it needs to re-run on descendant changes (e.g. on
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness Verification — Recursion terminates when an |
||
| { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Complexity / hygiene — The added block uses malformed mixed indentation: line 17 is
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Complexity Reduction — Mechanical cleanups on the new block: lines 20-26 are indented with a leading space followed by tabs (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Complexity Reduction — Indentation is inconsistent with the rest of the file and will not survive |
||
| IgnoreLayoutSafeArea(presentedLayout); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Backward Compatibility / Logic and Correctness — the walk permanently mutates a user-owned public (obsolete) property and never restores it. Previously the blast radius was "direct Failure mode: a user builds a reusable
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Safe Area / Handler Lifecycle — This traversal runs exactly once, synchronously, from Same class of gap for children appended to a titlebar layout after assignment (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Native Platform Defaults Preservation / Backward Compatibility — This helper mutates user-owned objects by force-setting the obsolete public This PR widens the blast radius of that asymmetry: previously only Either make it symmetric (clear the flag on the outgoing value in the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggestion — [moderate] Handler Mapper and Property Patterns / lifecycle: this is a one-shot snapshot taken at Failing scenario:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — This propagation runs exactly once, at |
||
| } | ||
| else if (contentView.Content is Layout contentLayout) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — The new traversal only unwraps one
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Logic and Correctness — This
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Logic and Correctness — Concrete scenario: a Suggested shape: var content = contentView.PresentedContent ?? contentView.Content as IView;and then walk
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Concrete failure: a Please confirm the intended lifecycle, or move the walk to a point where the content tree is realized (e.g. on descendant-added / handler-connect) rather than a one-shot property-changed pass.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Logic and Correctness —
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a templated Both references should be visited (deduplicated by reference equality), not chained with
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Logic and Correctness Verification — |
||
| { | ||
| IgnoreLayoutSafeArea(contentLayout); | ||
| } | ||
| } | ||
|
Comment on lines
+17
to
+27
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Diff hygiene — This change removes the trailing newline from a previously well-formed file ( |
||
| } | ||
| } | ||
| } | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Build & MSBuild — This change deletes the trailing newline at end of file (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Build & MSBuild hygiene — This edit drops the trailing newline at end of file (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Build & MSBuild — mechanical formatting issues introduced by this hunk that will trip the format/whitespace check rather than being a style preference: line 17 is indented with spaces instead of a tab, lines 20–26 carry a stray leading space before their tabs, and the trailing newline at end of file was removed (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 [minor] Build & Formatting — Two mechanical issues introduced by this hunk that
Running
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggestion — [minor] Build: the added block mixes leading spaces and tabs (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[minor] Complexity Reduction — The trailing newline was removed from the end of the file ( |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| namespace Maui.Controls.Sample.Issues; | ||
|
|
||
| [Issue(IssueTracker.Github, 29516, "Issue with the TitleBar TrailingContent not being properly aligned on macOS", PlatformAffected.macOS)] | ||
| public class Issue29516 : ContentPage | ||
| { | ||
| TitleBar _titleBar; | ||
| public Issue29516() | ||
| { | ||
| Content = new VerticalStackLayout | ||
| { | ||
| Children = | ||
| { | ||
| new Label | ||
| { | ||
| Text = "This is a test for the TitleBar TrailingContent alignment issue on macOS.", | ||
| AutomationId="ContentLabel", | ||
| } | ||
| } | ||
| }; | ||
| _titleBar = new TitleBar | ||
| { | ||
| Title = ".NET MAUI", | ||
| BackgroundColor = Colors.Blue, | ||
| HeightRequest = 50, | ||
| Content = new SearchBar | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — The repro is built entirely in the object initializer, so all children exist before |
||
| Placeholder = "TitleBar Content", | ||
| PlaceholderColor = Colors.White, | ||
| BackgroundColor = Colors.Blue, | ||
| MaximumWidthRequest = 300, | ||
| HorizontalOptions = LayoutOptions.Fill, | ||
| VerticalOptions = LayoutOptions.Center | ||
| }, | ||
|
Ahamed-Ali marked this conversation as resolved.
|
||
| TrailingContent = new HorizontalStackLayout | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — The repro page exercises exactly one shape:
Adding those two slots to this same page would make the screenshot baseline discriminate between "safe-area ignored everywhere in the title bar" and "safe-area ignored only for the one-level-deep case". As written, a future regression that re-narrows the traversal to the one covered shape would still pass. Minor test-robustness note (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This page builds
Per the MAUI regression guidance, a bug fix should enumerate and cover the adjacent scenarios, not just the reported one — most reverts come from the neighbouring case. Please extend this page (or add sibling cases) so the test suite would actually catch the gaps above.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — The repro wraps the |
||
| { | ||
| Spacing = 8, | ||
| Margin = new Thickness(4), | ||
| Children = | ||
| { | ||
| new Border | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention — coverage only exercises the single nesting shape the new The changed method is
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention — The repro exercises only the single shape the fix happens to handle: Recommendation: add a fast unit test (Controls.Core.UnitTests) that builds a nested tree and asserts
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 Suggestion — [moderate] Regression Prevention and Test Coverage: the repro exercises exactly one shape — |
||
| { | ||
| Content = new StackLayout | ||
| { | ||
| VerticalOptions = LayoutOptions.Center, | ||
| BackgroundColor = Colors.Red, | ||
| Children = | ||
| { | ||
| new Label { Text = "TrailingContent" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention —
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — The reproduction subtree that the fix is supposed to correct carries no |
||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| } | ||
|
|
||
| protected override void OnAppearing() | ||
| { | ||
| base.OnAppearing(); | ||
|
|
||
| if (Window is not null) | ||
| { | ||
| Window.TitleBar = _titleBar; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage —
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — |
||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #if MACCATALYST || WINDOWS | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
💡 [minor] Platform Scoping / Test Cost — The test is compiled for The production change only sets If the Windows coverage is intentional (guarding against a cross-platform regression), a one-line comment saying so would be helpful; otherwise consider narrowing to Also a nit: this file uses 4-space indentation while the rest of
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Cross-Platform Behavioral Consistency — The issue is scoped to macOS (the HostApp page declares |
||
| // TitleBar is only available on Mac Catalyst and Windows. https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/titlebar?view=net-maui-9.0 | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue29516 : _IssuesUITest | ||
| { | ||
| public Issue29516(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "Issue with the TitleBar TrailingContent not being properly aligned on macOS"; | ||
|
|
||
| [Test] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention and Test Coverage — The only coverage for this fix is a screenshot comparison, which is both currently unrunnable (see baseline size mismatch below) and non-discriminating: a screenshot diff cannot tell a reviewer why it changed, and if it ever regresses the usual remedy is re-recording the baseline, which silently erases the regression signal. The changed code ( [Fact]
public void IgnoreLayoutSafeAreaRecursesThroughContentViews()
{
var inner = new StackLayout { Children = { new Label() } };
var root = new HorizontalStackLayout { Children = { new Border { Content = inner } } };
root.IgnoreLayoutSafeArea();
Assert.True(inner.IgnoreSafeArea);
}Please add the unit test covering the exact nesting from #29516 (and, per the finding on |
||
| [Category(UITestCategories.Window)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention and Test Coverage — The production change is pure shared, platform-agnostic C# ( A
Per the repo's test-type preference (unit > device > UI), please add the unit test; the screenshot test can stay as a visual smoke check once its baseline is validated. |
||
| public void TitleBarTrailingContentShouldRenderProperly() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention and Test Coverage — The behavior changed here is pure shared managed code in
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Gestures / Regression Prevention — The test's precondition does not cover what it claims to verify. |
||
| { | ||
| App.WaitForElement("ContentLabel"); | ||
|
Ahamed-Ali marked this conversation as resolved.
Ahamed-Ali marked this conversation as resolved.
Ahamed-Ali marked this conversation as resolved.
Ahamed-Ali marked this conversation as resolved.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — This waits for
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention — The test waits for
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention — the test's precondition is not verified. Give the trailing
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please give the trailing content an
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention / Test Coverage — The test does not verify its own precondition. Recommendation: give the trailing-content label an
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention / Gestures-style precondition verification — The test's only synchronization point is Two consequences: (a) the screenshot can be taken while the title bar content is still settling, which is a plausible contributor to the 1.59% diff and to future flakiness; (b) the assertion cannot discriminate the bug — the page-body label renders identically whether or not the Give the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There is also no
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[critical] Regression Prevention and Test Coverage — This test does not currently demonstrate the bug or the fix. Gate evidence (Mac Catalyst, |
||
| VerifyScreenshot(includeTitleBar: true); | ||
|
Ahamed-Ali marked this conversation as resolved.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[moderate] Regression Prevention and Test Coverage — The recommended fix is to add VerifyScreenshot(includeTitleBar: true, retryTimeout: TimeSpan.FromSeconds(5));
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention and Test Coverage — This test does not discriminate the fix. Per the pipeline gate run (
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[critical] Regression Prevention and Test Coverage — The gate is a definitive failure on this assertion:
Given the traversal gap flagged on
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
❌ Error — [critical] Regression Prevention and Test Coverage: this test does not discriminate the fix, per the gate run on Mac Catalyst:
Two separate problems:
As submitted, CI cannot be green and the change is unverified.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
[major] Regression Prevention and Test Coverage — The committed Mac baseline cannot match what this call captures, so the test fails regardless of the fix. Re-record both baselines from an actual |
||
| } | ||
| } | ||
| #endif | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[major] Safe Area — This only handles
IContentViewnodes afterIgnoreLayoutSafeArea(Layout)has already been entered.TitleBarstill starts suppression with(newValue as Layout)?.IgnoreLayoutSafeArea()for its Leading/Content/Trailing slots, so a slot whose root is anIContentViewbut not aLayout(for exampleTrailingContent = new Border { Content = new StackLayout(...) }) never reaches this new recursion and the inner layout keeps obeying the title-bar safe area. Please add an entry point that handlesIView/IContentViewroots and call that from the TitleBar property changed handlers.