From 77fa1b6c228eb1a7da5102dc21b71bc31580d22a Mon Sep 17 00:00:00 2001 From: Steve Cprek Date: Thu, 23 Feb 2023 14:40:37 -0600 Subject: [PATCH] Remove searchfilter select and mention according as optional Signed-off-by: Steve Cprek --- plugins/adr/README.md | 67 +++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/plugins/adr/README.md b/plugins/adr/README.md index 2e2b82b3fd..7feb9b03b0 100644 --- a/plugins/adr/README.md +++ b/plugins/adr/README.md @@ -28,7 +28,7 @@ yarn --cwd packages/app add @backstage/plugin-adr import { EntityAdrContent, isAdrAvailable } from '@backstage/plugin-adr'; ... - +// Note: Add to any other Pages as well (e.g. defaultEntityPage and websiteEntityPage) const serviceEntityPage = ( {/* other tabs... */} @@ -72,7 +72,7 @@ import { AdrSearchResultListItem } from '@backstage/plugin-adr'; import { AdrDocument } from '@backstage/plugin-adr-common'; ... - +// Optional - Add type to side pane - ... -// In filters - - -... - // ADR specific type - {types.includes('adr') && ( - { - // Return a list of entities which have ADRs. - const { items } = await catalogApi.getEntities({ - fields: ['metadata.name'], - filter: { - 'metadata.annotations.backstage.io/adr-location': - CATALOG_FILTER_EXISTS, - }, - }); - - const names = items.map(entity => entity.metadata.name); - names.sort(); - return names; - }} - /> - )} - -... - // In results - - - {({ results }) => ( - case 'adr': - return ( - - ); + + {({ results }) => ( + + {results.map(({ type, document, highlight, rank }) => { + switch (type) { + ... + case 'adr': + return ( + + ); + ... + } + })} + + )} + ``` - ## Custom ADR formats By default, this plugin will parse ADRs according to the format specified by the [Markdown Architecture Decision Record (MADR) v2.x template](https://github.com/adr/madr/tree/2.1.2). If your ADRs are written using a different format, you can apply the following customizations to correctly identify and parse your documents: