Skip to content

Commit 9e88349

Browse files
fix: better error message display in data explorer (#4721)
1 parent 01b3edd commit 9e88349

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/shared/components/EmptyGraphError.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.empty-graph-error {
22
width: 100%;
33
height: 100%;
4+
display: flex;
5+
justify-content: space-between;
46
border-radius: $cf-radius;
57
background-color: $cf-grey-5;
68
color: $c-dreamsicle;
@@ -25,5 +27,6 @@
2527
}
2628

2729
.empty-graph-error--scroll {
30+
width: 90% !important;
2831
margin-top: $cf-space-s;
2932
}

src/shared/components/EmptyGraphError.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ const EmptyGraphError: FunctionComponent<Props> = ({message, testID}) => {
3131
return (
3232
<div className="cell--view-empty" data-testid={testID}>
3333
<div className="empty-graph-error" data-testid="empty-graph-error">
34+
<DapperScrollbars className="empty-graph-error--scroll" autoHide={true}>
35+
<pre>
36+
<Icon glyph={IconFont.AlertTriangle} />
37+
<code className="cell--error-message"> {message}</code>
38+
</pre>
39+
</DapperScrollbars>
3440
<CopyToClipboard text={message}>
3541
<Button
3642
size={ComponentSize.ExtraSmall}
@@ -41,12 +47,6 @@ const EmptyGraphError: FunctionComponent<Props> = ({message, testID}) => {
4147
className="empty-graph-error--copy"
4248
/>
4349
</CopyToClipboard>
44-
<DapperScrollbars className="empty-graph-error--scroll" autoHide={true}>
45-
<pre>
46-
<Icon glyph={IconFont.AlertTriangle} />
47-
<code className="cell--error-message"> {message}</code>
48-
</pre>
49-
</DapperScrollbars>
5050
</div>
5151
</div>
5252
)

0 commit comments

Comments
 (0)