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

Add maps sharing prefix #1050

Merged
merged 2 commits into from
Apr 26, 2024
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
6 changes: 3 additions & 3 deletions packages/libs/eda/src/lib/map/MapVeuContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Props {
edaServiceUrl: string;
singleAppMode?: string;
siteInformationProps: SiteInformationProps;
sharingUrl: string;
sharingUrlPrefix?: string;
showLinkToEda?: boolean;
}

Expand All @@ -43,7 +43,7 @@ export function MapVeuContainer(mapVeuContainerProps: Props) {
singleAppMode,
siteInformationProps,
edaServiceUrl,
sharingUrl,
sharingUrlPrefix,
showLinkToEda,
} = mapVeuContainerProps;
const edaClient = useConfiguredSubsettingClient(edaServiceUrl);
Expand Down Expand Up @@ -152,7 +152,7 @@ export function MapVeuContainer(mapVeuContainerProps: Props) {
analysisId={routeProps.match.params.analysisId}
siteInformationProps={siteInformationProps}
studyId={routeProps.match.params.studyId}
sharingUrl={sharingUrl}
sharingUrlPrefix={sharingUrlPrefix}
showLinkToEda={showLinkToEda}
/>
</EDAWorkspaceContainer>
Expand Down
13 changes: 8 additions & 5 deletions packages/libs/eda/src/lib/map/analysis/MapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const mapStyle: React.CSSProperties = {

interface Props {
analysisId?: string;
sharingUrl: string;
sharingUrlPrefix?: string;
singleAppMode?: string;
studyId: string;
siteInformationProps: SiteInformationProps;
Expand Down Expand Up @@ -215,7 +215,7 @@ function MapAnalysisImpl(props: ImplProps) {
setViewport,
setBoundsZoomLevel,
setSubsetVariableAndEntity,
// sharingUrl,
sharingUrlPrefix,
setIsSidePanelExpanded,
setMarkerConfigurations,
setActiveMarkerConfigurationType,
Expand All @@ -236,9 +236,12 @@ function MapAnalysisImpl(props: ImplProps) {
const subsettingClient = useSubsettingClient();
const history = useHistory();

// FIXME use the sharingUrl prop to construct this
const sharingUrl = new URL(`../${analysisId}/import`, window.location.href)
.href;
const sharingUrl = new URL(
sharingUrlPrefix
? `${sharingUrlPrefix}/${analysisId}`
: `../${analysisId}/import`,
window.location.href
).href;

const getDefaultVariableDescriptor = useGetDefaultVariableDescriptor();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ export function EdaMapController() {
siteInformationProps={{
loginUrl: '/user/login',
siteHomeUrl: webAppUrl,
// TODO Remove hardcoded logo after demo
// Hardcode veupathdb logo for now.
siteLogoSrc: `${webAppUrl}/images/VEuPathDB/icons-footer/${projectId.toLowerCase()}.png`,
// siteLogoSrc: `${webAppUrl}/images/VEuPathDB/icons-footer/VEuPathDB.png`,
siteName: projectConfig?.displayName ?? '',
}}
sharingUrl={''}
sharingUrlPrefix={'/maps'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What handles the /maps/<analysisId> route?

showLinkToEda={projectId === 'ClinEpiDB'}
/>
</Suspense>
Expand Down
Loading