deprecated createCardExtension in plugin-home and updated stack-overflow to use new plugin-home-react package

Signed-off-by: Malikah Montgomery <malikah.montgomery@thoughtworks.com>
This commit is contained in:
Malikah Montgomery
2023-05-15 10:49:36 -04:00
parent 3f11ae24ab
commit 838267c68c
5 changed files with 11 additions and 31 deletions
+1 -14
View File
@@ -33,25 +33,12 @@
"clean": "backstage-cli package clean"
},
"dependencies": {
"@backstage/catalog-model": "workspace:^",
"@backstage/config": "workspace:^",
"@backstage/core-components": "workspace:^",
"@backstage/core-plugin-api": "workspace:^",
"@backstage/plugin-catalog-react": "workspace:^",
"@backstage/theme": "workspace:^",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.61",
"@rjsf/core-v5": "npm:@rjsf/core@5.6.0",
"@rjsf/material-ui": "5.6.0",
"@rjsf/utils": "5.6.0",
"@rjsf/validator-ajv8": "5.6.0",
"@types/react": "^16.13.1 || ^17.0.0",
"lodash": "^4.17.21",
"react-grid-layout": "^1.3.4",
"react-resizable": "^3.0.4",
"react-use": "^17.2.4",
"zod": "~3.21.4"
"@types/react": "^16.13.1 || ^17.0.0"
},
"peerDependencies": {
"react": "^16.13.1 || ^17.0.0",
+6
View File
@@ -24,6 +24,7 @@ import { RJSFSchema } from '@rjsf/utils';
/**
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export type ComponentRenderer = {
Renderer?: (props: RendererProps) => JSX.Element;
@@ -31,6 +32,7 @@ export type ComponentRenderer = {
/**
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export type ComponentParts = {
Content: (props?: any) => JSX.Element;
@@ -41,16 +43,19 @@ export type ComponentParts = {
/**
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export type RendererProps = { title: string } & ComponentParts;
/**
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export type CardExtensionProps<T> = ComponentRenderer & { title?: string } & T;
/**
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export type CardLayout = {
width?: { minColumns?: number; maxColumns?: number; defaultColumns?: number };
@@ -76,6 +81,7 @@ export type CardConfig = {
* An extension creator to create card based components for the homepage
*
* @public
* @deprecated Please use the same type from `@backstage/plugin-home-react` instead
*/
export function createCardExtension<T>(options: {
title: string;
+1 -1
View File
@@ -25,7 +25,7 @@
"@backstage/config": "workspace:^",
"@backstage/core-components": "workspace:^",
"@backstage/core-plugin-api": "workspace:^",
"@backstage/plugin-home": "workspace:^",
"@backstage/plugin-home-react": "workspace:^",
"@backstage/plugin-search-common": "workspace:^",
"@backstage/plugin-search-react": "workspace:^",
"@backstage/theme": "workspace:^",
+1 -1
View File
@@ -20,7 +20,7 @@ import {
createApiFactory,
configApiRef,
} from '@backstage/core-plugin-api';
import { createCardExtension } from '@backstage/plugin-home';
import { createCardExtension } from '@backstage/plugin-home-react';
import { StackOverflowQuestionsContentProps } from './types';
import { stackOverflowApiRef, StackOverflowClient } from './api';
import { SearchResultListItemExtensionProps } from '@backstage/plugin-search-react';