Skip to content

Commit

Permalink
John conroy/publication sidebar (#3061)
Browse files Browse the repository at this point in the history
* Fix section id in contributors table

* Fix section id in publication data

* Add sidebar to publication

* Add changelog

---------

Co-authored-by: John Conroy <[email protected]>
  • Loading branch information
john-conroy and john-conroy authored Mar 26, 2023
1 parent 43fccc2 commit 99a05e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
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

0 comments on commit 99a05e8

Please sign in to comment.