Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into orthogroup-tree-table
Browse files Browse the repository at this point in the history
  • Loading branch information
bobular committed Aug 30, 2024
2 parents dacbd81 + eb7af83 commit 4cce0b1
Show file tree
Hide file tree
Showing 122 changed files with 654 additions and 8,040 deletions.
35 changes: 31 additions & 4 deletions packages/libs/eda/src/lib/map/analysis/MapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ import { AnalysisError } from '../../core/components/AnalysisError';
import useSnackbar from '@veupathdb/coreui/lib/components/notifications/useSnackbar';
import SettingsButton from '@veupathdb/coreui/lib/components/containers/DraggablePanel/SettingsButton';
import { getGeoConfig } from '../../core/utils/geoVariables';
import UserDatasetDetailController from '@veupathdb/user-datasets/lib/Controllers/UserDatasetDetailController';
import { wdkRecordIdToDiyUserDatasetId } from '@veupathdb/user-datasets/lib/Utils/diyDatasets';

enum MapSideNavItemLabels {
Download = 'Download',
Expand Down Expand Up @@ -235,6 +237,7 @@ function MapAnalysisImpl(props: ImplProps) {
const downloadClient = useDownloadClient();
const subsettingClient = useSubsettingClient();
const history = useHistory();
const { url } = useRouteMatch();

const sharingUrl = new URL(
sharingUrlPrefix
Expand Down Expand Up @@ -703,10 +706,34 @@ function MapAnalysisImpl(props: ImplProps) {
}}
>
<H5 additionalStyles={{ margin: '25px 0 0 0' }}>Study Details</H5>
<RecordController
recordClass="dataset"
primaryKey={studyRecord.id.map((p) => p.value).join('/')}
/>
{studyMetadata.isUserStudy ? (
// TODO Make both cases below configurable via the root component.
// This will need to be done if we want EDA to stand on its own.

// 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.
<UserDatasetDetailController
baseUrl={url}
detailsPageTitle={'My Study'}
workspaceTitle={'My Studies'}
id={wdkRecordIdToDiyUserDatasetId(
studyRecord.attributes.dataset_id as string
)}
dataNoun={{
singular: 'Study',
plural: 'Studies',
}}
enablePublicUserDatasets
includeAllLink={false}
includeNameHeader={false}
/>
) : (
<RecordController
recordClass="dataset"
primaryKey={studyRecord.id.map((p) => p.value).join('/')}
/>
)}
</div>
);
},
Expand Down
44 changes: 22 additions & 22 deletions packages/libs/eda/src/lib/map/analysis/TimeSliderQuickFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ export default function TimeSliderQuickFilter({
>
{!minimized && (
<>
<div style={{}}>
<div style={{ maxWidth: 200, marginRight: 'auto' }}>
<InputVariables
inputs={[
{
Expand All @@ -406,10 +406,9 @@ export default function TimeSliderQuickFilter({
constraints={timeSliderVariableConstraints}
/>
</div>
<div>
<div style={{ marginRight: '1em', marginLeft: 'auto' }}>
<button
title={'move range left'}
style={{ marginRight: '1em', marginLeft: '2em' }}
onClick={() => handleArrowClick('left')}
disabled={!active || disableLeftArrow}
>
Expand All @@ -424,28 +423,29 @@ export default function TimeSliderQuickFilter({
</button>
</div>
{/* add axis range control */}
<AxisRangeControl
range={
selectedRange != null
? {
min: selectedRange.start,
max: selectedRange.end,
}
: undefined
}
onRangeChange={handleAxisRangeChange}
valueType={'date'}
containerStyles={{
flex: 1,
}}
// change the height of the input element
inputHeight={30}
disabled={!active}
/>
<div>
<AxisRangeControl
range={
selectedRange != null
? {
min: selectedRange.start,
max: selectedRange.end,
}
: undefined
}
onRangeChange={handleAxisRangeChange}
valueType={'date'}
containerStyles={{
flex: 1,
}}
// change the height of the input element
inputHeight={30}
disabled={!active}
/>
</div>
<div style={{ marginRight: 'auto', marginLeft: '1em' }}>
<button
title={'move range right'}
style={{ marginLeft: '1em', marginRight: '1em' }}
onClick={() => handleArrowClick('right')}
disabled={!active || disableRightArrow}
>
Expand Down
36 changes: 32 additions & 4 deletions packages/libs/eda/src/lib/workspace/AnalysisPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { useGeoConfig } from '../core/hooks/geoConfig';

// Components
import WorkspaceNavigation from '@veupathdb/wdk-client/lib/Components/Workspace/WorkspaceNavigation';
import UserDatasetDetailController from '@veupathdb/user-datasets/lib/Controllers/UserDatasetDetailController';
import { AnalysisSummary } from './AnalysisSummary';
import { EntityDiagram } from '../core';
import { ComputationRoute } from './ComputationRoute';
Expand Down Expand Up @@ -56,6 +57,7 @@ import FilterChipList from '../core/components/FilterChipList';
import { Public } from '@material-ui/icons';
import { Link } from 'react-router-dom';
import { AnalysisError } from '../core/components/AnalysisError';
import { wdkRecordIdToDiyUserDatasetId } from '@veupathdb/user-datasets/lib/Utils/diyDatasets';

const AnalysisTabErrorBoundary = ({
children,
Expand Down Expand Up @@ -418,10 +420,36 @@ export function AnalysisPanel({
path={`${routeBase}/details`}
render={() => (
<AnalysisTabErrorBoundary>
<RecordController
recordClass="dataset"
primaryKey={studyRecord.id.map((p) => p.value).join('/')}
/>
{studyMetadata.isUserStudy ? (
// TODO Make both cases below configurable via the root component.
// This will need to be done if we want EDA to stand on its own.

// 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.
<div style={{ marginBlockStart: '1em' }}>
<UserDatasetDetailController
baseUrl={`${routeBase}/details`}
detailsPageTitle={'My Study'}
workspaceTitle={'My Studies'}
id={wdkRecordIdToDiyUserDatasetId(
studyRecord.attributes.dataset_id as string
)}
dataNoun={{
singular: 'Study',
plural: 'Studies',
}}
enablePublicUserDatasets={true}
includeAllLink={false}
includeNameHeader={false}
/>
</div>
) : (
<RecordController
recordClass="dataset"
primaryKey={studyRecord.id.map((p) => p.value).join('/')}
/>
)}
</AnalysisTabErrorBoundary>
)}
/>
Expand Down
11 changes: 0 additions & 11 deletions packages/libs/user-datasets-legacy/.env.sample

This file was deleted.

17 changes: 0 additions & 17 deletions packages/libs/user-datasets-legacy/.github/workflows/compile.yml

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions packages/libs/user-datasets-legacy/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions packages/libs/user-datasets-legacy/.prettierignore

This file was deleted.

Loading

0 comments on commit 4cce0b1

Please sign in to comment.