Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add instructions to the atlas detail tabs (#502) #503

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { GridPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { Fragment } from "react";
import { HCAAtlasTrackerSourceDataset } from "../../../../apis/catalog/hca-atlas-tracker/common/entities";
import { FormManager as FormManagerProps } from "../../../../hooks/useFormManager/common/entities";
import { getAtlasSourceDatasetsTableColumns } from "../../../../viewModelBuilders/catalog/hca-atlas-tracker/common/viewModelBuilders";
import { SourceDatasetsInformation } from "../../../common/MDXContent";
import {
StyledFluidPaper,
StyledSectionContent,
} from "../../../Layout/components/Detail/components/Section/section.styles";
import { Paper } from "../../../Table/components/TablePaper/tablePaper.styles";
import { TablePlaceholder } from "../../../Table/components/TablePlaceholder/tablePlaceholder";
import { Table } from "../../../Table/table.styles";
Expand All @@ -23,22 +29,29 @@ export const ViewAtlasSourceDatasets = ({
} = formManager;
if (!canView) return <RequestAccess />;
return (
<Paper>
<GridPaper>
{atlasSourceDatasets.length > 0 && (
<Table
columns={getAtlasSourceDatasetsTableColumns()}
gridTemplateColumns="max-content minmax(180px, 0.4fr) minmax(200px, 1fr) minmax(180px, auto) repeat(4, minmax(88px, 0.4fr)) auto"
items={atlasSourceDatasets.sort(sortLinkedSourceDataset)}
tableOptions={TABLE_OPTIONS}
<Fragment>
<StyledFluidPaper>
<StyledSectionContent>
<SourceDatasetsInformation />
</StyledSectionContent>
</StyledFluidPaper>
<Paper>
<GridPaper>
{atlasSourceDatasets.length > 0 && (
<Table
columns={getAtlasSourceDatasetsTableColumns()}
gridTemplateColumns="max-content minmax(180px, 0.4fr) minmax(200px, 1fr) minmax(180px, auto) repeat(4, minmax(88px, 0.4fr)) auto"
items={atlasSourceDatasets.sort(sortLinkedSourceDataset)}
tableOptions={TABLE_OPTIONS}
/>
)}
<TablePlaceholder
canEdit={canEdit}
message="No source datasets"
rowCount={atlasSourceDatasets.length}
/>
)}
<TablePlaceholder
canEdit={canEdit}
message="No source datasets"
rowCount={atlasSourceDatasets.length}
/>
</GridPaper>
</Paper>
</GridPaper>
</Paper>
</Fragment>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { SectionContent } from "@databiosphere/findable-ui/lib/components/common/MDXMarkdown/components/Section/mdxSection.styles";
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { textBody4002Lines } from "@databiosphere/findable-ui/lib/styles/common/mixins/fonts";
import styled from "@emotion/styled";

export const StyledFluidPaper = styled(FluidPaper)`
grid-column: 1 / -1;
padding: 16px;
`;

export const StyledSectionContent = styled(SectionContent)`
${textBody4002Lines};

ol,
ul {
margin: 0;
padding-left: 24px;
}

li {
margin: 8px 0;
}
`;
1 change: 1 addition & 0 deletions app/components/common/MDXContent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as ConfidentialNotice } from "./confidentialNotice.mdx";
export { default as LoginTermsOfService } from "./loginTermsOfService.mdx";
export { default as LoginText } from "./loginText.mdx";
export { default as SourceDatasetsInformation } from "./sourceDatasetsInformation.mdx";
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Source Datasets

Here is a list of the source datasets that are used in this project.

- See [validating source datasets](/validating-atlas-source-study-list) content.
Loading