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

Multiple XamlRoots improvements #8978

Open
7 of 66 tasks
MartinZikmund opened this issue Jun 6, 2022 · 0 comments
Open
7 of 66 tasks

Multiple XamlRoots improvements #8978

MartinZikmund opened this issue Jun 6, 2022 · 0 comments
Assignees
Labels
difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding epic kind/enhancement New feature or request

Comments

@MartinZikmund
Copy link
Member

MartinZikmund commented Jun 6, 2022

What would you like to be added:

  • Determine whether InvalidateParentMeasureDirtyPath and InvalidateParentArrangeDirtyPath should use VisualTree.GetParent as fallback? feat: Enable multiple XamlRoots #8612 (comment)
  • Enable drag and drop for multiple XamlRoots (see TODO in WpfDragDropExtension.cs - but will require changes on all platforms), choose proper XamlRoot in DropUITarget.cs (related fix: Fix DragDrop not working properly with multi window #16583)
  • Add proper implementation for IXamlMetadataProvider and IXamlMetadataContainer members to Uno.UI.XamlHost.XamlApplication class.
  • Pointer capture should capture the proper pointer type (mouse vs. pen vs. touch) (see dev/mazi/wip-wpf-capture) - as part of this also remove Capture methods from ICoreWindowExtension in favor of just using IPointerExtension
  • Skia rendering - InvalidateRender - ensure invalidation is performed only for dirty rects
  • Focus management support for non-CoreWindow XAML roots + we need to make sure that when the UnoXamlHost loses focus, focus is changed in the XamlRoot as well [focus]
  • DependencyObjectExtensions.GetVisualTree and SetVisualTree should work on non-UIElements as well
  • Adjust XamlRoot to support multiple windows ([windows] in XamlRoot.cs)
  • Find a way to avoid using MetadataProviderDiscovery.MetadataProviderFactory
  • UnoXamlHostBase.Layout.cs IsXamlContentLoaded parent is not set the same as in UWP
  • Find out how to avoid the need for UpdateUnoSize() method in UnoXamlHostBase.Layout.cs
  • Undo Uno specific approach in UnoTypeFectory.cs CreateXamlContentByType
  • XamlRoot setter should work if XamlRoot property is still null (UIElement.cs XamlRoot property)
  • DiscoverMetadataProviders was yield breaking after finding a Application type, why? [Question] Why break after Application type found? CommunityToolkit/Microsoft.Toolkit.Win32#347
  • Unify and move Arrange and Measure invalidation code to use XamlRoot on all targets (e.g. #ifs in UIElement.Layout.netstd.cs)
  • Investigate if there is a better way to associate target host InvalidateRender with XamlRoot (currently happening on Window.Activated for CoreWindow roots)
  • FrameIdProvider should be in sync with actual frame rendering (should increase on each render)
  • Refactor HostPointerHandler in WPF runtime
  • Refactor inputs to simplify them, see feat: Enable multiple XamlRoots #8612 (comment)
  • Get rid of CoreWindowContentRootSet and find a better way to notify about assigned XamlRoot (for both CoreWindow and XamlIslands)
  • Determine whether the ditochomy of XamlRoot and GetOrCreateXamlRoot makes sense in ContentRoot and VisualTree
  • Cleanup three first lines of code in UnoXamlHostBase.host.cs InitializeHost - they are required to properly initialize the application for islands use cases, but can't stay like this when we support multiple windows.
  • Pointer handling going through CoreWindow is tricky and messy - https://github.com/unoplatform/uno/pull/8612/commits/ee8df80b3a92d916e0e8b7e36b1ba9d32e7548db\
  • XamlRoot.Content currently supports only one window and its content for islands may not match UWP
  • Adjust VisualTree.GetPopupRootForElement code to support XamlRoot
  • Restore When_PlacementTarget_Binding when popups will be fully supported
  • Tabbing out of an island to the parent app should be possible

Updated

  • Unsubscribe from ApplicationView events on Window close in UnoGtkWindow and UnoWpfWindow
  • Enable UWP-style new window via WUX AppWindow and add this to samples app
  • Transition all targets to use non-CoreWindow windows in WinUI branch (Window.cs constructor)
  • Invalidate and render each composition root independently
  • Avoid having Dispatcher.Main and DispatcherQueue.Main
  • Avoid Window.CurrentSafe reference in BackdropMaterial.cs based on updated WinUI sources
  • Avoid using CoreWindow in FrameBuffer Uno.Templates Program.cs
  • The events of Window should be changed to TypedEventHandlers on MUX source tree
  • Avoid using CoreWindowActivationState in MUX source tree in favor of WindowActivationState
  • Ensure EnteredBackground and LeavingBackground is raised in a platform agnostic way and respects multiwindow environment
  • CoreWindow should not use WindowChrome (see ContentManager.cs)
  • Verify whether we can use the same ScheduleInvalidateMeasureOrArrange(invalidateMeasure: true); for WASM in XamlRoot.crossruntime.cs or we need to keep the WASM-specific implementation
  • Avoid __IOS__ specific workaround in ContentManager.cs (resetting the Frame after content changes)
  • XamlRoot.Size and Bounds should forward to VisualTree.Size and VisualTree.Bounds and they should have aligned meaning Properly align window bounds and visible bounds readings #13975
  • Add multi-XamlRoot support for drag and drop #13982
  • Avoid using Window.CurrentSafe in FocusManager.wasm
  • Add a way to identify which window is currently focused (active - should match the activation state)
  • Get rid of all usages of GtkHost.InitialWindow and NativeWindowShown
  • Get rid of all usages of WpfHost.InitialWindow and NativeWindowShown
  • Empty Current Window Bounds if it's not Loaded #13118
  • Window_SetBackground sample should apply to actual displayed Window not Window.Current
  • Install snooper only once and route to currently focused window for GtkKeyboardInputSource.cs
  • WpfDisplayInformationExtension should get DPI per window
  • Re-enable commented out Given_Flyout tests
  • Windows must be correctly cleaned up when closed and their XamlRoot collected
  • Closing last window must terminate the application
  • Window Bounds must be non-empty even before activation

Why is this needed:

For which Platform:

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

Anything else we need to know?

@MartinZikmund MartinZikmund added kind/enhancement New feature or request epic difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding labels Jun 6, 2022
@MartinZikmund MartinZikmund self-assigned this Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/challenging 🤯 Categorizes an issue for which the difficulty level is reachable with internals understanding epic kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant