Skip to content

Commit a11840b

Browse files
authored
[release/10.0.1xx-sr8] Merge release/10.0.1xx-sr7 into release/10.0.1xx-sr8 (#35810)
<!-- 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! ## Cut-then-merge step 2 of 2 SR8 was cut from `main` at [`e02d6b6dc2`](e02d6b6) (commit "Add gh-aw rerun review scanner (#35685)"). This PR pulls the SR7 stabilization work into SR8 so SR8 contains everything that's in SR7. - **Base:** `release/10.0.1xx-sr8` @ [`e02d6b6dc2`](e02d6b6) - **Merging in:** `release/10.0.1xx-sr7` @ [`9da598b4a1`](9da598b) (PatchVersion bump to 71) - **Merge base:** [`f8cb875e`](f8cb875eee) ("[Testing] The Windows WebView category is removed from CI…" #35335) - **Strategy:** non-fast-forward merge commit (preserves both branches' history) ## Conflict resolution Two trivial conflicts, both resolved by taking the SR8 (`HEAD`) side: | File | Why it conflicted | Resolution | | --- | --- | --- | | [`eng/Versions.props`](https://github.com/dotnet/maui/blob/release/10.0.1xx-sr8/eng/Versions.props) | SR7 bumped `PatchVersion` 70→71 (#35786); SR8 starts at 80 | Keep `PatchVersion=80` (SR8 is the higher patch band) | | `src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs` | Whitespace-only difference (`false; //` vs `false; //`) in two comments | Keep SR8's whitespace | No semantic conflicts. ## Inherited from SR7 26 SR7-only commits land in SR8 via this merge. The source PRs are: <details> <summary>Source PRs (43, deduped by commit)</summary> #35020, #35072, #35092, #35150, #35223, #35299, #35305, #35347, #35356, #35359, #35360, #35421, #35423, #35424, #35425, #35426, #35427, #35428, #35430, #35434, #35441, #35447, #35461, #35480, #35503, #35520, #35521, #35559, #35566, #35585, #35625, #35642, #35664, #35689, #35690, #35691, #35692, #35693, #35694, #35703, #35744, #35768, #35786 Includes the SR7 revert chain: - #35689 — Revert PR #30068 (FontImageSource centering on Windows) - #35694 — Revert TalkBack RadioButton fix - #35703 — Revert Shell.NavBarIsVisible fix - #35744 — Revert HybridWebView WebView fix - #35461, #35503 — additional Android reverts </details> After this lands, the release-readiness tracker can survey `release/10.0.1xx-sr8` directly instead of using `-Candidate -InheritFromPriorSr` mode against SR7.
2 parents 3acbbc9 + 9e73985 commit a11840b

145 files changed

Lines changed: 2825 additions & 783 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎eng/Versions.props‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<Project>
22
<PropertyGroup>
3-
<!-- The .NET product branding version -->
3+
<!-- The .NET product branding version -->
44
<MajorVersion>10</MajorVersion>
55
<MinorVersion>0</MinorVersion>
66
<PatchVersion>80</PatchVersion>
77
<SdkBandVersion>10.0.100</SdkBandVersion>
8-
<PreReleaseVersionLabel>ci.main</PreReleaseVersionLabel>
9-
<PreReleaseVersionLabel Condition="'$(BUILD_SOURCEBRANCH)' == 'refs/heads/inflight/current'">ci.inflight</PreReleaseVersionLabel>
8+
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
109
<PreReleaseVersionIteration>
1110
</PreReleaseVersionIteration>
1211
<!-- Essentials.AI preview versioning — bump this for new AI previews -->
1312
<EssentialsAIPreviewVersionIteration>1</EssentialsAIPreviewVersionIteration>
1413
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
1514
<IsServicingBuild Condition=" '$(PreReleaseVersionLabel)' == 'servicing' ">true</IsServicingBuild>
1615
<!-- Enable to remove prerelease label and produce stable package versions. -->
17-
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
16+
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
1817
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
1918
<WorkloadVersionSuffix Condition="'$(DotNetFinalVersionKind)' != 'release' and '$(PreReleaseVersionIteration)' == ''">-$(PreReleaseVersionLabel)</WorkloadVersionSuffix>
2019
<WorkloadVersionSuffix Condition="'$(WorkloadVersionSuffix)' == '' and '$(DotNetFinalVersionKind)' != 'release'">-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</WorkloadVersionSuffix>

‎src/Compatibility/Core/src/Android/CollectionView/TemplatedItemViewHolder.cs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ protected override void OnSelectedChanged()
3131
return;
3232
}
3333

