You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2020/10/22 00:36:33 UTC

[incubator-superset] branch master updated: style(sqllab): wrap text in monospace db-provided error messages (#11354)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 69046f0  style(sqllab): wrap text in monospace db-provided error messages (#11354)
69046f0 is described below

commit 69046f08d44fece691798fcce0eea986e509e015
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Oct 21 17:35:20 2020 -0700

    style(sqllab): wrap text in monospace db-provided error messages (#11354)
---
 superset-frontend/src/SqlLab/components/ResultSet.tsx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/superset-frontend/src/SqlLab/components/ResultSet.tsx b/superset-frontend/src/SqlLab/components/ResultSet.tsx
index 3c8da0b..f83aebb 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet.tsx
@@ -57,9 +57,14 @@ interface ResultSetState {
   data: Record<string, any>[];
 }
 
+// Making text render line breaks/tabs as is as monospace,
+// but wrapping text too so text doesn't overflow
 const MonospaceDiv = styled.div`
   font-family: ${({ theme }) => theme.typography.families.monospace};
   white-space: pre;
+  word-break: break-word;
+  overflow-x: auto;
+  white-space: pre-wrap;
 `;
 
 export default class ResultSet extends React.PureComponent<