mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
chore: Displays the dataset description in a tooltip in the datasets list (#16392)
This commit is contained in:
parent
bc4b6f0a6c
commit
0cdc7675b4
@ -52,6 +52,14 @@ const StyledTooltip = styled(Tooltip)`
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledTooltipTitle = styled.span`
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 20;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
`;
|
||||
|
||||
const defaultOverlayStyle = {
|
||||
fontSize: '12px',
|
||||
lineHeight: '16px',
|
||||
@ -69,7 +77,7 @@ export default function InfoTooltip({
|
||||
}: InfoTooltipProps) {
|
||||
return (
|
||||
<StyledTooltip
|
||||
title={tooltip}
|
||||
title={<StyledTooltipTitle>{tooltip}</StyledTooltipTitle>}
|
||||
placement={placement}
|
||||
trigger={trigger}
|
||||
overlayStyle={overlayStyle}
|
||||
|
@ -51,6 +51,7 @@ import { Tooltip } from 'src/components/Tooltip';
|
||||
import Icons from 'src/components/Icons';
|
||||
import FacePile from 'src/components/FacePile';
|
||||
import CertifiedIcon from 'src/components/CertifiedIcon';
|
||||
import InfoTooltip from 'src/components/InfoTooltip';
|
||||
import ImportModelsModal from 'src/components/ImportModal/index';
|
||||
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
|
||||
import WarningIconWithTooltip from 'src/components/WarningIconWithTooltip';
|
||||
@ -228,6 +229,7 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
|
||||
original: {
|
||||
extra,
|
||||
table_name: datasetTitle,
|
||||
description,
|
||||
explore_url: exploreURL,
|
||||
},
|
||||
},
|
||||
@ -249,6 +251,9 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
|
||||
/>
|
||||
)}
|
||||
{titleLink}
|
||||
{description && (
|
||||
<InfoTooltip tooltip={description} viewBox="0 -1 24 24" />
|
||||
)}
|
||||
</FlexRowContainer>
|
||||
);
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user