Skip to content
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

chore: ITemplatedParentProvider removal (backport #18443) #18457

Merged

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 13, 2024

GitHub Issue (If applicable): n/a

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

What is the new behavior?

follow-up of #17645
removing ITemplatedParentProvider and relevant codegen in DOGenerator, replaced with direct implementations in DOStore.
add a few more tests against regressions found in the tp rework.
ninja-fix: native Frame not being initialized.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

With changes from this PR and #17645, there are a few notable changes to the templated-parent system:

  1. DO::TemplatedParent dependency property, ::OnTemplatedParentChanged(e), and DOStore.SetTemplatedParent(FrameworkElement) are fully deprecated. They are no longer called by the Uno framework, and should not be used anymore. They are, however, still temporarily kept in v5.5.0 to avoid binary changes until next major version.
  2. Access to the templated-parent, can now be made through the following code:
    // within uno.ui assembly
    DependencyObject DependencyObjectExtensions.GetTemplatedParent(this DependencyObject @do);
    void DependencyObjectExtensions.SetTemplatedParent(this DependencyObject @do, DependencyObject tp);
    DependencyObject FrameworkElement.GetTemplatedParent();
    void FrameworkElement.GetTemplatedParent(DependencyObject tp);
    // outside uno
    (do_or_fe as IDependencyObjectStoreProvider)?.Store.GetTemplatedParent2(); // note: the -2 suffix here is to distinguished between the old deprecated method.
    //(do_or_fe as IDependencyObjectStoreProvider)?.Store.SetTemplatedParent2(null); // you shouldnt need this
  3. override to OnTemplatedParentChanged, should be replaced by OnLoaded()(within uno.ui assembly) or FE.Loaded += ...(outside uno).
    This is an automatic backport of pull request chore: ITemplatedParentProvider removal #18443 done by Mergify.

Xiaoy312 and others added 4 commits October 13, 2024 04:07
@mergify mergify bot mentioned this pull request Oct 13, 2024
6 tasks
@github-actions github-actions bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/code-generation Categorizes an issue or PR as relevant to code generation labels Oct 13, 2024
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18457/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18457/index.html

@nventive-devops
Copy link
Contributor

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

@jeromelaban jeromelaban merged commit e0a3158 into release/stable/5.5 Oct 13, 2024
108 of 109 checks passed
@jeromelaban jeromelaban deleted the mergify/bp/release/stable/5.5/pr-18443 branch October 13, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation Categorizes an issue or PR as relevant to code generation platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants