microsoft / microsoft/react-native-windows
Enable wrapping of NavigationView/TabView like controls
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
This issue was discovered by Office folks when they attempted to wrap the XAML TwoPaneView. The issue occurs when you have this sort of arrangement:
[WrappedControl] [Component /] [etc] [/WrappedControl]
In this situation, the WrappedControl runs layout in XAML which flexbox has no knowledge of. Inside the WrappedControl are react-native components which need flexbox to layout correctly. This doesn't currently work because flexbox is "stomping over" the properties that XAML is supposed to be in control of.
We know of several WinUI controls that behave similarly to TwoPaneView (NavigationView and TabView). So this will be a general problem moving forward if we want to wrap those types of controls.
There does appear to be a way to resolve the conflict - we'd need to let XAML participate in the overall layout process and override flexbox when necessary. Note that this solution would need to take the upcoming Fabric change into consideration - in that world, layout is running off of the UI thread, so letting XAML override becomes more difficult.
This issue is tracking solving this general problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how wrapped XAML controls and React Native flexbox participate in layout, using the TwoPaneView arrangement described in the issue. Compare the requirements for NavigationView and TabView, then account for Fabric layout running off the UI thread. Done means these controls can wrap React Native children without XAML-controlled properties being overwritten.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- desktop, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100