Skip to content

Fixing DataContext checks in PopupBase - #2053

Merged
MakanWG merged 2 commits into
masterfrom
dev/pako/fix-popupbase
Nov 14, 2019
Merged

MakanWG merged 2 commits into
masterfrom
dev/pako/fix-popupbase

Conversation

@MakanWG

@MakanWG MakanWG commented Nov 8, 2019

Copy link
Copy Markdown
Contributor

PR Type

  • Bugfix

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:

  • Tested code with current supported SDKs
  • 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 PR Screenshots Compare Test Run results.
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Internal Issue (If applicable):
164452

@jeromelaban

Copy link
Copy Markdown
Member

Why did you strike out the tests ? :) You can validate that behavior in all platforms.

@carldebilly
carldebilly self-requested a review November 9, 2019 18:42
@MakanWG

MakanWG commented Nov 11, 2019

Copy link
Copy Markdown
Contributor Author

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 !

@carldebilly

Copy link
Copy Markdown
Member

/azp run

@MakanWG
MakanWG force-pushed the dev/pako/fix-popupbase branch from 71898ff to 1589d25 Compare November 14, 2019 19:06
@gitpod-io

gitpod-io Bot commented Nov 14, 2019

Copy link
Copy Markdown

@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Nov 14, 2019
@MakanWG

MakanWG commented Nov 14, 2019

Copy link
Copy Markdown
Contributor Author

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.
I will provide the branch with the test separately for testing/repro and to be merged once the issue is resolved.

@MakanWG

MakanWG commented Nov 14, 2019

Copy link
Copy Markdown
Contributor Author

/azp run

@jeromelaban

Copy link
Copy Markdown
Member

If the test works on iOS/Android, you can commit the test for those platforms (See ActiveConfigurationAttribute) then look for the wasm one afterwards.

@MakanWG
MakanWG merged commit 78b1b70 into master Nov 14, 2019
@MakanWG
MakanWG deleted the dev/pako/fix-popupbase branch November 14, 2019 21:50
@MakanWG

MakanWG commented Nov 14, 2019

Copy link
Copy Markdown
Contributor Author

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

ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
ramezgerges pushed a commit to ramezgerges/uno that referenced this pull request Jul 8, 2026
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]>
MartinZikmund added a commit that referenced this pull request Jul 14, 2026
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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants