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

John conroy/publication sidebar #3061

Merged
merged 4 commits into from
Mar 26, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG-publication-sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add table of contents sidebar to publication page.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function ContributorsTable({ title, contributors }) {
];

return (
<DetailPageSection id={title}>
<DetailPageSection id={title.toLowerCase()}>
<SectionHeader>{title}</SectionHeader>
<Paper>
<StyledTableContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function PublicationRelatedEntities({ uuid }) {
return (
<RelatedEntitiesSectionWrapper
isLoading={isLoading}
sectionId="publication-entities"
sectionId="data"
headerComponent={
<RelatedEntitiesSectionHeader
header="Data"
Expand Down
9 changes: 6 additions & 3 deletions context/app/static/js/pages/Publication/Publication.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import React from 'react';
import Summary from 'js/components/detailPage/summary/Summary';
import SummaryItem from 'js/components/detailPage/summary/SummaryItem';
import OutboundIconLink from 'js/shared-styles/Links/iconLinks/OutboundIconLink';
import { getCombinedDatasetStatus } from 'js/components/detailPage/utils';
import { getCombinedDatasetStatus, getSectionOrder } from 'js/components/detailPage/utils';
import ContributorsTable from 'js/components/detailPage/ContributorsTable/ContributorsTable';
import PublicationsDataSection from 'js/components/publications/PublicationsDataSection';
import ProvSection from 'js/components/detailPage/provenance/ProvSection';
import DetailLayout from 'js/components/detailPage/DetailLayout';

function Publication({ publication }) {
const {
Expand All @@ -27,12 +28,14 @@ function Publication({ publication }) {
ancestor_ids,
} = publication;

const sectionOrder = getSectionOrder(['summary', 'data', 'authors', 'provenance'], {});

const combinedStatus = getCombinedDatasetStatus({ sub_status, status });

const hasDOI = doi_url !== undefined;

return (
<>
<DetailLayout sectionOrder={sectionOrder}>
<Summary
title={title}
uuid={uuid}
Expand All @@ -52,7 +55,7 @@ function Publication({ publication }) {
<PublicationsDataSection uuid={uuid} datasetUUIDs={ancestor_ids} />
<ContributorsTable contributors={contributors} title="Authors" />
<ProvSection uuid={uuid} assayMetadata={publication} />
</>
</DetailLayout>
);
}

Expand Down