Merge branch 'master' into fix-view-techdocs-link
This commit is contained in:
@@ -1,5 +1,63 @@
|
||||
# @backstage/plugin-techdocs
|
||||
|
||||
## 1.3.1-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7a98c73dc8: Fixed techdocs sidebar layout bug for medium devices.
|
||||
- Updated dependencies
|
||||
- @backstage/integration@1.3.0-next.0
|
||||
- @backstage/core-plugin-api@1.0.5-next.0
|
||||
- @backstage/integration-react@1.1.3-next.0
|
||||
- @backstage/plugin-catalog-react@1.1.3-next.0
|
||||
- @backstage/core-components@0.10.1-next.0
|
||||
- @backstage/plugin-search-react@1.0.1-next.0
|
||||
- @backstage/plugin-techdocs-react@1.0.3-next.0
|
||||
|
||||
## 1.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ebf3eb1641: Use the same initial filter `owned` for the `TechDocsIndexPage` as for the `CatalogPage`.
|
||||
|
||||
If you prefer to keep the previous behavior, you can change the default for the initial filter
|
||||
to `all` (or `starred` if you rather prefer that).
|
||||
|
||||
```
|
||||
<TechDocsIndexPage initiallySelectedFilter="all" />
|
||||
```
|
||||
|
||||
In general, with this change you will be able to set props at `TechDocsIndexPage`.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a70869e775: Updated dependency `msw` to `^0.43.0`.
|
||||
- 8006d0f9bf: Updated dependency `msw` to `^0.44.0`.
|
||||
- e2d7b76f43: Upgrade git-url-parse to 12.0.0.
|
||||
|
||||
Motivation for upgrade is transitively upgrading parse-url which is vulnerable
|
||||
to several CVEs detected by Snyk.
|
||||
|
||||
- SNYK-JS-PARSEURL-2935944
|
||||
- SNYK-JS-PARSEURL-2935947
|
||||
- SNYK-JS-PARSEURL-2936249
|
||||
|
||||
- 3cbebf710e: Reorder browser tab title in Techdocs pages to have the site name first.
|
||||
- 726577958f: Remove the 60% factor from the font size calculation of headers to use the exact size defined in BackstageTheme.
|
||||
- 7739141ab2: Fix: When docs are shown in an entity page under the docs tab the sidebars start overlapping with the header and tabs in the page when you scroll the documentation content.
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.10.0
|
||||
- @backstage/catalog-model@1.1.0
|
||||
- @backstage/plugin-techdocs-react@1.0.2
|
||||
- @backstage/plugin-search-react@1.0.0
|
||||
- @backstage/plugin-search-common@1.0.0
|
||||
- @backstage/core-plugin-api@1.0.4
|
||||
- @backstage/integration@1.2.2
|
||||
- @backstage/integration-react@1.1.2
|
||||
- @backstage/plugin-catalog-react@1.1.2
|
||||
- @backstage/theme@0.2.16
|
||||
- @backstage/errors@1.1.0
|
||||
|
||||
## 1.2.1-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -45,15 +45,11 @@ export type ContentStateTypes =
|
||||
|
||||
// @public
|
||||
export const DefaultTechDocsHome: (
|
||||
props: DefaultTechDocsHomeProps,
|
||||
props: TechDocsIndexPageProps,
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type DefaultTechDocsHomeProps = {
|
||||
initialFilter?: UserListFilterKind;
|
||||
columns?: TableColumn<DocsTableRow>[];
|
||||
actions?: TableProps<DocsTableRow>['actions'];
|
||||
};
|
||||
// @public @deprecated
|
||||
export type DefaultTechDocsHomeProps = TechDocsIndexPageProps;
|
||||
|
||||
// @public
|
||||
export const DocsCardGrid: (props: DocsCardGridProps) => JSX.Element | null;
|
||||
@@ -256,7 +252,14 @@ export type TechDocsCustomHomeProps = {
|
||||
export type TechDocsEntityMetadata = TechDocsEntityMetadata_2;
|
||||
|
||||
// @public
|
||||
export const TechDocsIndexPage: () => JSX.Element;
|
||||
export const TechDocsIndexPage: (props: TechDocsIndexPageProps) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export type TechDocsIndexPageProps = {
|
||||
initialFilter?: UserListFilterKind;
|
||||
columns?: TableColumn<DocsTableRow>[];
|
||||
actions?: TableProps<DocsTableRow>['actions'];
|
||||
};
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export type TechDocsMetadata = TechDocsMetadata_2;
|
||||
@@ -288,6 +291,7 @@ const techdocsPlugin: BackstagePlugin<
|
||||
}>;
|
||||
entityContent: RouteRef<undefined>;
|
||||
},
|
||||
{},
|
||||
{}
|
||||
>;
|
||||
export { techdocsPlugin as plugin };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/plugin-techdocs",
|
||||
"description": "The Backstage plugin that renders technical documentation for your components",
|
||||
"version": "1.2.1-next.3",
|
||||
"version": "1.3.1-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -35,18 +35,18 @@
|
||||
"clean": "backstage-cli package clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^1.1.0-next.3",
|
||||
"@backstage/catalog-model": "^1.1.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-components": "^0.10.0-next.3",
|
||||
"@backstage/core-plugin-api": "^1.0.4-next.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/integration": "^1.2.2-next.3",
|
||||
"@backstage/integration-react": "^1.1.2-next.3",
|
||||
"@backstage/plugin-catalog-react": "^1.1.2-next.3",
|
||||
"@backstage/plugin-search-common": "^0.3.6-next.0",
|
||||
"@backstage/plugin-search-react": "^0.2.2-next.3",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.2-next.2",
|
||||
"@backstage/theme": "^0.2.16-next.1",
|
||||
"@backstage/core-components": "^0.10.1-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.5-next.0",
|
||||
"@backstage/errors": "^1.1.0",
|
||||
"@backstage/integration": "^1.3.0-next.0",
|
||||
"@backstage/integration-react": "^1.1.3-next.0",
|
||||
"@backstage/plugin-catalog-react": "^1.1.3-next.0",
|
||||
"@backstage/plugin-search-common": "^1.0.0",
|
||||
"@backstage/plugin-search-react": "^1.0.1-next.0",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.3-next.0",
|
||||
"@backstage/theme": "^0.2.16",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -67,10 +67,10 @@
|
||||
"react-dom": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.18.0-next.3",
|
||||
"@backstage/core-app-api": "^1.0.4-next.1",
|
||||
"@backstage/dev-utils": "^1.0.4-next.3",
|
||||
"@backstage/test-utils": "^1.1.2-next.2",
|
||||
"@backstage/cli": "^0.18.1-next.0",
|
||||
"@backstage/core-app-api": "^1.0.5-next.0",
|
||||
"@backstage/dev-utils": "^1.0.5-next.0",
|
||||
"@backstage/test-utils": "^1.1.3-next.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -19,39 +19,34 @@ import {
|
||||
Content,
|
||||
ContentHeader,
|
||||
SupportButton,
|
||||
TableColumn,
|
||||
TableProps,
|
||||
} from '@backstage/core-components';
|
||||
import {
|
||||
CatalogFilterLayout,
|
||||
EntityListProvider,
|
||||
EntityOwnerPicker,
|
||||
EntityTagPicker,
|
||||
UserListFilterKind,
|
||||
UserListPicker,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { TechDocsPageWrapper } from './TechDocsPageWrapper';
|
||||
import { TechDocsPicker } from './TechDocsPicker';
|
||||
import { DocsTableRow, EntityListDocsTable } from './Tables';
|
||||
import { EntityListDocsTable } from './Tables';
|
||||
import { TechDocsIndexPageProps } from './TechDocsIndexPage';
|
||||
|
||||
/**
|
||||
* Props for {@link DefaultTechDocsHome}
|
||||
*
|
||||
* @public
|
||||
* @deprecated Please use `TechDocsIndexPageProps` instead.
|
||||
*/
|
||||
export type DefaultTechDocsHomeProps = {
|
||||
initialFilter?: UserListFilterKind;
|
||||
columns?: TableColumn<DocsTableRow>[];
|
||||
actions?: TableProps<DocsTableRow>['actions'];
|
||||
};
|
||||
export type DefaultTechDocsHomeProps = TechDocsIndexPageProps;
|
||||
|
||||
/**
|
||||
* Component which renders a default documentation landing page.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const DefaultTechDocsHome = (props: DefaultTechDocsHomeProps) => {
|
||||
const { initialFilter = 'all', columns, actions } = props;
|
||||
export const DefaultTechDocsHome = (props: TechDocsIndexPageProps) => {
|
||||
const { initialFilter = 'owned', columns, actions } = props;
|
||||
return (
|
||||
<TechDocsPageWrapper>
|
||||
<Content>
|
||||
|
||||
@@ -16,10 +16,24 @@
|
||||
|
||||
import React from 'react';
|
||||
import { useOutlet } from 'react-router';
|
||||
import { TableColumn, TableProps } from '@backstage/core-components';
|
||||
import { UserListFilterKind } from '@backstage/plugin-catalog-react';
|
||||
import { DefaultTechDocsHome } from './DefaultTechDocsHome';
|
||||
import { DocsTableRow } from './Tables';
|
||||
|
||||
export const TechDocsIndexPage = () => {
|
||||
/**
|
||||
* Props for {@link TechDocsIndexPage}
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type TechDocsIndexPageProps = {
|
||||
initialFilter?: UserListFilterKind;
|
||||
columns?: TableColumn<DocsTableRow>[];
|
||||
actions?: TableProps<DocsTableRow>['actions'];
|
||||
};
|
||||
|
||||
export const TechDocsIndexPage = (props: TechDocsIndexPageProps) => {
|
||||
const outlet = useOutlet();
|
||||
|
||||
return outlet || <DefaultTechDocsHome />;
|
||||
return outlet || <DefaultTechDocsHome {...props} />;
|
||||
};
|
||||
|
||||
@@ -24,5 +24,6 @@ export type {
|
||||
TabsConfig,
|
||||
TechDocsCustomHomeProps,
|
||||
} from './TechDocsCustomHome';
|
||||
export type { TechDocsIndexPageProps } from './TechDocsIndexPage';
|
||||
export * from './TechDocsPageWrapper';
|
||||
export * from './TechDocsPicker';
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
import { RuleOptions } from './types';
|
||||
|
||||
const SIDEBAR_WIDTH = '224px';
|
||||
|
||||
export default ({ theme, sidebar }: RuleOptions) => `
|
||||
/*================== Layout ==================*/
|
||||
|
||||
@@ -61,7 +63,7 @@ export default ({ theme, sidebar }: RuleOptions) => `
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.md-sidebar .md-sidebar__scrollwrap {
|
||||
width: calc(16rem - 10px);
|
||||
width: calc(12.1rem);
|
||||
}
|
||||
.md-sidebar--secondary {
|
||||
right: ${theme.spacing(3)}px;
|
||||
@@ -169,7 +171,9 @@ export default ({ theme, sidebar }: RuleOptions) => `
|
||||
width: 12.1rem !important;
|
||||
z-index: 200;
|
||||
left: ${
|
||||
sidebar.isPinned ? 'calc(-12.1rem + 242px)' : 'calc(-12.1rem + 72px)'
|
||||
sidebar.isPinned
|
||||
? `calc(-12.1rem + ${SIDEBAR_WIDTH})`
|
||||
: 'calc(-12.1rem + 72px)'
|
||||
} !important;
|
||||
}
|
||||
.md-sidebar--secondary:not([hidden]) {
|
||||
|
||||
Reference in New Issue
Block a user