diff --git a/datahub-web-react/src/app/entityV2/shared/tabs/Documentation/components/CompactMarkdownViewer.tsx b/datahub-web-react/src/app/entityV2/shared/tabs/Documentation/components/CompactMarkdownViewer.tsx index 72b20bf72b..a7f34345c8 100644 --- a/datahub-web-react/src/app/entityV2/shared/tabs/Documentation/components/CompactMarkdownViewer.tsx +++ b/datahub-web-react/src/app/entityV2/shared/tabs/Documentation/components/CompactMarkdownViewer.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; import { Editor } from '@app/entityV2/shared/tabs/Documentation/components/editor/Editor'; -import { Button } from '@src/alchemy-components'; +import { Button, Tooltip } from '@src/alchemy-components'; const LINE_HEIGHT = 1.5; @@ -88,6 +88,10 @@ const FixedLineHeightEditor = styled(CompactEditor)<{ customStyle?: React.CSSPro } `; +const MoreIndicator = styled.span` + break-word: normal; +`; + export type Props = { content: string; lineLimit?: number | null; @@ -131,7 +135,11 @@ export default function CompactMarkdownViewer({ readOnly /> - {hideShowMore && <>...} + {hideShowMore && isTruncated && ( + + ... + + )} {!hideShowMore && (isShowingMore || isTruncated) && ( // "show more" when isTruncated, "show less" when isShowingMore