Skip to content

Commit 7b557c2

Browse files
committed
clean up plugin docs
Signed-off-by: Kurt King <[email protected]>
1 parent 7492b3a commit 7b557c2

File tree

9 files changed

+78
-99
lines changed

9 files changed

+78
-99
lines changed

workspaces/announcements/README.md

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

3-
The Announcements plugin manages and displays announcements within Backstage.
3+
The Announcements plugin manages and displays announcements within Backstage with support for categories and tags.
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-node](./plugins/announcements-node/README.md) - A node library containing reusable service logic.
1211
- [announcements-common](./plugins/announcements-common/README.md) - A common library containing shared types and utilities.
12+
- [announcements-node](./plugins/announcements-node/README.md) - A node library containing reusable service logic.
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.
1415

1516
## Quick start
1617

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

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

6-
If you want to create a new plugin here, go to your project root directory, run
6+
If you want to create a new plugin here, go to the 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 the Announcements plugin.
3+
This package provides shared types and utilities for all Announcements-related plugins.
44

55
## Installation
66

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

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

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

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.
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.
127

138
## Previously maintained by
149

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

workspaces/announcements/plugins/announcements/README.md

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

33
The frontend for the Announcements plugin.
44

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

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
7+
- [Installation](#installation)
8+
- [New Frontend System (Alpha)](#new-frontend-system-alpha)
9+
- [Components](#components)
10+
- [Customization](#customization)
1311

1412
## Installation
1513

@@ -31,14 +29,15 @@ const AppRoutes = () => (
3129
<FlatRoutes>
3230
// ...
3331
<Route path="/announcements" element={<AnnouncementsPage />} />
32+
<Route path="/announcements/admin" element={<AdminPortal />} />
3433
// ...
3534
</FlatRoutes>
3635
);
3736
```
3837

39-
An interface to create/update/edit/delete announcements is now available at `/announcements`.
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.
4039

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

4342
Add the plugin to your frontend app:
4443

@@ -86,6 +85,8 @@ app:
8685
8786
## Components
8887
88+
- Page to view announcements
89+
- Unified admin portal to manage announcements, categories and tags
8990
- [Display latest announcements on a page](./docs/latest-announcements-on-page.md)
9091
- [Display a banner for the latest announcement](./docs/latest-announcement-banner.md)
9192
- [Display announcements in a timeline](./docs/announcement-timeline.md)
@@ -130,16 +131,6 @@ Example
130131
<AnnouncementsPage category="conferences" />
131132
```
132133

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-
143134
### Overriding the NewAnnouncementBanner
144135

145136
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:
@@ -175,16 +166,6 @@ You can select the markdown renderer when using the AnnouncementsPage component:
175166

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

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-
188169
## Previously maintained by
189170

190171
- [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 ?? 'tool'}>
85+
<Page themeId={themeId ?? 'home'}>
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: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,59 @@
11
# @backstage-community/plugin-search-backend-module-announcements
22

3-
The announcements backend module for the search plugin.
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+
```
457

558
## Previously maintained by
659

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

Lines changed: 0 additions & 50 deletions
This file was deleted.

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

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

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

25+
// todo: I dont think these need to be exported anymore
2526
export { AnnouncementCollatorFactory } from './collators/AnnouncementCollatorFactory';
2627
export type {
2728
IndexableAnnouncementDocument,

0 commit comments

Comments
 (0)