Skip to content

Commit 50f1011

Browse files
committed
Revert "clean up plugin docs"
This reverts commit 7b557c2.
1 parent 7b557c2 commit 50f1011

File tree

9 files changed

+99
-78
lines changed

9 files changed

+99
-78
lines changed

workspaces/announcements/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
# Backstage Announcements Plugin
1+
# Announcements plugin for Backstage
22

3-
The Announcements plugin manages and displays announcements within Backstage with support for categories and tags.
3+
The Announcements plugin manages and displays announcements within Backstage.
44

55
## Plugins
66

77
This plugin is composed of several packages:
88

99
- [announcements](./plugins/announcements/README.md) - The frontend plugin that provides the UI components and pages.
1010
- [announcements-backend](./plugins/announcements-backend/README.md) - The backend plugin that provides the REST API and database model.
11-
- [announcements-common](./plugins/announcements-common/README.md) - A common library containing shared types and utilities.
1211
- [announcements-node](./plugins/announcements-node/README.md) - A node library containing reusable service logic.
12+
- [announcements-common](./plugins/announcements-common/README.md) - A common library containing shared types and utilities.
1313
- [announcements-react](./plugins/announcements-react/README.md) - A web library containing announcements-related react components.
14-
- [search-backend-module-announcements](./plugins/search-backend-module-announcements/README.md) - A backend module that provides search capabilities for announcements.
1514

1615
## Quick start
1716

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Announcements Plugins
1+
# The Plugins Folder
22

3-
This is where the plugins and their associated modules for the Announcements plugin live, each in a
4-
separate folder.
3+
This is where your own plugins and their associated modules live, each in a
4+
separate folder of its own.
55

