react-native-windows 0.0.0-canary.656 → 0.0.0-canary.658

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -217,8 +217,9 @@ void NativeUIManager::AddRootView(ShadowNode &shadowNode, facebook::react::IReac
217
217
  SystraceSection s("NativeUIManager::AddRootView");
218
218
  auto xamlRootView = static_cast<IXamlRootView *>(pReactRootView);
219
219
  XamlView view = xamlRootView->GetXamlView();
220
+ const auto rootTag = shadowNode.m_tag;
220
221
  m_tagsToXamlReactControl.emplace(
221
- shadowNode.m_tag,
222
+ rootTag,
222
223
  winrt::weak_ref<winrt::Microsoft::ReactNative::ReactRootView>(
223
224
  view.as<winrt::Microsoft::ReactNative::ReactRootView>()));
224
225
 
@@ -226,14 +227,16 @@ void NativeUIManager::AddRootView(ShadowNode &shadowNode, facebook::react::IReac
226
227
  view.as<xaml::FrameworkElement>().FlowDirection(
227
228
  I18nManager::IsRTL(m_context.Properties()) ? xaml::FlowDirection::RightToLeft : xaml::FlowDirection::LeftToRight);
228
229
 
229
- m_tagsToYogaNodes.emplace(shadowNode.m_tag, make_yoga_node(m_yogaConfig));
230
+ m_tagsToYogaNodes.emplace(rootTag, make_yoga_node(m_yogaConfig));
230
231
 
231
232
  auto element = view.as<xaml::FrameworkElement>();
232
- Microsoft::ReactNative::SetTag(element, shadowNode.m_tag);
233
+ Microsoft::ReactNative::SetTag(element, rootTag);
233
234
 
234
235
  // Add listener to size change so we can redo the layout when that happens
235
- m_sizeChangedVector.push_back(
236
- view.as<xaml::FrameworkElement>().SizeChanged(winrt::auto_revoke, [this](auto &&, auto &&) { DoLayout(); }));
236
+ m_sizeChangedVector.push_back(view.as<xaml::FrameworkElement>().SizeChanged(
237
+ winrt::auto_revoke, [this, rootTag](auto &&, xaml::SizeChangedEventArgs const &args) {
238
+ ApplyLayout(rootTag, args.NewSize().Width, args.NewSize().Height);
239
+ }));
237
240
  }
238
241
 
239
242
  void NativeUIManager::removeRootView(Microsoft::ReactNative::ShadowNode &shadow) {
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.0.0-canary.656</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.0.0-canary.658</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>8e12ccc82efc6d981ffcefecb70a15504fdf0cb2</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>684db1330d1a3e933274bd80e42e684a78f8e7c4</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -81,6 +81,8 @@ $vsWorkloads = @('Microsoft.VisualStudio.Workload.ManagedDesktop',
81
81
  $vsAll = ($vsComponents + $vsWorkloads);
82
82
 
83
83
  # The minimum VS version to check for
84
+ # Note: For install to work, whatever min version you specify here must be met by the current package available on choco.
85
+ # I.E. Do NOT specify a Preview version here because choco doesn't have VS Preview packages.
84
86
  $vsver = "17.3";
85
87
 
86
88
  # The exact .NET SDK version to check for
@@ -177,16 +179,34 @@ function CheckVS {
177
179
  return $result;
178
180
  }
179
181
 
182
+ function GetVSChannelAndProduct {
183
+ param(
184
+ [string]$VsWhere
185
+ )
186
+
187
+ if ($VsWhere -ne $null) {
188
+ $channelId = & $VsWhere -version $vsver -property channelId;
189
+ $productId = & $VsWhere -version $vsver -property productId;
190
+
191
+ # Channel/product not found, check one more time for pre-release
192
+ if (($channelId -eq $null) -or ($productId -eq $null)) {
193
+ $channelId = & $VsWhere -version $vsver -property channelId -prerelease;
194
+ $productId = & $VsWhere -version $vsver -property productId -prerelease;
195
+ }
196
+
197
+ return $channelId, $productId;
198
+ }
199
+
200
+ return $null, $null;
201
+ }
202
+
180
203
  function InstallVS {
181
204
  $vsWhere = Get-VSWhere;
182
-
183
- if ($vsWhere -ne $null) {
184
- $channelId = & $vsWhere -version $vsver -property channelId;
185
- $productId = & $vsWhere -version $vsver -property productId;
186
- }
205
+
206
+ $channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
187
207
 
188
208
  if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
189
- # No VSWhere / VS_Installer
209
+ # No VSWhere / VS_Installer, try to install
190
210
 
191
211
  EnsureChocoForInstall;
192
212
 
@@ -199,8 +219,12 @@ function InstallVS {
199
219
 
200
220
  $vsWhere = Get-VSWhere;
201
221
 
202
- $channelId = & $vsWhere -version $vsver -property channelId;
203
- $productId = & $vsWhere -version $vsver -property productId;
222
+ $channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
223
+ }
224
+
225
+ # Final check before attempting install
226
+ if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
227
+ throw "Unable to find or install a compatible version of Visual Studio >= ($vsver).";
204
228
  }
205
229
 
206
230
  $vsInstaller = Join-Path -Path (Split-Path -Parent $vsWhere) -ChildPath "vs_installer.exe";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.0.0-canary.656",
3
+ "version": "0.0.0-canary.658",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "12.0.0-alpha.3",
27
27
  "@react-native-community/cli-platform-android": "12.0.0-alpha.3",
28
28
  "@react-native-community/cli-platform-ios": "12.0.0-alpha.3",
29
- "@react-native-windows/cli": "0.0.0-canary.170",
29
+ "@react-native-windows/cli": "0.0.0-canary.171",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "^0.73.0",
32
32
  "@react-native/codegen": "^0.73.0",