From a7d8934caf1b65c6e998d354dfd330011218c760 Mon Sep 17 00:00:00 2001 From: sakuntala_motukuri Date: Mon, 24 Jun 2024 15:20:52 -0400 Subject: [PATCH 1/3] Documentation update for Ability to resolve with "nothing" --- docs/site/pages/plugins/async-node.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/site/pages/plugins/async-node.mdx b/docs/site/pages/plugins/async-node.mdx index bdacbbbdc..b6dbde3d7 100644 --- a/docs/site/pages/plugins/async-node.mdx +++ b/docs/site/pages/plugins/async-node.mdx @@ -34,6 +34,11 @@ The `AsyncNodePlugin` exposes an `onAsyncNode` hook on all platforms. The `onAsy User should tap into the `onAsyncNode` hook to examine the node's metadata before making a decision on what to replace the async node with. The return could be a single asset node or an array of asset nodes. +### Improvements + +The AsyncNodePluginPlugin class is now capable of handling the below : +- The resolvedMapping map now sets the node.id as the key and either parsedNode or node as the value, depending on whether parsedNode is truthy. +- This means that the plugin is now capable of resolving the async node even when the consumer returns a null/undefined value. ### Continuous Streaming From ca6961b2aef8cb73008adf1f6b2508dbf4d00493 Mon Sep 17 00:00:00 2001 From: sakuntala_motukuri Date: Mon, 24 Jun 2024 15:33:12 -0400 Subject: [PATCH 2/3] Fixed PR comments --- docs/site/pages/plugins/async-node.mdx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/site/pages/plugins/async-node.mdx b/docs/site/pages/plugins/async-node.mdx index b6dbde3d7..7f526b186 100644 --- a/docs/site/pages/plugins/async-node.mdx +++ b/docs/site/pages/plugins/async-node.mdx @@ -34,11 +34,9 @@ The `AsyncNodePlugin` exposes an `onAsyncNode` hook on all platforms. The `onAsy User should tap into the `onAsyncNode` hook to examine the node's metadata before making a decision on what to replace the async node with. The return could be a single asset node or an array of asset nodes. -### Improvements +### Edge cases -The AsyncNodePluginPlugin class is now capable of handling the below : -- The resolvedMapping map now sets the node.id as the key and either parsedNode or node as the value, depending on whether parsedNode is truthy. -- This means that the plugin is now capable of resolving the async node even when the consumer returns a null/undefined value. +If for some reason, the process for resolving some `AsyncNode` fails, or is no longer relevant, you can resolve the promise for that `AsyncNode` with `undefined` or `null` to replace that node with "nothing" in the UI. ### Continuous Streaming From 3a6643e736c89aa0dad4061075a204fa7b190648 Mon Sep 17 00:00:00 2001 From: sakuntala_motukuri Date: Mon, 24 Jun 2024 15:43:08 -0400 Subject: [PATCH 3/3] Updated doc --- docs/site/pages/plugins/async-node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/pages/plugins/async-node.mdx b/docs/site/pages/plugins/async-node.mdx index 7f526b186..33deeca96 100644 --- a/docs/site/pages/plugins/async-node.mdx +++ b/docs/site/pages/plugins/async-node.mdx @@ -36,7 +36,7 @@ User should tap into the `onAsyncNode` hook to examine the node's metadata befor ### Edge cases -If for some reason, the process for resolving some `AsyncNode` fails, or is no longer relevant, you can resolve the promise for that `AsyncNode` with `undefined` or `null` to replace that node with "nothing" in the UI. +If for some reason, the process for resolving some `AsyncNode` fails, or is no longer relevant, you can resolve the promise for that `AsyncNode` with `undefined` or `null` to replace that node with "existing node". ### Continuous Streaming