Skip to content

Commit 13ef20d

Browse files
authored
fix: hotfix for multi-line collection titles COMPASS-9739 (#7499)
1 parent 45b67d8 commit 13ef20d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/compass-data-modeling/src/components/diagram-editor.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ const bannerButtonStyles = css({
8989
marginLeft: 'auto',
9090
});
9191

92+
/**
93+
* This is a hotfix for COMPASS-9738 where collection names spanning over
94+
* multiple lines are not accounted for properly in the diagramming package.
95+
* TODO(COMPASS-9738): Remove this hotfix once we have a proper solution in place.
96+
*/
97+
const diagramStyles = css({
98+
'[data-nodeid] + div > div > div:first-child > div:nth-child(2)': {
99+
overflow: 'hidden',
100+
textOverflow: 'ellipsis',
101+
whiteSpace: 'nowrap',
102+
},
103+
});
104+
92105
const ErrorBannerWithRetry: React.FunctionComponent<{
93106
onRetryClick: () => void;
94107
}> = ({ children, onRetryClick }) => {
@@ -442,6 +455,7 @@ const DiagramContent: React.FunctionComponent<{
442455
// dragging.
443456
nodeDragThreshold={5}
444457
fitViewOptions={ZOOM_OPTIONS}
458+
className={diagramStyles}
445459
/>
446460
</div>
447461
</div>

0 commit comments

Comments
 (0)