SBIN2010 commented on code in PR #44907:
URL: https://github.com/apache/superset/pull/44907#discussion_r4186835113


##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/renderers/JsonCellRenderer.tsx:
##########
@@ -0,0 +1,590 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import {
+  type ReactNode,
+  useCallback,
+  useEffect,
+  useLayoutEffect,
+  useMemo,
+  useRef,
+  useState,
+} from 'react';
+import { t, tn } from '@apache-superset/core/translation';
+import { styled } from '@apache-superset/core/theme';
+import { Button, Icons, Modal } from '@superset-ui/core/components';
+import {
+  type JsonContainer,
+  jsonCellPreview,
+  jsonCellWrappedText,
+} from './parseJsonCellValue';
+import { syncJsonCellRowHeight } from './jsonCellRowHeight';
+
+const MAX_JSON_DEPTH = 32;
+const JSON_CELL_ROW_CHROME_PX = 12;
+const COPIED_RESET_MS = 2000;
+const PREVIEW_TITLE_MAX_LENGTH = 500;
+
+type JsonCellGridApi = {
+  resetRowHeights?: () => void;
+  onRowHeightChanged?: () => void;
+  isDestroyed?: () => boolean;
+};
+
+type JsonCellRowNode = {
+  setRowHeight?: (height: number | null | undefined) => void;
+};
+
+export type JsonCellRendererProps = {
+  value: JsonContainer;
+  rawText?: string;
+  colId: string;
+  autoHeight: boolean;
+  wrapText?: boolean;
+  jsonInCell?: boolean;
+  api?: JsonCellGridApi;
+  node?: JsonCellRowNode;
+  eGridCell?: HTMLElement | null;
+};
+
+const Root = styled.div`
+  ${({ theme }) => `
+    display: flex;
+    flex-direction: column;
+    gap: ${theme.sizeUnit / 2}px;
+    width: 100%;
+    min-width: 0;
+    white-space: inherit;
+    word-break: inherit;
+  `}
+`;
+
+const Toolbar = styled.div`
+  ${({ theme }) => `
+    display: flex;
+    align-items: center;
+    gap: ${theme.sizeUnit}px;
+    min-width: 0;
+
+    &[data-wrap='true'] {
+      align-items: flex-start;
+    }
+  `}
+`;
+
+const ToolbarMain = styled.div`
+  display: flex;
+  flex: 1;
+  align-items: center;
+  min-width: 0;
+`;
+
+const Preview = styled.span`
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  flex: 1;
+  min-width: 0;

Review Comment:
   fix in 
https://github.com/apache/superset/commit/43ec4ce487612caa0998da73207613e3f41b099e.
 In a column where long cell contents are truncated, hovering over a cell 
removes the ellipsis from JSON data, just as it does for ordinary text.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to