34-
VisualStateManager.GoToState(View, IsSelected
35-
? VisualStateManager.CommonStates.Selected
36-
: VisualStateManager.CommonStates.Normal);
34+
View.IsItemSelected = IsSelected;
3735
}
3836

3937
public void Recycle(ItemsView itemsView)

‎src/Compatibility/Core/src/Windows/CollectionView/ItemContentControl.cs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ internal void UpdateIsSelected(bool isSelected)
187187
if (formsElement == null)
188188
return;
189189

190-
VisualStateManager.GoToState(formsElement, isSelected
191-
? VisualStateManager.CommonStates.Selected
192-
: VisualStateManager.CommonStates.Normal);
190+
formsElement.IsItemSelected = isSelected;
193191
}
194192

195193
void OnViewMeasureInvalidated(object sender, EventArgs e)

‎src/Compatibility/Core/src/iOS/CollectionView/TemplatedCell.cs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,7 @@ void UpdateVisualStates()
295295

296296
if (element != null)
297297
{
298-
VisualStateManager.GoToState(element, Selected
299-
? VisualStateManager.CommonStates.Selected
300-
: VisualStateManager.CommonStates.Normal);
298+
element.IsItemSelected = Selected;
301299
}
302300
}
303301
}

‎src/Compatibility/Core/src/iOS/Renderers/UIContainerCell.cs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,7 @@ void UpdateVisualState()
107107
{
108108
if (BindingContext is BaseShellItem baseShellItem && baseShellItem != null)
109109
{
110-
if (baseShellItem.IsChecked)
111-
VisualStateManager.GoToState(View, "Selected");
112-
else
113-
VisualStateManager.GoToState(View, "Normal");
110+
View.IsItemSelected = baseShellItem.IsChecked;
114111
}
115112
}
116113

‎src/Controls/src/Core/BindableObject.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,19 @@ public bool IsSet(BindableProperty targetProperty)
208208
return bpcontext.Values.GetSpecificity() != SetterSpecificity.DefaultValue;
209209
}
210210

211+
/// <summary>
212+
/// Determines whether a bindable property has been set by a local value, style, binding, or other non-default specificity.
213+
/// Unlike IsSet, default-value creation does not count as explicit.
214+
/// </summary>
215+
/// <param name="targetProperty">The bindable property to check if a value is explicitly set.</param>
216+
/// <returns><see langword="true"/> if the target property exists and has been explicitly set. Otherwise <see langword="false"/>.</returns>
217+
/// <exception cref="ArgumentNullException">Thrown when <paramref name="targetProperty"/> is <see langword="null"/>.</exception>
218+
internal bool IsSetExplicitly(BindableProperty targetProperty)
219+
{
220+
var bpcontext = GetContext(targetProperty ?? throw new ArgumentNullException(nameof(targetProperty)));
221+
return bpcontext is not null && bpcontext.Values.GetSpecificity() != SetterSpecificity.DefaultValue;
222+
}
223+
211224

212225
/// <summary>
213226
/// Removes a previously set binding from a bindable property.

‎src/Controls/src/Core/Border/Border.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ SafeAreaRegions ISafeAreaView2.GetSafeAreaRegionsForEdge(int edge)
457457
/// <inheritdoc cref="ISafeAreaView2.SafeAreaInsets"/>
458458
Thickness ISafeAreaView2.SafeAreaInsets { set { } } // Default no-op implementation for borders
459459

460+
/// <inheritdoc cref="ISafeAreaView2.HasExplicitSafeAreaEdges"/>
461+
bool ISafeAreaView2.HasExplicitSafeAreaEdges => IsSetExplicitly(SafeAreaEdgesProperty);
462+
460463
/// <summary>
461464
/// Provides the default value for the <see cref="SafeAreaEdges"/> property.
462465
/// </summary>

