diff --git a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx index ba4f2c5b1..0aa59d551 100644 --- a/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx +++ b/pkg/interface/src/views/apps/chat/components/ChatMessage.tsx @@ -221,7 +221,7 @@ const MessageActions = ({ api, onReply, association, history, msg, group }) => { const MessageWrapper = (props) => { const { hovering, bind } = useHovering(); - const showHover = !props.transcluded && hovering && !props.hideHover; + const showHover = (props.transcluded === 0) && hovering && !props.hideHover; return ( { fontSize, hideHover onReply = () => {}, - transcluded = false + transcluded = 0 } = this.props; let { renderSigil } = this.props; @@ -327,12 +327,9 @@ class ChatMessage extends Component { scrollWindow, highlighted, fontSize, -<<<<<<< HEAD - hideHover -======= + hideHover, transcluded, onReply ->>>>>>> 8c4e175200 (permalinks: add transclusion) }; const unreadContainerStyle = { @@ -554,6 +551,7 @@ export const Message = ({ api, scrollWindow, timestampHover, + transcluded, ...rest }) => { const { hovering, bind } = useHovering(); @@ -594,7 +592,11 @@ export const Message = ({ case 'url': if(content.url.startsWith('web+urbit:/')) { return ( - + ); } return ( diff --git a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx index 99f744a38..aacdc6399 100644 --- a/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx +++ b/pkg/interface/src/views/apps/permalinks/TranscludedNode.tsx @@ -95,8 +95,9 @@ function TranscludedPublishNode(props: { export function TranscludedNode(props: { assoc: Association; node: GraphNode; + transcluded: number; }) { - const { node, assoc } = props; + const { node, assoc, transcluded } = props; const group = useGroupForAssoc(assoc)!; switch (assoc.metadata.module) { case "chat": @@ -104,7 +105,7 @@ export function TranscludedNode(props: { s.looseNodes?.[`${ship.slice(1)}/${name}`]?.[index], [ @@ -53,7 +55,7 @@ function GraphPermalink(props: IGraphPermalink & { api: GlobalApi }) { } })(); }, [graph, index]); - const showTransclusion = !!(association && node); + const showTransclusion = !!(association && node && transcluded < 2); const rowTransclusionStyle = showTransclusion ? { @@ -72,9 +74,13 @@ function GraphPermalink(props: IGraphPermalink & { api: GlobalApi }) { borderColor="lightGray" borderRadius="2" > - {association && node && ( + {showTransclusion && ( - + )} ; case "graph": - return ; + return ( + + ); } }