Merge branch 'master' into fix-view-techdocs-link
This commit is contained in:
@@ -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