Version Packages

This commit is contained in:
github-actions[bot]
2021-06-10 12:18:06 +00:00
parent ed351ec8cf
commit 4a93128245
144 changed files with 1399 additions and 965 deletions
+132
View File
@@ -1,5 +1,137 @@
# @backstage/plugin-search
## 0.4.0
### Minor Changes
- 5aff84759: This release represents a move out of a pre-alpha phase of the Backstage Search
plugin, into an alpha phase. With this release, you gain more control over the
layout of your search page on the frontend, as well as the ability to extend
search on the backend to encompass everything Backstage users may want to find.
If you are updating to this version of `@backstage/plugin-search` from a prior
release, you will need to make the following modifications to your App:
In your app package, create a new `searchPage` component at, for example,
`packages/app/src/components/search/SearchPage.tsx` with contents like the
following:
```tsx
import React from 'react';
import { makeStyles, Theme, Grid, List, Paper } from '@material-ui/core';
import { Content, Header, Lifecycle, Page } from '@backstage/core';
import { CatalogResultListItem } from '@backstage/plugin-catalog';
import {
SearchBar,
SearchFilter,
SearchResult,
DefaultResultListItem,
} from '@backstage/plugin-search';
const useStyles = makeStyles((theme: Theme) => ({
bar: {
padding: theme.spacing(1, 0),
},
filters: {
padding: theme.spacing(2),
},
filter: {
'& + &': {
marginTop: theme.spacing(2.5),
},
},
}));
const SearchPage = () => {
const classes = useStyles();
return (
<Page themeId="home">
<Header title="Search" subtitle={<Lifecycle alpha />} />
<Content>
<Grid container direction="row">
<Grid item xs={12}>
<Paper className={classes.bar}>
<SearchBar debounceTime={100} />
</Paper>
</Grid>
<Grid item xs={3}>
<Paper className={classes.filters}>
<SearchFilter.Select
className={classes.filter}
name="kind"
values={['Component', 'Template']}
/>
<SearchFilter.Checkbox
className={classes.filter}
name="lifecycle"
values={['experimental', 'production']}
/>
</Paper>
</Grid>
<Grid item xs={9}>
<SearchResult>
{({ results }) => (
<List>
{results.map(({ type, document }) => {
switch (type) {
case 'software-catalog':
return (
<CatalogResultListItem
key={document.location}
result={document}
/>
);
default:
return (
<DefaultResultListItem
key={document.location}
result={document}
/>
);
}
})}
</List>
)}
</SearchResult>
</Grid>
</Grid>
</Content>
</Page>
);
};
export const searchPage = <SearchPage />;
```
Then in `App.tsx`, import this new `searchPage` component, and set it as a
child of the existing `<SearchPage />` route so that it looks like this:
```tsx
import { searchPage } from './components/search/SearchPage';
// ...
<Route path="/search" element={<SearchPage />}>
{searchPage}
</Route>;
```
You will also need to update your backend. For details, check the changeset for
`v0.2.0` of `@backstage/plugin-search-backend`.
### Patch Changes
- db1c8f93b: The `<Search...Next /> set of components exported by the Search Plugin are now updated to use the Search Backend API. These will be made available as the default non-"next" versions in a follow-up release.
The interfaces for decorators and collators in the Search Backend have also seen minor, breaking revisions ahead of a general release. If you happen to be building on top of these interfaces, check and update your implementations accordingly. The APIs will be considered more stable in a follow-up release.
- Updated dependencies [27a9b503a]
- Updated dependencies [7028ee1ca]
- Updated dependencies [db1c8f93b]
- @backstage/catalog-model@0.8.2
- @backstage/plugin-catalog-react@0.2.2
- @backstage/search-common@0.1.2
## 0.3.7
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-search",
"version": "0.3.7",
"version": "0.4.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,9 +30,9 @@
},
"dependencies": {
"@backstage/core": "^0.7.11",
"@backstage/catalog-model": "^0.8.0",
"@backstage/plugin-catalog-react": "^0.2.0",
"@backstage/search-common": "^0.1.1",
"@backstage/catalog-model": "^0.8.2",
"@backstage/plugin-catalog-react": "^0.2.2",
"@backstage/search-common": "^0.1.2",
"@backstage/config": "^0.1.5",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
@@ -47,7 +47,7 @@
"react-use": "^17.2.4"
},
"devDependencies": {
"@backstage/cli": "^0.6.14",
"@backstage/cli": "^0.7.0",
"@backstage/dev-utils": "^0.1.17",
"@backstage/test-utils": "^0.1.13",
"@testing-library/jest-dom": "^5.10.1",