6-
If you want to create a new plugin here, go to the project root directory, run
6+
If you want to create a new plugin here, go to your project root directory, run
77
the command `yarn new`, and follow the on-screen instructions.
8+
9+
You can also check out existing plugins on [the plugin marketplace](https://backstage.io/plugins)!

workspaces/announcements/plugins/announcements-common/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @backstage-community/plugin-announcements-common
22

3-
This package provides shared types and utilities for all Announcements-related plugins.
3+
This package provides shared types and utilities for the Announcements plugin.
44

55
## Installation
66

workspaces/announcements/plugins/announcements-node/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
Exports shared types and services for backend-related announcements functionality.
44

5-
- [Events](./docs/events.md) support - The node library supports the Backstage Event system.
6-
- [Signals](./docs/signals.md) support - The node library supports the Backstage Signal system.
5+
## Events support
6+
7+
The announcements plugin supports the Backstage Event system. View the [events](./docs/events.md) documentation for more information.
8+
9+
## Signals support
10+
11+
The announcements plugin supports the Backstage Signal system. View the [signals](./docs/signals.md) documentation for more information.
712

813
## Previously maintained by
914

10-
- [procore-oss](https://github.com/procore-oss/backstage-plugin-announcements)
15+
- [procore-oss](https://github.com/procore-oss/backstage-plugin-announcements/tree/main/plugins/announcements-node)

workspaces/announcements/plugins/announcements/README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
The frontend for the Announcements plugin.
44

5-
## Table of Contents
5+
## Features
66

7-
- [Installation](#installation)
8-
- [New Frontend System (Alpha)](#new-frontend-system-alpha)
9-
- [Components](#components)
10-
- [Customization](#customization)
7+
This plugin provides:
8+
9+
- pages to list, view, create, edit and delete announcements
10+
- a component to display the latest announcements, for example on a homepage
11+
- a component to display the latest announcement as a banner, if there is one
12+
- an admin portal to manage announcements
1113

1214
## Installation
1315

@@ -29,15 +31,14 @@ const AppRoutes = () => (
2931
<FlatRoutes>
3032
// ...
3133
<Route path="/announcements" element={<AnnouncementsPage />} />
32-
<Route path="/announcements/admin" element={<AdminPortal />} />
3334
// ...
3435
</FlatRoutes>
3536
);
3637
```
3738

38-
Viewing announcements is now available at `/announcements`. Managing announcements, categories and tags is now available at `/announcements/admin`. The admin portal is also available via the context menu on the announcements page.
39+
An interface to create/update/edit/delete announcements is now available at `/announcements`.
3940

40-
### New Frontend System (Alpha)
41+
## New Frontend System Setup (Alpha)
4142

4243
Add the plugin to your frontend app:
4344

@@ -85,8 +86,6 @@ app:
8586
8687
## Components
8788
88-
- Page to view announcements
89-
- Unified admin portal to manage announcements, categories and tags
9089
- [Display latest announcements on a page](./docs/latest-announcements-on-page.md)
9190
- [Display a banner for the latest announcement](./docs/latest-announcement-banner.md)
9291
- [Display announcements in a timeline](./docs/announcement-timeline.md)
@@ -131,6 +130,16 @@ Example
131130
<AnnouncementsPage category="conferences" />
132131
```
133132

133+
### Overriding the AnnouncementCreateButton
134+
135+
It is possible to specify the text for the "New announcement" button rendered on the `AnnouncementsPage`. You can do this by passing a `buttonOptions` prop to the `AnnouncementsPage` component. The `buttonOptions` prop accepts an object with the following properties:
136+
137+
```ts
138+
{
139+
name: string; // defaults to 'announcement'
140+
}
141+
```
142+
134143
### Overriding the NewAnnouncementBanner
135144

136145
It is possible to specify the length of the title for announcements rendered on the `NewAnnouncementBanner`. You can do this by passing a `cardOptions` prop to the `NewAnnouncementBanner` component. The `cardOptions` prop accepts an object with the following properties:
@@ -166,6 +175,16 @@ You can select the markdown renderer when using the AnnouncementsPage component:
166175

167176
Select the renderer that best fits your needs based on whether theme consistency or markdown feature completeness is more important for your use case.
168177

178+
## Development
179+
180+
### Getting started
181+
182+
Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/announcements](http://localhost:3000/announcements).
183+
184+
You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
185+
This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
186+
It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
187+
169188
## Previously maintained by
170189

171190
- [procore-oss](https://github.com/procore-oss/backstage-plugin-announcements/tree/main/plugins/announcements)

workspaces/announcements/plugins/announcements/src/components/Admin/AdminPortal/AdminPortal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const AdminPortal = (props?: AdminPortalProps) => {
8282
const { t } = useAnnouncementsTranslation();
8383

8484
return (
85-
<Page themeId={themeId ?? 'home'}>
85+
<Page themeId={themeId ?? 'tool'}>
8686
<Header
8787
title={title ?? t('admin.adminPortal.title')}
8888
subtitle={subtitle ?? t('admin.adminPortal.title')}

workspaces/announcements/plugins/search-backend-module-announcements/README.md

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,6 @@
11
# @backstage-community/plugin-search-backend-module-announcements
22

3-
The announcements backend module for the `@backstage/plugin-search` plugin.
4-
5-
![Announcements search results](./images/announcements_search.png)
6-
7-
## Installation
8-
9-
Add the module to your backend package.
10-
11-
```bash
12-
yarn add --cwd packages/backend @backstage-community/plugin-search-backend-module-announcements
13-
```
14-
15-
Update `packages/backend/src/index.ts` to import the announcements search module and register it with the backend.
16-
17-
```ts
18-
// ...
19-
const backend = createBackend();
20-
21-
// ...
22-
23-
backend.add(import('@backstage-community/plugin-announcements-backend'));
24-
backend.add(
25-
import('@backstage-community/plugin-search-backend-module-announcements'),
26-
);
27-
// ...
28-
```
29-
30-
## Adding search support to the frontend
31-
32-
Add the announcement search result list item to your search results.
33-
34-
```tsx
35-
import { AnnouncementSearchResultListItem } from '@backstage-community/plugin-announcements';
36-
import RecordVoiceOverIcon from '@material-ui/icons/RecordVoiceOver';
37-
38-
// ...
39-
<SearchType.Accordion
40-
name="Result Type"
41-
defaultValue="software-catalog"
42-
types={[
43-
// ...
44-
{
45-
value: 'announcements',
46-
name: 'Announcements',
47-
icon: <RecordVoiceOverIcon />,
48-
},
49-
]}
50-
/>
51-
52-
<SearchResult>
53-
// ...
54-
<AnnouncementSearchResultListItem />
55-
</SearchResult>
56-
```
3+
The announcements backend module for the search plugin.
574

585
## Previously maintained by
596

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Integration with `@backstage/plugin-search`
2+
3+
## Installation
4+
5+
Add the module to your backend app:
6+
7+
```bash
8+
yarn add --cwd packages/backend @backstage-community/plugin-search-backend-module-announcements
9+
```
10+
11+
Update `packages/backend/src/index.ts` to import the announcements search module and register it with the backend:
12+
13+
```ts
14+
// ...
15+
const backend = createBackend();
16+
17+
// ...
18+
19+
backend.add(import('@backstage-community/plugin-announcements-backend'));
20+
backend.add(
21+
import('@backstage-community/plugin-search-backend-module-announcements'),
22+
);
23+
// ...
24+
```
25+
26+
## Adding search support to the frontend
27+
28+
```tsx
29+
import { AnnouncementSearchResultListItem } from '@backstage-community/plugin-announcements';
30+
import RecordVoiceOverIcon from '@material-ui/icons/RecordVoiceOver';
31+
32+
// ...
33+
<SearchType.Accordion
34+
name="Result Type"
35+
defaultValue="software-catalog"
36+
types={[
37+
// ...
38+
{
39+
value: 'announcements',
40+
name: 'Announcements',
41+
icon: <RecordVoiceOverIcon />,
42+
},
43+
]}
44+
/>
45+
46+
<SearchResult>
47+
// ...
48+
<AnnouncementSearchResultListItem />
49+
</SearchResult>
50+
```

workspaces/announcements/plugins/search-backend-module-announcements/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
export { searchModuleAnnouncementsCollator as default } from './module';
2424

25-
// todo: I dont think these need to be exported anymore
2625
export { AnnouncementCollatorFactory } from './collators/AnnouncementCollatorFactory';
2726
export type {
2827
IndexableAnnouncementDocument,

0 commit comments

Comments
 (0)