-
Notifications
You must be signed in to change notification settings - Fork 89
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
Update layoutDirection in calls to ReactNativeIsland::Arrange
#2248
Update layoutDirection in calls to ReactNativeIsland::Arrange
#2248
Conversation
Can you check out #2249 and see if it fixes the paths in the solution file? |
That change resolved the issues with the paths in the solution file. |
@tido64 I ended up removing the web storage module which resolved the codegen-windows issues, and I can build the app successfully when running the app through Visual Studio: However, when running
This appears to be the same error that you got in the comment here. Was wondering if you could repro the same on your end. |
00beb7e
to
e87fa53
Compare
example/package.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert these changes?
winrt::Size size{window.ClientSize().Width / scaleFactor, | ||
window.ClientSize().Height / scaleFactor}; | ||
rootView.Arrange({size, size, winrt::LayoutDirection::Undefined}, {0, 0}); | ||
constraints.MinimumSize = constraints.MaximumSize = size; | ||
constraints.LayoutDirection = winrt::LayoutDirection::LeftToRight; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really odd. I looked at react-native-windows
and cannot see LayoutDirection
being set at all: https://github.com/search?q=repo%3Amicrosoft%2Freact-native-windows+UpdateRootViewSizeToAppWindow&type=code
How does this work upstream? I'm not sure hard-coding left-to-right is the correct thing to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acoates-ms: What's the right fix here? It looks like the playground app hard-codes it to winrt::LayoutDirection::LeftToRight
, but should it be read from somewhere?
Description
In
Main.cpp
, currently the call toReactNativeIsland::Arrange()
is being passed an 'undefined'layoutDirection
. This change modifies theconstraints
object so that thelayoutDirection
is not undefined.When trying to launch an example fabric app in this async-storage branch, I got the following error:
This change resolves this issue so that
layoutDirection
is never set toUndefined
.Platforms affected
Test plan
I initially tried following the below test plan, which I got from the PR adding New Architecture:
However,
yarn windows
would give me the following error:Looking at the generated solution file
Example.sln
, the paths for several of the Project declarations were incorrect - e.gMicrosoft.ReactNative
had the path..\\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj
whereas the correct path is..\\..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj
. After fixing all the instances of this path issue inExample.sln
, the app was able to launch successfully.