‎src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,6 +1123,19 @@ async Task UpdateFormsInnerNavigation(Page pageBeingRemoved)
11231123
[Internals.Preserve(Conditional = true)]
11241124
internal bool ShouldPopItem(UINavigationBar _, UINavigationItem __)
11251125
{
1126+
// Call ContentPage.SendBackButtonPressed() directly (not via NavPage.SendBackButtonPressed())
1127+
// to avoid triggering NavigationPage.OnBackButtonPressed → SafePop(), which would
1128+
// pop the MAUI stack while ShouldPopItem returns false (blocking UIKit's pop),
1129+
// causing a UIKit VC / MAUI navigation stack desync.
1130+
// Note: This bypasses NavigationPage subclass overrides of OnBackButtonPressed.
1131+
// Using _ignorePopCall to suppress SafePop was considered, but OnBackButtonPressed
1132+
// returns true for both "page handled it" and "SafePop handled it", making it
1133+
// impossible to distinguish cancellation from normal pop in ShouldPopItem.
1134+
if (NavPage?.CurrentPage?.SendBackButtonPressed() == true)
1135+
{
1136+
_uiRequestedPop = false;
1137+
return false;
1138+
}
11261139
_uiRequestedPop = true;
11271140
return true;
11281141
}

‎src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutRecyclerAdapter.cs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,7 @@ void UpdateVisualState()
308308
{
309309
if (Element is BaseShellItem baseShellItem && baseShellItem != null)
310310
{
311-
if (baseShellItem.IsChecked)
312-
VisualStateManager.GoToState(View, "Selected");
313-
else
314-
VisualStateManager.GoToState(View, "Normal");
311+
View.IsItemSelected = baseShellItem.IsChecked;
315312
}
316313
}
317314

‎src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellToolbarTracker.cs‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,23 +484,23 @@ protected virtual async void UpdateLeftBarButtonItem(Context context, AToolbar t
484484
icon = _flyoutIconDrawerDrawable;
485485
}
486486

487-
if (icon == null && (_flyoutBehavior == FlyoutBehavior.Flyout || (CanNavigateBack && backButtonVisible)))
487+
if (icon == null && (_flyoutBehavior == FlyoutBehavior.Flyout || CanNavigateBack))
488488
{
489489
_drawerArrowDrawable ??= new DrawerArrowDrawable(context.GetThemedContext());
490490
icon = _drawerArrowDrawable;
491491
defaultDrawerArrowDrawable = true;
492492
}
493493

494-
icon?.Progress = (CanNavigateBack && backButtonVisible) ? 1 : 0;
494+
icon?.Progress = (CanNavigateBack) ? 1 : 0;
495495

496-
if (command != null || (CanNavigateBack && backButtonVisible))
496+
if (command != null || CanNavigateBack)
497497
{
498498
_drawerToggle.DrawerIndicatorEnabled = false;
499499

500500
if (backButtonVisibleFromBehavior && (backButtonVisible || !defaultDrawerArrowDrawable))
501501
toolbar.NavigationIcon = icon;
502502
}
503-
else if (_flyoutBehavior == FlyoutBehavior.Flyout || (!defaultDrawerArrowDrawable && backButtonVisible))
503+
else if (_flyoutBehavior == FlyoutBehavior.Flyout || !defaultDrawerArrowDrawable)
504504
{
505505
bool drawerEnabled = isEnabled && icon != null;
506506
_drawerToggle.DrawerIndicatorEnabled = drawerEnabled;
@@ -516,7 +516,6 @@ protected virtual async void UpdateLeftBarButtonItem(Context context, AToolbar t
516516
else
517517
{
518518
_drawerToggle.DrawerIndicatorEnabled = false;
519-
toolbar.NavigationIcon = null;
520519
}
521520

522521
_drawerToggle.SyncState();
@@ -571,7 +570,7 @@ protected virtual void UpdateToolbarIconAccessibilityText(AToolbar toolbar, Shel
571570
else if (image == null ||
572571
toolbar.SetNavigationContentDescription(image) == null)
573572
{
574-
if (CanNavigateBack && _toolbar?.BackButtonVisible == true)
573+
if (CanNavigateBack)
575574
toolbar.SetNavigationContentDescription(Resource.String.nav_app_bar_navigate_up_description);
576575
else
577576
toolbar.SetNavigationContentDescription(Resource.String.nav_app_bar_open_drawer_description);

0 commit comments

Comments
 (0)