diff --git a/.changeset/migrate-1713465971344.md b/.changeset/migrate-1713465971344.md new file mode 100644 index 0000000000..c91a500e00 --- /dev/null +++ b/.changeset/migrate-1713465971344.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-entity-feedback': patch +'@backstage/plugin-entity-feedback-backend': patch +'@backstage/plugin-entity-feedback-common': patch +--- + +These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. diff --git a/plugins/entity-feedback-backend/README.md b/plugins/entity-feedback-backend/README.md index cef580a580..1f9b13c8dd 100644 --- a/plugins/entity-feedback-backend/README.md +++ b/plugins/entity-feedback-backend/README.md @@ -1,71 +1,3 @@ -# Entity Feedback Backend +# Deprecated -Welcome to the entity-feedback backend plugin! - -## Installation - -Note: this plugin requires authentication and identity configured so Backstage can identify -which user has rated the entity. If you are using the guest identity provider which comes -out of the box, this plugin will not work when you test it. - -### Install the package - -```bash -# From your Backstage root directory -yarn --cwd packages/backend add @backstage/plugin-entity-feedback-backend -``` - -### Adding the plugin to your `packages/backend` - -You'll need to add the plugin to the router in your `backend` package. You can do this by creating a file called `packages/backend/src/plugins/entityFeedback.ts` - -```tsx -import { createRouter } from '@backstage/plugin-entity-feedback-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from '../types'; - -export default function createPlugin(env: PluginEnvironment): Promise { - return createRouter({ - database: env.database, - discovery: env.discovery, - identity: env.identity, - logger: env.logger, - }); -} -``` - -With the `entityFeedback.ts` router setup in place, add the router to `packages/backend/src/index.ts`: - -```diff -+import entityFeedback from './plugins/entityFeedback'; - -async function main() { - ... - const createEnv = makeCreateEnv(config); - - const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); -+ const entityFeedbackEnv = useHotMemoize(module, () => createEnv('entityFeedback')); - - const apiRouter = Router(); -+ apiRouter.use('/entity-feedback', await entityFeedback(entityFeedbackEnv)); - ... - apiRouter.use(notFoundHandler()); - -``` - -### New Backend System - -The Entity Feedback backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up: -In your `packages/backend/src/index.ts` make the following changes: - -```diff - import { createBackend } from '@backstage/backend-defaults'; - - const backend = createBackend(); - - // ... other feature additions - -+ backend.add(import(@backstage/plugin-entity-feedback-backend)); - -backend.start(); -``` +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback-backend` instead. diff --git a/plugins/entity-feedback-backend/package.json b/plugins/entity-feedback-backend/package.json index 9531f25572..1a416c364c 100644 --- a/plugins/entity-feedback-backend/package.json +++ b/plugins/entity-feedback-backend/package.json @@ -2,7 +2,8 @@ "name": "@backstage/plugin-entity-feedback-backend", "version": "0.2.14", "backstage": { - "role": "backend-plugin" + "role": "backend-plugin", + "moved": "@backstage-community/plugin-entity-feedback-backend" }, "publishConfig": { "access": "public", @@ -52,5 +53,6 @@ "@backstage/cli": "workspace:^", "@types/supertest": "^2.0.12", "supertest": "^6.2.4" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback-backend instead." } diff --git a/plugins/entity-feedback-common/README.md b/plugins/entity-feedback-common/README.md index 430d14aeab..9cdc6ad25e 100644 --- a/plugins/entity-feedback-common/README.md +++ b/plugins/entity-feedback-common/README.md @@ -1,3 +1,3 @@ -# Entity Feedback Common +# Deprecated -Common types for the entity-feedback plugin. +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback-common` instead. diff --git a/plugins/entity-feedback-common/package.json b/plugins/entity-feedback-common/package.json index bc5d29ce7d..fe30901586 100644 --- a/plugins/entity-feedback-common/package.json +++ b/plugins/entity-feedback-common/package.json @@ -3,7 +3,8 @@ "version": "0.1.3", "description": "Common functionalities for the entity-feedback plugin", "backstage": { - "role": "common-library" + "role": "common-library", + "moved": "@backstage-community/plugin-entity-feedback-common" }, "publishConfig": { "access": "public", @@ -34,5 +35,6 @@ }, "devDependencies": { "@backstage/cli": "workspace:^" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback-common instead." } diff --git a/plugins/entity-feedback/README.md b/plugins/entity-feedback/README.md index c405bd4083..1adc326b83 100644 --- a/plugins/entity-feedback/README.md +++ b/plugins/entity-feedback/README.md @@ -1,140 +1,3 @@ -# Entity Feedback Plugin +# Deprecated -Welcome to the entity-feedback plugin! - -This plugin allows you give and view feedback on entities available in the Backstage catalog. - -## Features - -### Rate entities - -#### Like/Dislike rating - -![Like dislike rating example](./docs/like-dislike-rating.png) - -#### Starred rating - -![Starred rating example](./docs/starred-rating.png) - -### Request additional feedback when poorly rated - -![Response dialog example](./docs/feedback-response-dialog.png) - -### View entity feedback responses - -![Feedback responses example](./docs/feedback-response-table.png) - -### View aggregated ratings on owned entities - -#### Total likes/dislikes - -![Like dislike table example](./docs/like-dislike-table.png) - -#### Star breakdowns - -![Starred rating table example](./docs/starred-rating-table.png) - -## Setup - -The following sections will help you get the Entity Feedback plugin setup and running. - -Note: this plugin requires authentication and identity configured so Backstage can identify -which user has rated the entity. If you are using the guest identity provider which comes -out of the box, this plugin will not work when you test it. - -### Backend - -You need to setup the [Entity Feedback backend plugin](https://github.com/backstage/backstage/tree/master/plugins/entity-feedback-backend) before you move forward with any of these steps if you haven't already - -### Installation - -Install this plugin: - -```bash -# From your Backstage root directory -yarn --cwd packages/app add @backstage/plugin-entity-feedback -``` - -### Entity Pages - -Add rating and feedback components to your `EntityPage.tsx` to hook up UI so that users -can rate your entities and for owners to view feedback/responses. - -To allow users to apply "Like" and "Dislike" ratings add the following to each kind/type of -entity in your `EntityPage.tsx` you want to be rated (if you prefer to use star ratings, replace -`EntityLikeDislikeRatingsCard` with `EntityStarredRatingsCard` and `LikeDislikeButtons` with -`StarredRatingButtons`): - -```diff -import { - ... -+ InfoCard, - ... -} from '@backstage/core-components'; -+import { -+ EntityFeedbackResponseContent, -+ EntityLikeDislikeRatingsCard, -+ LikeDislikeButtons, -+} from '@backstage/plugin-entity-feedback'; - -// Add to each applicable kind/type of entity as desired -const overviewContent = ( - - ... -+ -+ -+ -+ -+ - ... - -); - -... - -// Add to each applicable kind/type of entity as desired -const serviceEntityPage = ( - - ... -+ -+ -+ - ... - -); - -... - -// Add ratings card component to user/group entities to view ratings of owned entities -const userPage = ( - - - - ... -+ -+ -+ - ... - - - - -); - -const groupPage = ( - - - - ... -+ -+ -+ - ... - - - - -); -``` - -Note: For a full example of this you can look at [this EntityPage](../../packages/app/src/components/catalog/EntityPage.tsx). +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-entity-feedback` instead. diff --git a/plugins/entity-feedback/package.json b/plugins/entity-feedback/package.json index 614410b876..9fddd51311 100644 --- a/plugins/entity-feedback/package.json +++ b/plugins/entity-feedback/package.json @@ -2,7 +2,8 @@ "name": "@backstage/plugin-entity-feedback", "version": "0.2.17", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-entity-feedback" }, "publishConfig": { "access": "public", @@ -56,5 +57,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "6.0.0-beta.0 || ^6.3.0" - } + }, + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-entity-feedback instead." }