Skip to content

Commit 0eaa579

Browse files
committed
docs(search): add changeset files
Signed-off-by: Camila Belo <camilaibs@gmail.com>
1 parent 5dc2618 commit 0eaa579

11 files changed

Lines changed: 45 additions & 21 deletions

File tree

.changeset/gold-bulldogs-talk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/plugin-search': minor
3+
---
4+
5+
Update `SearchModal` component to use `SearchResult` extensions.

.changeset/nasty-beans-accept.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/create-app': minor
3+
---
4+
5+
Update `SearchPage` template to use `SearchResult` extensions.

.changeset/old-knives-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/plugin-catalog': minor
3+
---
4+
5+
The `CatalogSearchResultListItem` component is now a search result extension. This means that when rendered as a child of components that render search extensions, the `result`, `rank`, and `highlight` properties are optional. See the [documentation](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions) for more details.

.changeset/rich-snakes-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/plugin-explore': minor
3+
---
4+
5+
The `ToolSearchResultListItem` component is now a search result extension. This means that when rendered as a child of components that render search extensions, the `result`, `rank`, and `highlight` properties are optional. See the [documentation](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions) for more details.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@backstage/plugin-search-react': minor
3+
---
4+
5+
- Create the search results extensions, for more details see the documentation [here](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions);
6+
- Update the `SearchResult`, `SearchResultList` and `SearchResultGroup` components to use extensions and default their props to optionally accept a query, when the query is not passed, the component tries to get it from the search context.

.changeset/witty-moose-itch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/plugin-techdocs': minor
3+
---
4+
5+
The `TechDocsSearchResultListItem` component is now a search result extension. This means that when rendered as a child of components that render search extensions, the `result`, `rank`, and `highlight` properties are optional. See the [documentation](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions) for more details.

plugins/catalog/api-report.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { default as React_2 } from 'react';
1919
import { ReactNode } from 'react';
2020
import { ResultHighlight } from '@backstage/plugin-search-common';
2121
import { RouteRef } from '@backstage/core-plugin-api';
22-
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
2322
import { StarredEntitiesApi } from '@backstage/plugin-catalog-react';
2423
import { StorageApi } from '@backstage/core-plugin-api';
2524
import { StyleRules } from '@material-ui/core/styles/withStyles';
@@ -108,7 +107,9 @@ export const catalogPlugin: BackstagePlugin<
108107
>;
109108

110109
// @public (undocumented)
111-
export const CatalogSearchResultListItem: SearchResultListItemExtensionComponent<CatalogSearchResultListItemProps>;
110+
export const CatalogSearchResultListItem: (
111+
props: CatalogSearchResultListItemProps,
112+
) => JSX.Element | null;
112113

113114
// @public
114115
export interface CatalogSearchResultListItemProps {

plugins/explore/api-report.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { IndexableDocument } from '@backstage/plugin-search-common';
1919
import { ReactNode } from 'react';
2020
import { ResultHighlight } from '@backstage/plugin-search-common';
2121
import { RouteRef } from '@backstage/core-plugin-api';
22-
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
2322
import { TabProps } from '@material-ui/core';
2423

2524
// @public @deprecated (undocumented)
@@ -126,7 +125,9 @@ export const ToolExplorerContent: (props: {
126125
}) => JSX.Element;
127126

128127
// @public (undocumented)
129-
export const ToolSearchResultListItem: SearchResultListItemExtensionComponent<ToolSearchResultListItemProps>;
128+
export const ToolSearchResultListItem: (
129+
props: ToolSearchResultListItemProps,
130+
) => JSX.Element | null;
130131

131132
// @public
132133
export interface ToolSearchResultListItemProps {

plugins/search-react/api-report.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export const CheckboxFilter: (props: SearchFilterComponentProps) => JSX.Element;
3737

3838
// @public
3939
export const createSearchResultListItemExtension: <
40-
Props extends SearchResultListItemExtensionProps,
40+
Component extends (props: any) => JSX.Element | null,
4141
>(
42-
options: SearchResultListItemExtensionOptions<Props>,
43-
) => Extension<SearchResultListItemExtensionComponent<Props>>;
42+
options: SearchResultListItemExtensionOptions<Component>,
43+
) => Extension<Component>;
4444

4545
// @public (undocumented)
4646
export const DefaultResultListItem: (
@@ -382,17 +382,12 @@ export type SearchResultGroupTextFilterFieldProps =
382382
// @public
383383
export const SearchResultList: (props: SearchResultListProps) => JSX.Element;
384384

385-
// @public
386-
export type SearchResultListItemExtensionComponent<
387-
Props extends SearchResultListItemExtensionProps,
388-
> = (props: Props) => JSX.Element | null;
389-
390385
// @public
391386
export type SearchResultListItemExtensionOptions<
392-
Props extends SearchResultListItemExtensionProps = SearchResultListItemExtensionProps,
387+
Component extends (props: any) => JSX.Element | null,
393388
> = {
394389
name: string;
395-
component: (props: Props) => JSX.Element | null;
390+
component: () => Promise<Component>;
396391
predicate?: (result: SearchResult_2) => boolean;
397392
};
398393

plugins/search/api-report.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@
66
/// <reference types="react" />
77

88
import { BackstagePlugin } from '@backstage/core-plugin-api';
9-
import { DefaultResultListItemProps } from '@backstage/plugin-search-react';
109
import { IconComponent } from '@backstage/core-plugin-api';
1110
import { ReactNode } from 'react';
1211
import { RouteRef } from '@backstage/core-plugin-api';
1312
import { SearchBarBaseProps } from '@backstage/plugin-search-react';
14-
import { SearchResultListItemExtensionComponent } from '@backstage/plugin-search-react';
15-
16-
// @public (undocumented)
17-
export const DefaultSearchResultListItem: SearchResultListItemExtensionComponent<DefaultResultListItemProps>;
1813

1914
// @public (undocumented)
2015
export const HomePageSearchBar: ({

0 commit comments

Comments
 (0)