From 41e6489b75414c7fe55531223aa23f0817401539 Mon Sep 17 00:00:00 2001 From: Csaba Tuncsik Date: Wed, 2 Nov 2022 09:23:09 +0100 Subject: [PATCH] fix(editor): limiting columns in table view to prevent unresponsive UI when opening NDV (#4480) * fix(editor): limiting columns in table view * fix(editor): adding ghost table column with tooltip to table view * fix(editor): limit columns to 40 * fix(editor): show table columns if it doesn't exceed the limit * fix(editor): rolling back globalLinkActions changes * fix(editor): using i18n tag for having cleaner event handling * fix(editor): emphasizing magic variable * fix(editor): removing unused prop --- packages/editor-ui/src/components/RunData.vue | 1 + .../editor-ui/src/components/RunDataTable.vue | 50 +++++++++++++++---- .../src/plugins/i18n/locales/en.json | 3 ++ 3 files changed, 44 insertions(+), 10 deletions(-) diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index 4e7b97b5ff..6c21b8e0bc 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -229,6 +229,7 @@ :hasDefaultHoverState="paneType === 'input'" @mounted="$emit('tableMounted', $event)" @activeRowChanged="onItemHover" + @displayModeChange="onDisplayModeChange" /> + + +
+ + {{ $locale.baseText('dataMapping.tableView.tableColumnsExceeded.tooltip.link') }} + +
+ + + {{ $locale.baseText('dataMapping.tableView.tableColumnsExceeded') }} + +
+ @@ -129,6 +142,7 @@ + @@ -138,16 +152,16 @@ @@ -654,4 +679,9 @@ export default mixins(externalHooks).extend({ background-color: var(--color-secondary); } } + +.warningTooltip { + color: var(--color-warning); +} + diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 4528a7b65d..718dc61f4f 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -361,6 +361,9 @@ "dataMapping.jsonHint": " Drag a JSON key onto {name} to map data", "dataMapping.mapKeyToField": "Map '{name}' to a field", "dataMapping.mapAllKeysToField": "Map every '{name}' to a field", + "dataMapping.tableView.tableColumnsExceeded": "Some columns are hidden.", + "dataMapping.tableView.tableColumnsExceeded.tooltip": "Your data has more than {columnLimit} columns so some are hidden. Switch to {0} to see all data.", + "dataMapping.tableView.tableColumnsExceeded.tooltip.link": "JSON view", "displayWithChange.cancelEdit": "Cancel Edit", "displayWithChange.clickToChange": "Click to Change", "displayWithChange.setValue": "Set Value",