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

Enable wrapping of NavigationView/TabView like controls #3581

Open
kmelmon opened this issue Nov 1, 2019 · 3 comments
Open

Enable wrapping of NavigationView/TabView like controls #3581

kmelmon opened this issue Nov 1, 2019 · 3 comments

Comments

@kmelmon
Copy link
Contributor

kmelmon commented Nov 1, 2019

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.

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Nov 1, 2019
@chrisglein chrisglein added this to the vNext Milestone 5 milestone Nov 4, 2019
@chrisglein chrisglein removed the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Nov 4, 2019
@chrisglein
Copy link
Member

This is a hard design problem and we don't have an immediate customer that requires this. We need to figure this out, but it can wait a bit (and closer to WinUI3 may help)

@kmelmon
Copy link
Contributor Author

kmelmon commented Nov 27, 2019

@jonthysell I thought you should be aware of this issue as you dig into custom view managers. I did some digging into this issue with @sayzenberg and we determined there may be a way to solve this, but it's complicated, and would have an impact on custom view managers. Feel free to chat with me more.

@asklar
Copy link
Member

asklar commented Apr 10, 2021

This could be the root cause for asklar/react-native-xaml#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants