Skip to content

Commit

Permalink
Cutting documentation for 0.72 Release (#844)
Browse files Browse the repository at this point in the history
## Description
Changes to RNW Website documentation

## Why

Part of the steps in the 0.72 Release Status
[issue](microsoft/react-native-windows#11535)

[Steps followed for cutting
website](https://github.com/microsoft/react-native-windows-samples/tree/main/website#cutting-documentation-for-a-new-react-native-windows-release)

One specific change that I was unsure about the format that I used was
the change on `support.js` regarding Release Date and Active Support
Start for 0.72, as well as the Support Phase for 0.71 (whether to leave
it as Active or if there was a separate category, since I think we are
still providing support for it).
###### Microsoft Reviewers:
codeflow:open?pullrequest=https://github.com/microsoft/react-native-windows-samples/pull/844&drop=dogfoodAlpha

---------

Co-authored-by: Yajur Grover <yajurgrover@microsoft.com>
Co-authored-by: Jon Thysell (JAUNTY) <jthysell@microsoft.com>
  • Loading branch information
3 people committed Jun 24, 2023
1 parent b37b7dd commit 10548ce
Show file tree
Hide file tree
Showing 27 changed files with 1,897 additions and 119 deletions.
4 changes: 2 additions & 2 deletions docs/coreapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The callback function has follows the `__cdecl` calling convention.
## `CoreApp` schema
Below are the properties you can set in your `app.config.json`, with their default values.
These properties correspond to properties on the [`RNCoreApp`](#rncoreapp) structure, and these properties are applied to the instance's [`ReactInstanceSettings`](native-api/ReactInstanceSettings).
These properties correspond to properties on the [`RNCoreApp`](#rncoreapp) structure, and these properties are applied to the instance's [`ReactInstanceSettings`](native-api/ReactInstanceSettings-api-windows.md).
```json
{
Expand Down Expand Up @@ -130,7 +130,7 @@ For building in Debug mode, your app will usually only need to set a few propert
## Using native modules
There are a couple of ways that a `CoreApp` can load native modules.

The simplest way is using the [`RNCoreAppStartFromConfigJson`](#rncoreappstartfromconfigjson) API. This API allows us to pass an optional DLL name to load and a plain C function to call in that DLL, to produce the [`IReactPackageProvider`](native-api/IReactPackageProvider) for the module.
The simplest way is using the [`RNCoreAppStartFromConfigJson`](#rncoreappstartfromconfigjson) API. This API allows us to pass an optional DLL name to load and a plain C function to call in that DLL, to produce the [`IReactPackageProvider`](native-api/IReactPackageProvider-api-windows.md) for the module.
Here's what this function would look like:

```cpp
Expand Down
24 changes: 0 additions & 24 deletions docs/native-api/IReactPackageBuilderExperimental-api-windows.md

This file was deleted.

24 changes: 0 additions & 24 deletions docs/native-api/IReactRootViewExperimental-api-windows.md

This file was deleted.

12 changes: 12 additions & 0 deletions docs/native-api/IReactSettingsSnapshot-api-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Kind: `interface`
An immutable snapshot of the [`ReactInstanceSettings`](ReactInstanceSettings) used to create the current React instance.

## Properties
### BundleAppId
`readonly` string `BundleAppId`

A read-only snapshot of the [`ReactInstanceSettings.BundleAppId`](ReactInstanceSettings#bundleappid) property value at the time when the React instance was created.
The name of the app passed to the packager server via the 'app' query parameter.

### BundleRootPath
`readonly` string `BundleRootPath`

Expand Down Expand Up @@ -42,6 +48,12 @@ When [`UseDirectDebugger`](#usedirectdebugger) is enabled, this controls the por
A read-only snapshot of the [`ReactInstanceSettings.JavaScriptBundleFile`](ReactInstanceSettings#javascriptbundlefile) property value at the time when the React instance was created.
The name of the JavaScript bundle file to load. This should be a relative path from [`BundleRootPath`](#bundlerootpath). The `.bundle` extension will be appended to the end, when looking for the bundle file.

### RequestDevBundle
`readonly` bool `RequestDevBundle`

A read-only snapshot of the [`ReactInstanceSettings.RequestDevBundle`](ReactInstanceSettings#requestdevbundle) property value at the time when the React instance was created.
When querying the bundle server for a bundle, should it request the dev bundle or release bundle.

### RequestInlineSourceMap
`readonly` bool `RequestInlineSourceMap`

Expand Down
10 changes: 10 additions & 0 deletions docs/native-api/QuirkSettings-api-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ By default `react-native-windows` will handle various back events and forward th




### SetMapWindowDeactivatedToAppStateInactive
`static` void **`SetMapWindowDeactivatedToAppStateInactive`**([`ReactInstanceSettings`](ReactInstanceSettings) settings, bool value)

Expand All @@ -55,6 +56,15 @@ Set this setting to false to maintain the behavior from react-native-windows <=



### SetSuppressWindowFocusOnViewFocus
`static` void **`SetSuppressWindowFocusOnViewFocus`**([`ReactInstanceSettings`](ReactInstanceSettings) settings, bool value)

> **EXPERIMENTAL**
When running multiple windows from a single UI thread, focusing a native view causes the parent window of that view to get focus as well. Set this setting to true to prevent focus of a blurred window when a view in that window is programmatically focused.



### SetUseWebFlexBasisBehavior
`static` void **`SetUseWebFlexBasisBehavior`**([`ReactInstanceSettings`](ReactInstanceSettings) settings, bool value)

Expand Down
5 changes: 5 additions & 0 deletions docs/native-api/ReactApplication-api-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Extends: [`Application`](https://docs.microsoft.com/uwp/api/Windows.UI.Xaml.Appl
The `ReactApplication` is a base application class for use in applications that are entirely written in React Native. When the app launches, the `ReactApplication` will load the React instance. Use [`ReactInstanceSettings`](ReactInstanceSettings) and [`ReactNativeHost`](ReactNativeHost) properties to customize React instance in your application's constructor.

## Properties
### BundleAppId
string `BundleAppId`

See [`ReactInstanceSettings.BundleAppId`](ReactInstanceSettings#bundleappid).

### Host
`readonly` [`ReactNativeHost`](ReactNativeHost) `Host`

Expand Down
27 changes: 27 additions & 0 deletions docs/native-api/ReactCoreInjection-api-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ Used to inject platform specific implementations to create react-native targets


## Methods
### GetTopLevelWindowId
`static` uint64_t **`GetTopLevelWindowId`**([`IReactPropertyBag`](IReactPropertyBag) properties)

> **EXPERIMENTAL**
Gets the window handle HWND (as an UInt64) for the active top level application window.



### MakeViewHost
`static` [`IReactViewHost`](IReactViewHost) **`MakeViewHost`**([`ReactNativeHost`](ReactNativeHost) host, [`ReactViewOptions`](ReactViewOptions) viewOptions)

Expand All @@ -32,6 +41,24 @@ Post something to the main UI dispatcher using the batching queue



### SetPlatformNameOverride
`static` void **`SetPlatformNameOverride`**([`IReactPropertyBag`](IReactPropertyBag) properties, string platformName)

> **EXPERIMENTAL**
Override platform name. This will change the platform used when requesting bundles from metro. Default: \"windows\"



### SetTopLevelWindowId
`static` void **`SetTopLevelWindowId`**([`IReactPropertyBag`](IReactPropertyBag) properties, uint64_t windowId)

> **EXPERIMENTAL**
Sets the window handle HWND (as an UInt64) for the active top level application window.This must be manually provided to the [`ReactInstanceSettings`](ReactInstanceSettings) object when using ReactNativeWindowswithout XAML for certain APIs work correctly.



### SetUIBatchCompleteCallback
`static` void **`SetUIBatchCompleteCallback`**([`IReactPropertyBag`](IReactPropertyBag) properties, [`UIBatchCompleteCallback`](UIBatchCompleteCallback) xamlRoot)

Expand Down
10 changes: 10 additions & 0 deletions docs/native-api/ReactInstanceSettings-api-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Kind: `class`
Provides settings to create a React instance.

## Properties
### BundleAppId
string `BundleAppId`

The name of the app passed to the packager server via the 'app' query parameter. This is useful when bundling multiple applications from the same packager instance. If no value is set, the parameter will not be passed.

### BundleRootPath
string `BundleRootPath`

Expand Down Expand Up @@ -132,6 +137,11 @@ Use [`IReactContext.Properties`](IReactContext#properties-1) to access this [`IR

Provides an extension point to allow custom error handling within the react instance. See [`IRedBoxHandler`](IRedBoxHandler) for more information.

### RequestDevBundle
bool `RequestDevBundle`

When querying the bundle server for a bundle, should it request the dev bundle or release bundle.

### RequestInlineSourceMap
bool `RequestInlineSourceMap`

Expand Down
63 changes: 0 additions & 63 deletions docs/native-api/apptheme-api-windows.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/native-modules-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ BatchedBridge.registerLazyCallableModule("MathEmitter", () => {

## C# Native Modules with Initializer and as a way to access `ReactContext`

If your native module needs to perform some initialization logic on the native (C#) side, there is an easy mechanism for you to do so when the app is setting up. All you need to do is add a method that takes a [`ReactContext`](IReactContext) and has `[ReactInitializer]` attribute.
If your native module needs to perform some initialization logic on the native (C#) side, there is an easy mechanism for you to do so when the app is setting up. All you need to do is add a method that takes a [`ReactContext`](native-api/IReactContext-api-windows.md) and has `[ReactInitializer]` attribute.
If your native module needs to perform some operation periodically, you can do so by setting up a timer during your module's initialization as in the following example:

```csharp
Expand Down Expand Up @@ -302,7 +302,7 @@ internal sealed class NativeModuleSample
}
```

If your module needs access to the [`ReactContext`](IReactContext) context or [`ReactNativeHost`](ReactNativeHost), you can hold on to the context passed onto the method that is marked `[ReactInitializer]`.
If your module needs access to the [`ReactContext`](native-api/IReactContext-api-windows.md) context or [`ReactNativeHost`](native-api/ReactNativeHost-api-windows.md), you can hold on to the context passed onto the method that is marked `[ReactInitializer]`.

```csharp
[ReactModule]
Expand Down
20 changes: 20 additions & 0 deletions website/.unbroken_exclusions
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
!versioned_docs/version-0.69/native-api/*-api-windows*.md
!versioned_docs/version-0.70/native-api/*-api-windows*.md
!versioned_docs/version-0.71/native-api/*-api-windows*.md
!versioned_docs/version-0.72/native-api/*-api-windows*.md

# See Issue 410
File not found IReactContext while parsing versioned_docs/version-0.64/native-modules-advanced.md
Expand All @@ -18,8 +19,27 @@ File not found IReactContext while parsing versioned_docs/version-0.65/native-mo
File not found ReactNativeHost while parsing versioned_docs/version-0.65/native-modules-advanced.md
File not found IViewManagerCreateWithProperties-api-windows.md while parsing versioned_docs/version-0.65/view-managers.md
File not found IViewManagerCreateWithProperties while parsing versioned_docs/version-0.65/view-managers.md
File not found native-api/IReactPackageProvider-api-windows.md while parsing versioned_docs/version-0.72/coreapp.md
File not found native-api/IReactContext-api-windows.md while parsing versioned_docs/version-0.72/native-modules-advanced.md
File not found native-api/ReactNativeHost-api-windows.md while parsing versioned_docs/version-0.72/native-modules-advanced.md

#fix-unbroken.js auto-generated do not edit this line or below
File not found IReactPackageProvider-api-windows.md while parsing versioned_docs/version-0.72/coreapp.md
File not found ReactInstanceSettings-api-windows.md while parsing versioned_docs/version-0.72/coreapp.md
File not found native-modules.md while parsing versioned_docs/version-0.72/getting-started.md
File not found rnw-dependencies.md while parsing versioned_docs/version-0.72/getting-started.md
File not found run-windows-cli.md while parsing versioned_docs/version-0.72/getting-started.md
File not found native-modules.md while parsing versioned_docs/version-0.72/native-modules-advanced.md
File not found IReactContext-api-windows.md while parsing versioned_docs/version-0.72/native-modules-advanced.md
File not found ReactNativeHost-api-windows.md while parsing versioned_docs/version-0.72/native-modules-advanced.md
File not found native-modules-advanced.md while parsing versioned_docs/version-0.72/native-modules.md
File not found native-modules-vs-turbo-modules.md while parsing versioned_docs/version-0.72/native-modules.md
File not found native-modules-setup.md while parsing versioned_docs/version-0.72/native-modules.md
File not found native-modules-async.md while parsing versioned_docs/version-0.72/native-modules.md
File not found native-modules-jsvalue.md while parsing versioned_docs/version-0.72/native-modules.md
File not found view-managers.md while parsing versioned_docs/version-0.72/native-modules.md
File not found native-code-language-choice.md while parsing versioned_docs/version-0.72/native-modules.md
File not found flyout-component-windows.md while parsing versioned_docs/version-0.72/popup-component-windows.md
File not found IReactPackageProvider-api-windows.md while parsing versioned_docs/version-0.71/coreapp.md
File not found ReactInstanceSettings-api-windows.md while parsing versioned_docs/version-0.71/coreapp.md
File not found native-modules.md while parsing versioned_docs/version-0.71/getting-started.md
Expand Down
2 changes: 1 addition & 1 deletion website/fix-unbroken.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ for (let i = 0; i < versions.length; i++) {
for (let j = i + 1; j < versions.length; j++) {
const earlierDocs = versionedDocs[versions[j]];
earlierDocs.forEach(earlierDoc => {
const edFile = path.basename(earlierDoc);
let edFile = path.basename(earlierDoc);
if (contents.search(`(${edFile})`) >= 0) {
redirectedFiles.push({ source: doc, target: edFile });
}
Expand Down
4 changes: 2 additions & 2 deletions website/pages/en/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The React Native for Windows (RNW) Team strives to provide full support for the
| Version | Support Phase | Release Date | Active Support Start | Maintenance Support Start | End of Support |
| -- | -- | -- | -- | -- | -- |
| [main](https://www.npmjs.com/package/react-native-windows/v/canary) | [Canary](#canary-support) | *N/A* | *N/A* | *N/A* | *N/A* |
| [0.72](https://www.npmjs.com/package/react-native-windows/v/preview) | [Preview](#preview-support) | *TBD* | *TBD* | *TBD* | *TBD* |
| [0.71](https://www.npmjs.com/package/react-native-windows/v/latest) | [Active](#active-support) | 01/23/2023 | 01/23/2023 | *TBD* | *TBD* |
| [0.72](https://www.npmjs.com/package/react-native-windows/v/latest) | [Active](#active-support) | 06/23/2023 | 06/23/2023 | *TBD* | *TBD* |
| [0.71](https://www.npmjs.com/package/react-native-windows/v/v0.71-stable) | [Active](#active-support) | 01/23/2023 | 01/23/2023 | 07/31/2023 | 09/30/2023 |
| [0.70](https://www.npmjs.com/package/react-native-windows/v/v0.70-stable) | [Unsupported](#unsupported) | 09/12/2022 | 09/12/2022 | 02/28/2023 | 04/30/2023 |
| [0.69](https://www.npmjs.com/package/react-native-windows/v/v0.69-stable) | [Unsupported](#unsupported) | 06/27/2022 | 06/27/2022 | 10/31/2022 | 12/31/2022 |
| [0.68](https://www.npmjs.com/package/react-native-windows/v/v0.68-stable) | [Unsupported](#unsupported) | 04/04/2022 | 04/04/2022 | 07/31/2022 | 09/30/2022 |
Expand Down
2 changes: 1 addition & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://docusaurus.io/docs/site-config for all the possible
// site configuration options.

const defaultVersionShown = "0.71";
const defaultVersionShown = "0.72";
const repoUrl = "https://github.com/microsoft/react-native-windows";

const siteConfig = {
Expand Down
Loading

0 comments on commit 10548ce

Please sign in to comment.