Skip to content

refactor!: Remove native-only FeatureConfiguration flags - #23600

Merged
Xiaoy312 merged 23 commits into
feature/breakingchangesfrom
dev/xygu/20260629/2052-remove-native-feature-flags
Jun 30, 2026
Merged

Xiaoy312 merged 23 commits into
feature/breakingchangesfrom
dev/xygu/20260629/2052-remove-native-feature-flags

Conversation

@Xiaoy312

@Xiaoy312 Xiaoy312 commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: Part of #8339

PR Type:

🔄 Refactoring (no functional changes, no api changes)

⚠️ This PR contains breaking changes (public API removals). See the migration note below.

What changed? 🚀

Uno Platform 7.0 drops the native UI renderers (native Android View, iOS/tvOS UIView, WASM DOM). This PR hard-removes every FeatureConfiguration flag that existed only to tune those native renderers, and inlines the surviving Skia/WinUI behavior at each call site. With the native heads gone, these flags configured code paths that no longer compile in any shipping assembly — misleading API surface that is shed in the 7.0 clean break.

Cross-target / legacy flags (those with a Skia #else branch, or unconditional flags) are explicitly out of scope here and handled separately.

Flags removed (one refactor! commit each, three grouped where atomic)

Native-symbol-only (deleted; native call sites collapsed):

  • ComboBox.AllowPopupUnderTranslucentStatusBar
  • FrameworkElement.AndroidUseManagedLoadedUnloaded
  • FrameworkElement.InvalidateNativeCacheOnRemeasure
  • FrameworkElement.IOsAllowSuperviewNeedsLayoutWhileInLayoutSubViews
  • Popup.UseNativePopup
  • ListViewBase.AnimateScrollIntoView
  • NativeListViewBase.{RemoveItemAnimator, ForceRecycleOnDrop, UseNativeSnapHelper}
  • PointerRoutedEventArgs.AllowRelativeTimeStamp
  • TextBox.UseLegacyInputScope
  • ScrollViewer.AndroidScrollbarFadeDelay
  • UIElement.UseLegacyClipping
  • UIElement.AlwaysClipNativeChildren
  • WebView.ForceSoftwareRendering
  • NativeFramePresenter.AndroidUnloadInactivePages
  • DatePicker.UseLegacyStyle
  • TimePicker.UseLegacyStyle
  • TimePickerFlyout.UseLegacyTimeSetting
  • CommandBar.AllowNativePresenterContent
  • AppBarButton.EnableBitmapIconTint
  • NavigationView.EnableUno19516Workaround

Present on the Skia/Reference public surface (default inlined; PackageDiffIgnore.xml entries added):

  • Cursors.UseHandForInteraction — the "hand" cursor for interactive controls is now always used.
  • WebView2.IsInspectable — was an obsolete alias; use WebView2.EnableDevTools instead.
  • AndroidSettings.IsEdgeToEdgeEnabled — edge-to-edge is now unconditional on Skia-Android (EdgeToEdge.Enable(...) inlined in ApplicationActivity.OnCreate).

Empty container classes are kept to avoid additional type-removal API breaks. The one orphaned *.Android.cs consumer of a removed flag (NativeWindowWrapper.Android.cs, which read AndroidSettings.IsEdgeToEdgeEnabled, uncompiled) is collapsed to the always-on edge-to-edge path so no dead flag reference lingers; the remaining orphaned *.Android.cs/*.iOS.cs files are left for the broader native-drop cleanup.

Migration

The migration guide (doc/articles/migrating-to-uno-7.md) lists every removed flag with its replacement/behavior. In short: delete the calls — behavior is the unified Skia/WinUI behavior; for WebView2.IsInspectable, switch to WebView2.EnableDevTools. Feature-flag prose in the docs was trimmed accordingly.

PR Checklist ✅

  • 🧪 Existing Popup/Flyout/MenuFlyout/ContentDialog runtime tests and samples updated to drop the removed native-only branches (no new behavior to test — this is a removal).
  • 📚 Docs updated (feature-flags.md, migrating-to-uno-7.md, control docs, sample prose).
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

Breaking change impact & migration path: Public API removals of the FeatureConfiguration members listed above. These flags only affected the now-removed native renderers; apps on Skia get the unified WinUI behavior. Remove any calls to the removed members (and switch WebView2.IsInspectable → WebView2.EnableDevTools). For codebases targeting both pre-7.0 and 7.0, guard the calls with #if. Full per-flag guidance is in doc/articles/migrating-to-uno-7.md.

Validation

  • ✅ Uno.UI.Skia (net10.0) — build succeeded, 0 warnings / 0 errors (primary gate).
  • ✅ Uno.UI.Reference (net10.0) — build succeeded, 0 / 0.
  • ✅ XamlStyler format check on the two changed SamplesApp XAML files — PASS.
  • ✅ Unit tests — 4001 passed / 23 skipped; the 13 failures are pre-existing, host-culture/ICU-dependent When_Calendar date-format assertions, unrelated to this change (diff touches no globalization code).
  • ⏳ Mobile-Skia heads (Android/iOS, which compile the #if __APPLE_UIKIT__/#if __ANDROID__ sample & test edits) not built locally — Android restore hit a pre-existing workload issue and iOS needs a Mac; relying on CI for those TFMs.

Xiaoy312 and others added 3 commits June 29, 2026 16:06
Native-only (#if __ANDROID__) FeatureConfiguration flag tuning the
dropped Android native renderer. No call sites; absent from the Skia
public surface.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Remove the native-only (#if __ANDROID__) FeatureConfiguration flags
FrameworkElement.AndroidUseManagedLoadedUnloaded and
InvalidateNativeCacheOnRemeasure, which tuned the dropped Android native
renderer. Drop the Android-only Given_Grid.When_Grid_Remeasure test that
exercised the measure-cache flag (uno#12315), and its now-unused
Uno.Disposables using.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…nLayoutSubViews

Native-only (#if __APPLE_UIKIT__) FeatureConfiguration flag tuning the
dropped iOS/UIKit native renderer. No call sites; absent from the Skia
public surface.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions github-actions Bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Jun 29, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260629/2052-remove-native-feature-flags branch from e95eec4 to 3d11af4 Compare June 29, 2026 22:06
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 220188 did not find any UI Test snapshots differences.

Comment thread doc/articles/features/cursors.md Resolved
Comment thread doc/articles/migrating-to-uno-7.md Resolved
Xiaoy312 and others added 2 commits June 30, 2026 11:48
Native-only (#if __ANDROID__) FeatureConfiguration flag that chose the
Android native popup over the managed PopupRoot. With the native
renderer dropped, managed popups (PopupRoot) are the only path.

Collapse the Android-gated call sites: drop the native-popup toggle from
the ContentDialog_TextBox sample (code-behind + android:CheckBox), the
runtime tests, and neutralize FeatureConfigurationHelper.UseNativePopups
to a no-op.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Native-only (#if __APPLE_UIKIT__ || __ANDROID__) FeatureConfiguration
flag tuning native list scrolling. No call sites; absent from the Skia
public surface.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260629/2052-remove-native-feature-flags branch from 3d11af4 to a7d3f39 Compare June 30, 2026 15:56
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 220268 has failed on Uno.UI - CI.

@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260629/2052-remove-native-feature-flags branch from a7d3f39 to 414ed1b Compare June 30, 2026 17:10
Xiaoy312 and others added 8 commits June 30, 2026 14:05
Remove the native-only (#if __ANDROID__) NativeListViewBase
FeatureConfiguration class and its RemoveItemAnimator, ForceRecycleOnDrop
and UseNativeSnapHelper flags, which tuned the dropped Android
UnoRecyclerView. Neutralize FeatureConfigurationHelper.UseListViewAnimations
to a no-op and drop its now-unused MSTest using.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Native-only (#if __ANDROID__) FeatureConfiguration flag tuning Android
pointer timestamp conversion. No call sites; absent from the Skia public
surface (the empty container class is removed too).

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Native-only (#if __ANDROID__) FeatureConfiguration flag toggling the
legacy Android hardware-keyboard InputScope validation. No call sites;
absent from the Skia public surface.

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Native-only (#if __ANDROID__) FeatureConfiguration flag tuning the
Android native scrollbar thumb fade delay. Drop the lone assignment in
the SamplesApp test bootstrap (keeping the adjacent ExtendViewIntoTitleBar
setup).

Part of #2052.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Xiaoy312 and others added 9 commits June 30, 2026 14:05
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Edge-to-edge is now unconditional on Skia-Android.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@Xiaoy312
Xiaoy312 force-pushed the dev/xygu/20260629/2052-remove-native-feature-flags branch from f3146ac to 302ddd9 Compare June 30, 2026 18:05
@Xiaoy312
Xiaoy312 enabled auto-merge June 30, 2026 18:06
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 220293 did not find any UI Test snapshots differences.

1 similar comment
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 220293 did not find any UI Test snapshots differences.

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 220293 has failed on Uno.UI - CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 220322 did not find any UI Test snapshots differences.

@Xiaoy312
Xiaoy312 merged commit dc9c206 into feature/breakingchanges Jun 30, 2026
69 checks passed
@Xiaoy312
Xiaoy312 deleted the dev/xygu/20260629/2052-remove-native-feature-flags branch June 30, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/documentation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants