permalinks: replace non-associative references with group name
@@ -119,6 +119,7 @@ function GraphPermalink(
}}
>
{showTransclusion && index && (
+ <>
<TranscludedNode
api={api}
transcluded={transcluded + 1}
@@ -126,30 +127,22 @@ function GraphPermalink(
assoc={association!}
showOurContact={showOurContact}
/>
+ <Row height='12px' />
+ </>
)}
- {!showTransclusion && (
- <Box
- mx="12px"
- mt="12px"
- p="2"
- backgroundColor="washedGray"
- borderRadius="2"
- >
- <Text gray>This reference is unavailable.</Text>
- </Box>
- )}
- {association ? (
+ {association && !isInSameResource ? (
<PermalinkDetails
known
showTransclusion={showTransclusion}
- showDetails={!isInSameResource}
icon={getModuleIcon(association.metadata.config.graph)}
title={association.metadata.title}
permalink={permalink}
/>
- ) : (
+ ) : null}
+ {!association && (
<PermalinkDetails
icon="Groups"
+ showDetails={false}
title={graph.slice(5)}
permalink={permalink}
/>
@@ -166,12 +159,11 @@ function PermalinkDetails(props: {
showDetails?: boolean;
known?: boolean;
}) {
- const { title, icon, permalink, known, showTransclusion , showDetails } = props;
+ const { title, icon, permalink, known, showTransclusion } = props;
const rowTransclusionStyle = showTransclusion
? { p: '12px 12px 11px 11px' }
: { p: '12px' };
- if (showDetails) {
return (
<Row
{...rowTransclusionStyle}
@@ -191,14 +183,6 @@ function PermalinkDetails(props: {
</Row>
</Row>
);
- } else {
- return (
- <Row
- height='12px'
- width="100%"
- />
- );
- }
}
export function PermalinkEmbed(props: {
