Repository navigation
Fixing DataContext checks in PopupBase - #2053
Conversation
|
Why did you strike out the tests ? :) You can validate that behavior in all platforms. |
I will try to replicate it and provide a test ! |
|
/azp run |
71898ff to
1589d25
Compare
|
I added a sample to demonstrate the behavior. I wrote a test but it is failing because of an issue in wasm where the flyout is not displayed on first click. |
|
/azp run |
|
If the test works on iOS/Android, you can commit the test for those platforms (See ActiveConfigurationAttribute) then look for the wasm one afterwards. |
Doing it right now in a separate PR then :D |
The legacy Binding.IgnoreINPCSameReferences flag defaulted to false on all targets and was never assigned by the framework, so the binding engine always took the correct INPC path. Delete the flag (and its now empty FeatureConfiguration.Binding holder) and inline the always-false branch at the three consumer sites in BindingPath.BindingItem.cs. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The legacy FrameworkElement.UseLegacyHitTest flag defaulted to false on all targets and was never assigned by the framework, so IsViewHit() always returned false (the WinUI-aligned behavior). Delete the flag and collapse FrameworkElement.IsViewHit() to `=> false`. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
UIElement.ShowClippingBounds was an orphaned diagnostic flag with zero consumers anywhere in the tree (the iOS-only visualization it once gated is gone). Delete the flag; setting it was already a no-op. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag was already get-only (compile-time constant true), so the animation engine always defaulted the starting value from the animated value via GetValueCore(). Delete the flag (and its now-empty FeatureConfiguration.Timeline holder), inline GetValueCore(), and drop the dead private GetNonAnimatedValue wrapper whose only caller was the removed legacy branch. The protected Timeline.GetNonAnimatedValue base method is kept (subclass-facing surface). Source-breaking for consumers reading the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so VisualStateGroup always applied setters at the WinUI-correct time (after the transition). Delete the flag (and its now-empty FeatureConfiguration.VisualState holder), remove the dead early-apply branch, and make the post-transition ApplyTargetStateSetters() call unconditional. The compatibility-mode runtime test that flipped the flag to true and asserted the legacy ordering is deleted (it exercised removed behaviour). Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so SetUpdateControlTemplate() always updated the template eagerly (the `!UseLegacyLazyApplyTemplate` term was permanently true). Delete the flag and collapse SetUpdateControlTemplate to unconditionally call UpdateTemplate()/InvalidateMeasure(). Its `forceUpdate` parameter only mattered in the removed legacy path, so it is dropped and the one caller updated. The two Given_Control unit tests existed solely to exercise the legacy lazy sequence (asserting TemplatedRoot stays null until ApplyTemplate); they assert removed behaviour, so the file is deleted. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so DataTemplateHelper always fell back to the two-arg SelectTemplate(data, container) overload (WinUI-aligned). Delete the flag (and its now-empty FeatureConfiguration.DataTemplateSelector holder) and drop the flag term from the fallback condition. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so the Position of ManipulationStarted/Delta/Completed routed event args was always container-relative (WinUI-aligned). Delete the flag (and its now-empty FeatureConfiguration.ManipulationRoutedEventArgs holder) and inline the container-relative transform at the three call sites. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so PrepareManagedGestureEventBubbling always fell through to the specific-event prevention logic (the correct behaviour). Delete the flag and the dead CompleteGesture early-out that only ran when the flag was set. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Both flags defaulted to true on all targets and were never assigned by the framework, so the measure/arrange dirty-path was always used globally. Delete the flags and drop the flag term from the layout conditions. The legacy full-propagation `else` branches are intentionally kept: they remain reachable per-element through the still-supported FrameworkElementHelper.SetUseMeasurePathDisabled/SetUseArrangePathDisabled API (IsMeasureDirtyPathDisabled / IsArrangeDirtyPathDisabled), which is out of scope for this flag removal. Also rewrites the four <see cref> doc-comments in FrameworkElementHelper that referenced the removed flags (would otherwise be dangling / CS1574), and drops the obsolete global-flag toggles from the two UIElement layout samples (their per-element dirty-path demo and perf test are kept). Source-breaking for consumers reading/assigning the flags; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag's sole consumer sits under #if !UNO_HAS_ENHANCED_LIFECYCLE, so it is never read on Skia or WASM (removal is a true no-op there). Its default was platform-conditional (false on native Android/Apple, true otherwise), which made the observable behaviour a compile-time property, not a runtime one: - native Android/Apple: OnApplyTemplate applied immediately; - reference / unit-test flavor: deferred while !IsLoaded. Replace the runtime flag test with that same #if __ANDROID__ || __APPLE_UIKIT__ split so both behaviours are preserved exactly, and delete the flag. Verified: Uno.UI.Skia (compiled out) and Uno.UI.UnitTests / reference (#else deferred path) build clean. The native #if branch is the verbatim prior else-body. No runtime behaviour change. Package-diff entries added. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework, so Popup.IsLightDismissEnabled already defaulted to false (WinUI-aligned). Delete the flag, pin the Popup default value to false, and remove the dead AutoSuggestBox workaround that only ran when the flag was set. Drops the corresponding feature-flags.md section. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The flag defaulted to false on all targets and was never assigned by the framework (SamplesApp set it to false explicitly), so the Skia-based TextBox (_isSkiaTextBox) was always used. Delete the flag, then inline _isSkiaTextBox as the constant true it had become: fold every guard, unwrap the always-taken branches, and delete the unreachable !_isSkiaTextBox branches in TextBox(.skia/.pointers.skia).cs and TextBoxView.skia.cs. In the shared TextBox.cs the #if __SKIA__ guards turn into inverted #if !__SKIA__ guards where the folded branch runs only on native, so native (WASM/Android/UIKit) behaviour is unchanged; OnKeyDownNonSkia, now unreachable on Skia, moves under #if !__SKIA__. The IOverlayTextBoxViewExtension layer is intentionally kept: it is still required for the invisible native text view (IME) on WASM-Skia and UIKit-Skia, gated by _useInvisibleNativeTextView independently of the removed flag. Tearing that extension layer down is native-overlay work that belongs with epic unoplatform#2049's native drop. Tests: removed the flag save/restore no-ops; deleted the overlay-only When_FeatureConfiguration_Changes test; dropped the overlay case from the parameterized AutoSuggestBox test; simplified the Skia selection-start assertions to the skia-textbox value. Source-breaking for consumers reading/assigning the flag; no runtime behaviour change. Package-diff entries added for the removed public API. Part of unoplatform#2053 (remove legacy feature flags, 7.0 breaking changes). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The PackageDiff IgnoreSet baseVersion must be the latest stable version published on NuGet, not the version the PR will produce. 6.6 is not on NuGet yet, so the diff tool cannot resolve a baseline package for it and the relocation ignores never apply. Move the 22 type-relocation entries from the 6.6 IgnoreSet to 6.5. The pre-existing 6.6 FeatureConfiguration entries (#2053) have the same problem but are out of scope here. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GKBgQoAmRmaFoXXZr93iLB
PR Type
What is the current behavior?
When a PopupBase Child has it's DataContextProperty set to null it is considered a valid value.
What is the new behavior?
Both null and UnsetValue are considered empty values
PR Checklist
Please check if your PR fulfills the following requirements:
Docs have been added/updated which fit documentation template (for bug fixes / features)Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)Wasm UI Tests are not showing unexpected any differences. Validate PRScreenshots Compare Test Runresults.Updated the Release NotesInternal Issue (If applicable):
164452