Commit d7ba35e
[0.82] cherry pick: Overflow Parity and fix xaml popup positioning 15557,15338 (#15663)
* Overflow implementation in Fabric as per Parity to Paper (#15338)
* Implement overflow property support for Fabric architecture
* Change files
* Subject: ETW Provider Registration - Route to Existing 1DS Aria Tenant
Hi OSG Instrumentation Team,
I'm working on React Native Windows telemetry. We currently have:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EXISTING (working):
- JavaScript CLI telemetry via 1DS SDK
- Instrumentation Key: 49ff6d3ef12f4578a7b75a2573d9dba8-026332b2-2d50-452f-ad0d-50f921c97a9d-7145
- Data flows to: Aria → Kusto
- Kusto cluster: [YOU NEED TO TELL ME THIS]
NEW (want to add):
- Native C++ telemetry via ETW/TraceLogging
- Provider Name: Microsoft.ReactNativeWindows.Telemetry
- Provider GUID: [WILL GENERATE]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
QUESTION:
Can you register the new ETW provider GUID and route it to the SAME
Aria tenant as our existing 1DS instrumentation key?
Goal: Have both JavaScript (1DS) and C++ (ETW) telemetry appear in
the same Kusto database for unified querying.
Is this possible? If yes, what info do you need from me?
Thanks,
Harini Malothu
React Native Windows Team
* Remove overflowTest.tsx - will attach separately in PR
* Address review comment: make variables const
* Ensure visual is created before accessing m_contentVisual
* Fix formatting issues
* Fix E2E crash: use try_as instead of as for IVisualInterop
* Implement overflow:hidden with lazy m_contentVisual creation
- Only create m_contentVisual when overflow:hidden is set (performance optimization)
- Reparent children when m_contentVisual is created/removed
- Use try_as instead of as for IVisualInterop to prevent crashes
- Properly handle border radii for clipping
* Fix crash: use try_as for IVisualInterop
* Implement overflow clipping with m_contentVisual and try_as fix
* Fix crash: use try_as in ComponentView::updateClippingPath
* Implement lazy m_contentVisual creation for memory efficiency
* Fix crash: skip m_contentVisual creation for custom builder visuals
* Add null check for m_visual in applyShadowProps to prevent crash
* Fix build: Use Visual() instead of m_visual in ComponentView::applyShadowProps
* Fix E2E crash: Remove assert in Visual() that crashes before initialization
* Fix E2E: Make m_contentVisual truly lazy - only create for overflow:hidden
- Remove ensureContentVisual() calls from VisualToMountChildrenInto() and MountChildComponentView()
- m_contentVisual is now only created in updateLayoutMetrics when getClipsContentToBounds() is true
- Add null check in onThemeChanged() before accessing Visual()
- Restore original ensureVisual() call in MountChildComponentView()
* feat: Implement overflow:hidden for Fabric using on-demand children container
Implement proper overflow:hidden clipping for the Fabric Composition renderer,
matching iOS/Android behavior. Instead of clipping m_visual directly (which
also clips borders and background), a dedicated m_childrenContainer visual is
created on-demand as a child of m_visual, and only children are clipped.
Visual Tree (with overflow:hidden):
m_outerVisual
m_visual (background, opacity, transform, border-radius clip)
Border Visuals x N
m_childrenContainer (created on demand, clipped to bounds)
<children>
Key design decisions:
- m_childrenContainer is created lazily only when overflow:hidden is set
- Existing children are moved from m_visual into m_childrenContainer
- Once created, m_childrenContainer is never destroyed (clip is just removed
if overflow changes back to visible)
- Clipping uses outer border radii via D2D path geometry, matching iOS
- ScrollView overrides updateChildrenClippingPath as no-op since it manages
its own visual tree via m_scrollVisual and inherently clips content
Also cleans up:
- Removed unnecessary null-checks on Visual() (ensureVisual guarantees it)
- Removed shadow mask workaround code (not related to overflow)
- Removed InsetClip-based overflow handling from updateProps
- Added assert(m_visual) in Visual() accessor
- Simplified updateClippingPath to only handle border-radius clipping
* Move shadow to OuterVisual, use RelativeSizeWithOffset for children container
* lint,format fixes
* update e2e snapshots for overflow changes
* Revert "update e2e snapshots for overflow changes"
This reverts commit 5e07f75.
* update e2e snapshots for overflow changes
---------
Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
Co-authored-by: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com>
* Fix XAML popup positioning and light dismiss in ScrollView (#15557) (#15564)
* Fix XAML popup positioning and light dismiss in ScrollView (#15557)
- Add SetXamlRoot() API on ContentIslandComponentView for 3rd party XAML components
- Add DismissPopups() using VisualTreeHelper.GetOpenPopupsForXamlRoot()
- Fire LayoutMetricsChanged on scroll to update popup positions
- Dismiss child ContentIsland popups when scroll begins
- Add ComboBox sample component demonstrating the pattern
- Add xamlPopupBug test sample for playground-composition
* Change files
* Fix XAML popup positioning and light dismiss in ScrollView (#15557)
- Set LocalToParentTransformMatrix synchronously before Connect() to fix initial position
- Fire LayoutMetricsChanged on scroll to update position after scrolling
- Add DismissPopupsRequest event for 3P components to implement light dismiss
- Update ComboBox sample to use event-based approach (core remains XAML-agnostic)
* Fix XAML popup positioning - convert to DIPs and update synchronously
Issue #15557: Fix popup positioning for XAML controls in ScrollView
Bug 1 (Position Fix):
- Convert getClientRect() physical pixels to DIPs by dividing by pointScaleFactor
- LocalToParentTransformMatrix expects logical pixels (DIPs), not physical pixels
- Update transform synchronously instead of async to avoid race conditions
- Set initial transform in OnMounted() before Connect()
Bug 2 (Light Dismiss Fix):
- Add DismissPopupsRequest event for 3P components to handle popup dismissal
- ScrollView fires event when scroll begins via DismissChildContentIslandPopups()
- Core remains XAML-agnostic - 3P components handle their own popups
* Apply clang-format
* Revert IDL formatting, keep only DismissPopupsRequest event
* Change files
* Optimize light dismiss: register during mount instead of tree walk on scroll
* docs: fix broken markdown links in pipeline (#15594)
* docs: fix broken markdown links
* Address reviewer feedback
* Remove obsolete docs and clean conflict markers
* Delete managedCodeGen.md
---------
Co-authored-by: Protik Biswas <protikbiswas@microsoft.com>
Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
* Bring Narrator focus to XAML island (#15611)
* Use automationoption as frameworkbased for childsite
* Change files
* remove tokens associated with fragment based
* Fix IDL: only add events without formatting changes
* Address review: replace fake LayoutMetricsChanged with ViewChanged event, move light dismiss to 3P component
Addresses acoates-ms review comments:
1. Replace FireLayoutMetricsChangedForScrollPositionChange with proper ViewChanged
event on ScrollViewComponentView (similar to XAML ScrollViewer.ViewChanged)
2. Remove DismissPopupsRequest from ContentIslandComponentView - light dismiss
logic moved to ComboBoxComponentView which walks parent tree on mount
3. ContentIslandComponentView subscribes to ViewChanged for transform updates
4. 3P component (ComboBox) subscribes to ViewChanged for popup dismiss
* Apply formatting fixes and add ComboBox codegen
* Fix syntax error: use correct codegen type ComboBoxEventEmitter::OnSelectionChanged
---------
Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
Co-authored-by: Suraj Raykar <168889106+ssuraj2504@users.noreply.github.com>
Co-authored-by: Protik Biswas <protikbiswas@microsoft.com>
Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
* Apply clang-format
---------
Co-authored-by: Nitin Chaudhary <nitchaudhary@microsoft.com>
Co-authored-by: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com>
Co-authored-by: Suraj Raykar <168889106+ssuraj2504@users.noreply.github.com>
Co-authored-by: Protik Biswas <protikbiswas@microsoft.com>
Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>1 parent 4e7874c commit d7ba35e
28 files changed
Lines changed: 1502 additions & 51 deletions
File tree
- change
- packages
- e2e-test-app-fabric/test/__snapshots__
- playground
- Samples
- windows/playground-composition
- sample-custom-component
- src
- windows/SampleCustomComponent
- codegen/react/components/SampleCustomComponent
- vnext/Microsoft.ReactNative
- Fabric/Composition
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| |||
1107 | 1114 | | |
1108 | 1115 | | |
1109 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
1110 | 1124 | | |
1111 | 1125 | | |
1112 | 1126 | | |
| |||
0 commit comments