react-native-windows 0.65.6 → 0.65.7
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.
- package/CHANGELOG.json +28 -1
- package/CHANGELOG.md +14 -4
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +3 -5
- package/Microsoft.ReactNative/ReactRootView.cpp +28 -3
- package/Microsoft.ReactNative/ReactRootView.h +6 -0
- package/Microsoft.ReactNative/Version.rc +1 -1
- package/Microsoft.ReactNative/Views/RootViewManager.cpp +8 -9
- package/PropertySheets/Autolink.props +1 -1
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,34 @@
|
|
|
2
2
|
"name": "react-native-windows",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 01 Nov 2021 19:07:04 GMT",
|
|
6
|
+
"tag": "react-native-windows_v0.65.7",
|
|
7
|
+
"version": "0.65.7",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Fix race condition when building customer projects",
|
|
12
|
+
"author": "dannyvv@microsoft.com",
|
|
13
|
+
"commit": "b376766f3a64bcdaef810c8d065ddead2e361840",
|
|
14
|
+
"package": "react-native-windows"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"comment": "Fix Microsoft.ReactNative.dll version string",
|
|
18
|
+
"author": "asklar@microsoft.com",
|
|
19
|
+
"commit": "73ad2b8c3467aaab54fc49e316c219f3a9fc7892",
|
|
20
|
+
"package": "react-native-windows"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"comment": "Fix crash when using TextInput.blur()",
|
|
24
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
25
|
+
"commit": "b2cdb561fc91f81181a1e6d1edf9056dba6e0f01",
|
|
26
|
+
"package": "react-native-windows"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Wed, 20 Oct 2021 19:14:28 GMT",
|
|
6
33
|
"tag": "react-native-windows_v0.65.6",
|
|
7
34
|
"version": "0.65.6",
|
|
8
35
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
# Change Log - react-native-windows
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 01 Nov 2021 19:07:04 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.65.
|
|
7
|
+
## 0.65.7
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Mon, 01 Nov 2021 19:07:04 GMT
|
|
10
10
|
|
|
11
11
|
### Patches
|
|
12
12
|
|
|
13
|
-
- Fix
|
|
13
|
+
- Fix race condition when building customer projects (dannyvv@microsoft.com)
|
|
14
|
+
- Fix Microsoft.ReactNative.dll version string (asklar@microsoft.com)
|
|
15
|
+
- Fix crash when using TextInput.blur() (30809111+acoates-ms@users.noreply.github.com)
|
|
14
16
|
|
|
17
|
+
## 0.65.6
|
|
18
|
+
|
|
19
|
+
Wed, 20 Oct 2021 19:14:28 GMT
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- Fix Arm64 Desktop linker experts due to mangled name mismatches (dannyvv@microsoft.com)
|
|
24
|
+
|
|
15
25
|
## 0.65.5
|
|
16
26
|
|
|
17
27
|
Mon, 11 Oct 2021 15:06:57 GMT
|
|
@@ -163,11 +163,9 @@ struct RootShadowNode final : public ShadowNodeBase {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
void AddView(ShadowNode &child, int64_t index) override {
|
|
166
|
-
auto panel(GetView().as<winrt::
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
panel.Children().InsertAt(static_cast<uint32_t>(index), childView);
|
|
170
|
-
}
|
|
166
|
+
auto panel(GetView().as<winrt::Microsoft::ReactNative::ReactRootView>());
|
|
167
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->AddView(
|
|
168
|
+
static_cast<uint32_t>(index), static_cast<ShadowNodeBase &>(child).GetView().as<xaml::UIElement>());
|
|
171
169
|
}
|
|
172
170
|
};
|
|
173
171
|
|
|
@@ -304,9 +304,6 @@ void ReactRootView::ShowInstanceLoading() noexcept {
|
|
|
304
304
|
|
|
305
305
|
void ReactRootView::EnsureFocusSafeHarbor() noexcept {
|
|
306
306
|
if (!m_focusSafeHarbor) {
|
|
307
|
-
// focus safe harbor is delayed to be inserted to the visual tree
|
|
308
|
-
VerifyElseCrash(Children().Size() == 1);
|
|
309
|
-
|
|
310
307
|
m_focusSafeHarbor = xaml::Controls::ContentControl{};
|
|
311
308
|
m_focusSafeHarbor.Width(0.0);
|
|
312
309
|
m_focusSafeHarbor.IsTabStop(false);
|
|
@@ -486,4 +483,32 @@ Windows::Foundation::Size ReactRootView::ArrangeOverride(Windows::Foundation::Si
|
|
|
486
483
|
return finalSize;
|
|
487
484
|
}
|
|
488
485
|
|
|
486
|
+
// Maps react-native's view of the root view to the actual UI
|
|
487
|
+
// react-native is unaware that there are non-RN elements within the ReactRootView
|
|
488
|
+
uint32_t ReactRootView::RNIndexToXamlIndex(uint32_t index) noexcept {
|
|
489
|
+
// If m_focusSafeHarbor exists, it should be at index 0
|
|
490
|
+
// m_xamlRootView is the next element, followed by any RN content.
|
|
491
|
+
#if DEBUG
|
|
492
|
+
uint32_t findIndex{0};
|
|
493
|
+
Assert(!m_focusSafeHarbor || Children().IndexOf(m_focusSafeHarbor, findIndex) && findIndex == 0);
|
|
494
|
+
Assert(Children().IndexOf(m_xamlRootView, findIndex) && findIndex == (m_focusSafeHarbor ? 1 : 0));
|
|
495
|
+
#endif
|
|
496
|
+
|
|
497
|
+
return index + (m_focusSafeHarbor ? 2 : 1);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
void ReactRootView::AddView(uint32_t index, xaml::UIElement child) {
|
|
501
|
+
Children().InsertAt(RNIndexToXamlIndex(index), child);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
void ReactRootView::RemoveAllChildren() {
|
|
505
|
+
const uint32_t numLeft = m_focusSafeHarbor ? 2 : 1;
|
|
506
|
+
while (Children().Size() > numLeft)
|
|
507
|
+
Children().RemoveAt(numLeft);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
void ReactRootView::RemoveChildAt(uint32_t index) {
|
|
511
|
+
Children().RemoveAt(RNIndexToXamlIndex(index));
|
|
512
|
+
}
|
|
513
|
+
|
|
489
514
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -38,6 +38,11 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
|
|
|
38
38
|
|
|
39
39
|
void ReloadView() noexcept;
|
|
40
40
|
|
|
41
|
+
// Used by RootViewManager
|
|
42
|
+
void AddView(uint32_t index, xaml::UIElement child);
|
|
43
|
+
void RemoveAllChildren();
|
|
44
|
+
void RemoveChildAt(uint32_t index);
|
|
45
|
+
|
|
41
46
|
public: // IXamlRootView
|
|
42
47
|
::Microsoft::ReactNative::XamlView GetXamlView() const noexcept override;
|
|
43
48
|
|
|
@@ -93,6 +98,7 @@ struct ReactRootView : ReactRootViewT<ReactRootView>, ::Microsoft::ReactNative::
|
|
|
93
98
|
// JS created children
|
|
94
99
|
winrt::Grid m_xamlRootView{nullptr};
|
|
95
100
|
|
|
101
|
+
uint32_t RNIndexToXamlIndex(uint32_t index) noexcept;
|
|
96
102
|
void UpdatePerspective();
|
|
97
103
|
void UpdateRootViewInternal() noexcept;
|
|
98
104
|
void ClearLoadingUI() noexcept;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
#include "RootViewManager.h"
|
|
7
7
|
|
|
8
8
|
#include <IXamlRootView.h>
|
|
9
|
+
#include <ReactRootView.h>
|
|
9
10
|
#include <UI.Xaml.Controls.h>
|
|
10
11
|
|
|
11
12
|
namespace winrt {
|
|
@@ -29,21 +30,19 @@ XamlView RootViewManager::CreateViewCore(int64_t /*tag*/, const winrt::Microsoft
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
void RootViewManager::AddView(const XamlView &parent, const XamlView &child, int64_t index) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
panel.Children().InsertAt(static_cast<uint32_t>(index), child.as<xaml::UIElement>());
|
|
33
|
+
// Goes through RootShadowNode::AddView instead of here
|
|
34
|
+
assert(false);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
void RootViewManager::RemoveAllChildren(const XamlView &parent) {
|
|
38
|
-
auto panel(parent.as<winrt::
|
|
39
|
-
|
|
40
|
-
panel.Children().Clear();
|
|
38
|
+
auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
|
|
39
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveAllChildren();
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
void RootViewManager::RemoveChildAt(const XamlView &parent, int64_t index) {
|
|
44
|
-
auto panel(parent.as<winrt::
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
auto panel(parent.as<winrt::Microsoft::ReactNative::ReactRootView>());
|
|
44
|
+
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactRootView>(panel)->RemoveChildAt(
|
|
45
|
+
static_cast<uint32_t>(index));
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
void RootViewManager::SetLayoutProps(
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<RunAutolinkCheck Condition="'$(RunAutolinkCheck)' == ''">true</RunAutolinkCheck>
|
|
10
10
|
<AutolinkCommand Condition="'$(AutolinkCommand)' == ''">npx react-native autolink-windows</AutolinkCommand>
|
|
11
11
|
<AutolinkCommandWorkingDir Condition="'$(AutolinkCommandWorkingDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(ProjectDir), 'package.json'))</AutolinkCommandWorkingDir>
|
|
12
|
-
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
12
|
+
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == '' And '$(SolutionPath)' != '' And '$(SolutionPath)' != '*Undefined*' And '$(ProjectPath)' != ''">--check --sln "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(SolutionPath)))" --proj "$([MSBuild]::MakeRelative($(AutolinkCommandWorkingDir), $(ProjectPath)))"</AutolinkCommandArgs>
|
|
13
13
|
<AutolinkCommandArgs Condition="'$(AutolinkCommandArgs)' == ''">--check</AutolinkCommandArgs>
|
|
14
14
|
</PropertyGroup>
|
|
15
15
|
|