From 387c28b9d331f0e088619ac20c2088e706a06951 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 14 Apr 2021 14:42:50 -0400 Subject: [PATCH 1/3] Update plugin example for composability Signed-off-by: Adam Harvey --- .../configure-app-with-plugins.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/getting-started/configure-app-with-plugins.md b/docs/getting-started/configure-app-with-plugins.md index e5b4d08a3f..337ec421c0 100644 --- a/docs/getting-started/configure-app-with-plugins.md +++ b/docs/getting-started/configure-app-with-plugins.md @@ -34,23 +34,25 @@ CircleCI is a frontend UI plugin, it goes in `app` rather than `backend`. export { plugin as Circleci } from '@backstage/plugin-circleci'; ``` -3. Register the plugin router: +3. Register the plugin in the entity pages: ```jsx // packages/app/src/components/catalog/EntityPage.tsx - -import { Router as CircleCIRouter } from '@backstage/plugin-circleci'; +import { + EntityCircleCIContent, + isCircleCIAvailable, +} from '@backstage/plugin-circleci'; // Then somewhere inside -} -/>; + + +; ``` -Note that stand-alone plugins that are not "attached" to the Software Catalog -would be added outside the `EntityPage`. +This is just one example, but each Backstage instance may integrate content or +cards to suit their needs on different pages, tabs, etc. Note that stand-alone +plugins that are not "attached" to the Software Catalog would be added outside +the `EntityPage`. 4. [Optional] Add proxy config: From 1c1dc8ac28587688a4f4cd7b90aa44573a443af6 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 15 Apr 2021 12:42:03 -0400 Subject: [PATCH 2/3] Fix pluginname Signed-off-by: Adam Harvey --- docs/getting-started/configure-app-with-plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/configure-app-with-plugins.md b/docs/getting-started/configure-app-with-plugins.md index 337ec421c0..a1e6f00290 100644 --- a/docs/getting-started/configure-app-with-plugins.md +++ b/docs/getting-started/configure-app-with-plugins.md @@ -31,7 +31,7 @@ CircleCI is a frontend UI plugin, it goes in `app` rather than `backend`. ```js // packages/app/src/plugins.ts -export { plugin as Circleci } from '@backstage/plugin-circleci'; +export { plugin as CircleCi } from '@backstage/plugin-circleci'; ``` 3. Register the plugin in the entity pages: From 2c1fc4969c191ae446c08f2f3c8216b1de89dd4a Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 15 Apr 2021 14:41:10 -0400 Subject: [PATCH 3/3] Clarify example Signed-off-by: Adam Harvey --- .../configure-app-with-plugins.md | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/getting-started/configure-app-with-plugins.md b/docs/getting-started/configure-app-with-plugins.md index a1e6f00290..e236fe48a0 100644 --- a/docs/getting-started/configure-app-with-plugins.md +++ b/docs/getting-started/configure-app-with-plugins.md @@ -36,17 +36,22 @@ export { plugin as CircleCi } from '@backstage/plugin-circleci'; 3. Register the plugin in the entity pages: -```jsx -// packages/app/src/components/catalog/EntityPage.tsx -import { - EntityCircleCIContent, - isCircleCIAvailable, -} from '@backstage/plugin-circleci'; +```diff + // packages/app/src/components/catalog/EntityPage.tsx ++import { ++ EntityCircleCIContent, ++ isCircleCIAvailable, ++} from '@backstage/plugin-circleci'; -// Then somewhere inside - - -; +... + const cicdContent = ( + + ... ++ ++ ++ ; + + ); ``` This is just one example, but each Backstage instance may integrate content or