From 477f9657caa009eea4e4b9a4427115aae69bc120 Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Wed, 5 Jul 2023 16:48:34 +0530 Subject: [PATCH 1/8] added note regarding pluggables --- docs/source/recipes/pluggables.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/source/recipes/pluggables.md b/docs/source/recipes/pluggables.md index c849ddb33f..e89f2f4583 100644 --- a/docs/source/recipes/pluggables.md +++ b/docs/source/recipes/pluggables.md @@ -1,10 +1,10 @@ --- myst: html_meta: - "description": "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." - "property=og:description": "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." - "property=og:title": "Pluggables framework" - "keywords": "Pluggables, framework, React, portal" + 'description': "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." + 'property=og:description': "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." + 'property=og:title': 'Pluggables framework' + 'keywords': 'Pluggables, framework, React, portal' --- # Pluggables framework @@ -27,9 +27,7 @@ To understand how they work, it's useful to look at the architecture: at `App.jsx` component level), so you don't have to do it: ```jsx - - ... - +... ``` This `Provider` acts like a centralized place where "insertion points" and @@ -47,7 +45,9 @@ Then we can plug things as children to the `` with some `` components: ```jsx -relevant nav stuff + + relevant nav stuff + ``` Declaring a `` with the same `id` twice will make the second one (in @@ -57,13 +57,15 @@ Internally, the `` keeps a record of `Pluggables` and `Plug` this is achieved by having the `` and `` components register themselves with the Provider via React context. +Note: It is important to note that while Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). They excel in providing dynamic visual enhancements for CMSUI and client components/widgets. However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. + ## Customize the rendering of plugs You can customize the rendering of pluggables. The `` component can take a function as a child and use that function to describe the rendering of pluggables. ```jsx -{(pluggables) => pluggables.map((p) => (<>{p()}))} + {(pluggables) => pluggables.map((p) => <>{p()})} ``` @@ -79,9 +81,9 @@ To use the passed params, you can do: ```jsx -{({options}) => { - console.log(options); - return -}} + {({ options }) => { + console.log(options); + return ; + }} ``` From 7b0aaf51f69dc22b6aa52fb5f360996d6c7dd03b Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Wed, 5 Jul 2023 18:59:58 +0530 Subject: [PATCH 2/8] added changes --- docs/source/recipes/pluggables.md | 18 +++++++++++++----- news/4735.documentation | 1 + news/4932.bugfix | 1 - 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 news/4735.documentation delete mode 100644 news/4932.bugfix diff --git a/docs/source/recipes/pluggables.md b/docs/source/recipes/pluggables.md index e89f2f4583..47f52f7168 100644 --- a/docs/source/recipes/pluggables.md +++ b/docs/source/recipes/pluggables.md @@ -1,10 +1,10 @@ --- myst: html_meta: - 'description': "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." - 'property=og:description': "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." - 'property=og:title': 'Pluggables framework' - 'keywords': 'Pluggables, framework, React, portal' + "description": "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." + "property=og:description": "The Pluggables framework give you insertion points to push components to other components in an 'out of tree' fashion, like React's Portal component, but with vitamins." + "property=og:title": "Pluggables framework" + "keywords": "Pluggables, framework, React, portal" --- # Pluggables framework @@ -57,7 +57,15 @@ Internally, the `` keeps a record of `Pluggables` and `Plug` this is achieved by having the `` and `` components register themselves with the Provider via React context. -Note: It is important to note that while Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). They excel in providing dynamic visual enhancements for CMSUI and client components/widgets. However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. +```{note} + + While Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). + + They excel in providing dynamic visual enhancements for the user interface, such as client components and widgets. + + However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. + + ``` ## Customize the rendering of plugs diff --git a/news/4735.documentation b/news/4735.documentation new file mode 100644 index 0000000000..8b6faffccb --- /dev/null +++ b/news/4735.documentation @@ -0,0 +1 @@ +Added note that Pluggables are not compatible with server-side rendering (SSR). @Akshat2Jain diff --git a/news/4932.bugfix b/news/4932.bugfix deleted file mode 100644 index 3d6cd62428..0000000000 --- a/news/4932.bugfix +++ /dev/null @@ -1 +0,0 @@ -Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh From 6700f257c90c0e8768628c1ba736f300c2d814cd Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Wed, 5 Jul 2023 19:01:31 +0530 Subject: [PATCH 3/8] minor change --- docs/source/recipes/pluggables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/recipes/pluggables.md b/docs/source/recipes/pluggables.md index 47f52f7168..d21e412c4e 100644 --- a/docs/source/recipes/pluggables.md +++ b/docs/source/recipes/pluggables.md @@ -59,11 +59,11 @@ themselves with the Provider via React context. ```{note} - While Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). +While Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). - They excel in providing dynamic visual enhancements for the user interface, such as client components and widgets. +They excel in providing dynamic visual enhancements for the user interface, such as client components and widgets. - However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. +However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. ``` From 76dc981e48a81a3cc5d1c2d654d4d61d2121493d Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Sat, 8 Jul 2023 21:52:03 +0530 Subject: [PATCH 4/8] removed spaces --- docs/source/recipes/pluggables.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/source/recipes/pluggables.md b/docs/source/recipes/pluggables.md index d21e412c4e..ec7b683be7 100644 --- a/docs/source/recipes/pluggables.md +++ b/docs/source/recipes/pluggables.md @@ -58,15 +58,12 @@ this is achieved by having the `` and `` components register themselves with the Provider via React context. ```{note} - While Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). They excel in providing dynamic visual enhancements for the user interface, such as client components and widgets. However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. - - ``` - +``` ## Customize the rendering of plugs You can customize the rendering of pluggables. The `` component can take a function as a child and use that function to describe the rendering of pluggables. @@ -76,7 +73,6 @@ You can customize the rendering of pluggables. The `` component can t {(pluggables) => pluggables.map((p) => <>{p()})} ``` - ## Passing parameters from the Pluggable to the Plugs You can also pass options to the `Plugs`, to enable inter-component communication: From 2b506a6932289d9a1097e847ea0329ee01b5ead7 Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Sat, 8 Jul 2023 21:54:43 +0530 Subject: [PATCH 5/8] removed spaces --- docs/source/recipes/pluggables.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/recipes/pluggables.md b/docs/source/recipes/pluggables.md index ec7b683be7..d79349a462 100644 --- a/docs/source/recipes/pluggables.md +++ b/docs/source/recipes/pluggables.md @@ -59,9 +59,7 @@ themselves with the Provider via React context. ```{note} While Pluggables are a powerful framework for enhancing component integration, they are currently not compatible with server-side rendering (SSR). - They excel in providing dynamic visual enhancements for the user interface, such as client components and widgets. - However, when it comes to handling critical data that needs to load quickly, alternative approaches may be more suitable. ``` ## Customize the rendering of plugs From 6fdacb30cb8072e021debb5868677c7f35abb8fd Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Sun, 9 Jul 2023 12:34:04 +0530 Subject: [PATCH 6/8] restore file --- news/4932.bugfix | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 news/4932.bugfix diff --git a/news/4932.bugfix b/news/4932.bugfix new file mode 100644 index 0000000000..77c2d90ac6 --- /dev/null +++ b/news/4932.bugfix @@ -0,0 +1,2 @@ +Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh + \ No newline at end of file From 9b80200becb56b1e6bd92072f2f99b0663e4585d Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Sun, 9 Jul 2023 12:35:30 +0530 Subject: [PATCH 7/8] minor change --- news/4932.bugfix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/news/4932.bugfix b/news/4932.bugfix index 77c2d90ac6..274603e244 100644 --- a/news/4932.bugfix +++ b/news/4932.bugfix @@ -1,2 +1 @@ -Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh - \ No newline at end of file +Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh \ No newline at end of file From 409020ec56e3d8acd9e014cea91090f350e15d65 Mon Sep 17 00:00:00 2001 From: akshat2jain Date: Sun, 9 Jul 2023 14:17:06 +0530 Subject: [PATCH 8/8] removed space --- news/4932.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/4932.bugfix b/news/4932.bugfix index 274603e244..4a8fcb13c8 100644 --- a/news/4932.bugfix +++ b/news/4932.bugfix @@ -1 +1 @@ -Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh \ No newline at end of file +Add a marker in the props passed to `RenderBlocks` in the Grid block view @sneridagh \ No newline at end of file