You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/06/17 05:44:17 UTC

(superset) 01/01: fix(sqllab): preserve whitespace in grid result cells

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

rusackas pushed a commit to branch fix/grid-cell-preserve-whitespace
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f055e94cff717619d6a22fbda64bccf9f19aac0f
Author: Superset Dev <de...@superset.apache.org>
AuthorDate: Tue Jun 16 22:43:31 2026 -0700

    fix(sqllab): preserve whitespace in grid result cells
    
    ag-Grid's default cell style collapses runs of whitespace, which
    misrepresents whitespace-sensitive values such as option symbols in
    query/result tables. Apply white-space: pre to .ag-cell-value so the
    displayed value matches the underlying data.
    
    Fixes: #36042
    
    Co-Authored-By: Claude Fable 5 <no...@anthropic.com>
---
 superset-frontend/src/components/GridTable/index.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/superset-frontend/src/components/GridTable/index.tsx b/superset-frontend/src/components/GridTable/index.tsx
index cafe7c67736..a91e901b792 100644
--- a/superset-frontend/src/components/GridTable/index.tsx
+++ b/superset-frontend/src/components/GridTable/index.tsx
@@ -167,6 +167,14 @@ export function GridTable<RecordType extends object>({
           overflow: hidden;
         }
 
+        /* Preserve significant whitespace within cell values (e.g. option
+        symbols and other whitespace-sensitive data). ag-Grid's default
+        collapses runs of spaces, which can misrepresent the underlying
+        value. */
+        .ag-cell-value {
+          white-space: pre;
+        }
+
         & [role='columnheader']:hover .customHeaderAction {
           display: flex;
         }