diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue index 882a97cb0d..53723393db 100644 --- a/apps/desktop/src/components/grid/DataGrid.vue +++ b/apps/desktop/src/components/grid/DataGrid.vue @@ -4456,8 +4456,9 @@ const canvasDetailButtonStyle = computed(() => { const cell = canvasDetailButtonCell.value; if (!cell) return {}; const actionWidth = cell.canQuickDownload ? 44 : 22; + const edgeGap = 6; return { - left: `${Math.max(DATA_GRID_ROW_NUM_WIDTH, cell.rect.left + cell.rect.width - actionWidth)}px`, + left: `${Math.max(DATA_GRID_ROW_NUM_WIDTH, cell.rect.left + cell.rect.width - actionWidth - edgeGap)}px`, top: `${cell.rect.top + 2}px`, }; }); @@ -5907,6 +5908,10 @@ const TABLE_INFO_DRAWER_MIN_WIDTH = 240; const CELL_DETAIL_PANEL_MIN_HEIGHT = 180; const CELL_DETAIL_PANEL_MIN_WIDTH = 260; const CELL_DETAIL_PANEL_MAX_HEIGHT = 520; +const CELL_DETAIL_TABLE_HEADER_HEIGHT = 28; +const CELL_DETAIL_TABLE_MIN_VISIBLE_ROWS = 1.5; +const CELL_DETAIL_TABLE_HORIZONTAL_SCROLLBAR_HEIGHT = 10; +const CELL_DETAIL_TABLE_MIN_VISIBLE_HEIGHT = Math.ceil(CELL_DETAIL_TABLE_HEADER_HEIGHT + CANVAS_DATA_GRID_ROW_HEIGHT * CELL_DETAIL_TABLE_MIN_VISIBLE_ROWS + CELL_DETAIL_TABLE_HORIZONTAL_SCROLLBAR_HEIGHT); const DRAWER_MAX_WIDTH = 900; function clampCellDetailPanelSize(value: number, layout = cellDetailPanelLayout.value): number { const min = layout === "bottom" ? CELL_DETAIL_PANEL_MIN_HEIGHT : CELL_DETAIL_PANEL_MIN_WIDTH; @@ -5971,13 +5976,19 @@ const ddlDrawerStyle = computed(() => ({ width: `${ddlWidth.value}px`, })); -const detailPanelStyle = computed(() => (cellDetailPanelIsBottom.value ? { height: `${detailPanelHeight.value}px`, maxHeight: `min(70vh, ${CELL_DETAIL_PANEL_MAX_HEIGHT}px)` } : { width: `${detailPanelHeight.value}px` })); - -const contentGridStyle = computed(() => +const detailPanelStyle = computed(() => cellDetailPanelIsBottom.value + ? { + height: "100%", + } + : { width: `${detailPanelHeight.value}px` }, +); + +const contentGridStyle = computed(() => + cellDetailPanelIsBottom.value && showCellDetail.value && activeCellDetail.value ? { gridTemplateColumns: "minmax(0, 1fr) auto", - gridTemplateRows: "minmax(0, 1fr) auto", + gridTemplateRows: `minmax(${CELL_DETAIL_TABLE_MIN_VISIBLE_HEIGHT}px, 1fr) minmax(0, min(${detailPanelHeight.value}px, 70vh, ${CELL_DETAIL_PANEL_MAX_HEIGHT}px, calc(100% - ${CELL_DETAIL_TABLE_MIN_VISIBLE_HEIGHT}px)))`, } : { gridTemplateColumns: "minmax(0, 1fr) auto auto", @@ -7166,7 +7177,7 @@ const gridContextMenuItems = computed(() => { -
+
{{ t("grid.cellValue") }}
@@ -8069,9 +8080,13 @@ const gridContextMenuItems = computed(() => {
-
{{
-                      sideDetailJsonView && activeCellDetail.formattedJson ? activeCellDetail.formattedJson : activeCellDetail.rawValuePreview
-                    }}
+
{{ sideDetailJsonView && activeCellDetail.formattedJson ? activeCellDetail.formattedJson : activeCellDetail.rawValuePreview }}
{{ t("grid.largeValuePreviewHint", { @@ -8082,7 +8097,7 @@ const gridContextMenuItems = computed(() => {
-
+