diff --git a/packages/libs/eda/src/lib/workspace/AnalysisPanel.tsx b/packages/libs/eda/src/lib/workspace/AnalysisPanel.tsx
index cc38c8e5f7..7587793db6 100644
--- a/packages/libs/eda/src/lib/workspace/AnalysisPanel.tsx
+++ b/packages/libs/eda/src/lib/workspace/AnalysisPanel.tsx
@@ -427,21 +427,23 @@ export function AnalysisPanel({
// Note that we are not inluding the custom detail page.
// As of this writing, details pages only add a link to
// EDA. Since we are in EDA, we don't want to add it here.
-
+ This {dataNoun.singular.toLowerCase()} is not compatible with{' '} + {projectId}. +
+ ); + } else if (isInstalled) { + return ( + // if we've installed successfully and we're installable, we're compatible ++ This {dataNoun.singular.toLowerCase()} is compatible with{' '} + {projectId}. It is installed for use. +
+ ); + } else { + // instead of attempting to provide very granular messaging for when things are neither + // compatible nor incompatible, let's let the dataset page's Status messaging handle this + return null; + } + } + + getCompatibilityTableColumns() { + const { userDataset } = this.props; + const { projects } = userDataset; + return [ + { + key: 'project', + name: 'VEuPathDB Website', + renderCell() { + return projects.join(', '); + }, + }, + { + key: 'resourceDisplayName', + name: 'Required Resource', + renderCell({ row }) { + const { resourceDisplayName } = row; + return resourceDisplayName; + }, + }, + { + key: 'resourceVersion', + name: 'Required Resource Release', + renderCell({ row }) { + const { resourceVersion } = row; + return resourceVersion; + }, + }, + ]; + } + // See note in the base class, UserDatasetDetail /** @return {import("react").ReactNode[]} */ getPageSections() { - const [headerSection, compatSection, fileSection] = super.getPageSections(); + const [headerSection, fileSection] = super.getPageSections(); return [ headerSection, - compatSection, + this.renderCompatibilitySection, this.renderTracksSection, fileSection, ]; diff --git a/packages/libs/user-datasets/src/lib/Components/Detail/BiomDatasetDetail.jsx b/packages/libs/user-datasets/src/lib/Components/Detail/BiomDatasetDetail.jsx deleted file mode 100644 index fffcc9662b..0000000000 --- a/packages/libs/user-datasets/src/lib/Components/Detail/BiomDatasetDetail.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import { Link } from 'react-router-dom'; - -import UserDatasetDetail from './UserDatasetDetail'; - -class BiomDatasetDetail extends UserDatasetDetail { - constructor(props) { - super(props); - this.renderEdaLinkout = this.renderEdaLinkout.bind(this); - } - - renderEdaLinkout() { - const { - config: { displayName, projectId }, - userDataset: { status }, - edaWorkspaceUrl, - } = this.props; - - const isInstalled = - status?.import === 'complete' && - status?.install?.find((d) => d.projectId === projectId)?.dataStatus === - 'complete'; - - return !isInstalled || !edaWorkspaceUrl ? null : ( -- This {dataNoun.singular.toLowerCase()} is not compatible with{' '} - {projectId}. -
- ); - } else if (isInstalled) { - return ( - // if we've installed successfully and we're installable, we're compatible -- This {dataNoun.singular.toLowerCase()} is compatible with{' '} - {projectId}. It is installed for use. -
- ); - } else { - // instead of attempting to provide very granular messaging for when things are neither - // compatible nor incompatible, let's let the dataset page's Status messaging handle this - return null; - } - } - - getCompatibilityTableColumns() { - const { userDataset } = this.props; - const { projects } = userDataset; - return [ - { - key: 'project', - name: 'VEuPathDB Website', - renderCell() { - return projects.join(', '); - }, - }, - { - key: 'resourceDisplayName', - name: 'Required Resource', - renderCell({ row }) { - const { resourceDisplayName } = row; - return resourceDisplayName; - }, - }, - { - key: 'resourceVersion', - name: 'Required Resource Release', - renderCell({ row }) { - const { resourceVersion } = row; - return resourceVersion; - }, - }, - ]; - } - /* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= General Rendering @@ -650,11 +509,7 @@ class UserDatasetDetail extends React.Component { // The ReactNode type is better suited, here, since it allows for null values. /** @return {import("react").ReactNode[]} */ getPageSections() { - return [ - this.renderHeaderSection, - this.renderCompatibilitySection, - this.renderFileSection, - ]; + return [this.renderHeaderSection, this.renderFileSection]; } render() { diff --git a/packages/libs/user-datasets/src/lib/Components/Detail/UserDatasetDetail.scss b/packages/libs/user-datasets/src/lib/Components/Detail/UserDatasetDetail.scss index b9fa2c2b3f..8fdce4d0ba 100644 --- a/packages/libs/user-datasets/src/lib/Components/Detail/UserDatasetDetail.scss +++ b/packages/libs/user-datasets/src/lib/Components/Detail/UserDatasetDetail.scss @@ -24,8 +24,16 @@ padding: 20px 0; } - .UserDatasetDetail-SectionTitle { - margin-bottom: 10px; + h2 { + padding: 0; + font-size: 1.65em; + color: black; + } + h3 { + padding: 0; + font-size: 1.3em; + margin-top: 1.1em; + margin-bottom: 0.5em; .wdk-Icon { color: $blue; margin-right: 10px; @@ -81,6 +89,14 @@ font-size: 1.4em; font-weight: 300; + &:last-child { + margin-bottom: 0; + } + + a { + font-weight: 500; + } + &.UserDatasetDetail-Name { font-weight: 400; font-size: 2.8em; @@ -100,18 +116,23 @@ } .UserDatasetDetail-AttributeValue { flex: 1 1 auto; + ul { + display: flex; + list-style: none; + margin: 0; + li + li:before { + content: '|'; + margin: 0 1ex; + } + } } } - .UserDatasetDetail-Owner { - margin-top: 1em; - } - .UserDatasetDetail-Summary { - margin-top: 2em; - margin-bottom: 1em; - flex-direction: column; - } - .UserDatasetDetail-Description { - flex-direction: column; + .UserDatasetDetail { + &-Owner, + &-Summary, + &-Created { + margin-top: 1em; + } } } } diff --git a/packages/libs/user-datasets/src/lib/Components/UploadForm.tsx b/packages/libs/user-datasets/src/lib/Components/UploadForm.tsx index 4e0bcbe583..5be92d60cc 100644 --- a/packages/libs/user-datasets/src/lib/Components/UploadForm.tsx +++ b/packages/libs/user-datasets/src/lib/Components/UploadForm.tsx @@ -251,7 +251,7 @@ function UploadForm({ datasetUploadType.formConfig.description?.inputProps; const summaryRequired = summaryInputProps?.required ?? true; - const descriptionRequired = descriptionInputProps?.required ?? true; + const descriptionRequired = descriptionInputProps?.required ?? false; const defaultFileInputField = (