fix(editor): Table view column limit tooltip (#4655)

* fix(editor): Table view column limit tooltip

* fix(editor): lint fix

* fix(editor): fix max column limit

* fix(editor): code formatting
This commit is contained in:
Csaba Tuncsik 2022-11-21 13:00:21 +01:00 committed by GitHub
parent 6b52e4b111
commit 3ac9ba3491
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 16 deletions

View file

@ -69,8 +69,7 @@
:stickyOffset="4" :stickyOffset="4"
@drop="onDrop" @drop="onDrop"
> >
<!-- eslint-disable-next-line vue/v-slot-style --> <template #default="{ droppable, activeDrop }">
<template v-slot="{ droppable, activeDrop }">
<div <div
:class="{ :class="{
[$style.listModeInputContainer]: isListMode, [$style.listModeInputContainer]: isListMode,
@ -104,17 +103,16 @@
@focus="onInputFocus" @focus="onInputFocus"
@blur="onInputBlur" @blur="onInputBlur"
> >
<!-- eslint-disable-next-line vue/no-deprecated-slot-attribute --> <template v-if="isListMode" #suffix>
<div v-if="isListMode" slot="suffix"> <i
<i :class="{
:class="{ ['el-input__icon']: true,
['el-input__icon']: true, ['el-icon-arrow-down']: true,
['el-icon-arrow-down']: true, [$style.selectIcon]: true,
[$style.selectIcon]: true, [$style.isReverse]: showResourceDropdown,
[$style.isReverse]: showResourceDropdown, }"
}" />
></i> </template>
</div>
</n8n-input> </n8n-input>
</div> </div>
</template> </template>

View file

@ -73,7 +73,10 @@
<template #content> <template #content>
<div> <div>
<i18n path="dataMapping.tableView.tableColumnsExceeded.tooltip"> <i18n path="dataMapping.tableView.tableColumnsExceeded.tooltip">
<a @click="switchToJsonView">{{ $locale.baseText('dataMapping.tableView.tableColumnsExceeded.tooltip.link') }}</a> <template #columnLimit>{{ columnLimit }}</template>
<template #link>
<a @click="switchToJsonView">{{ $locale.baseText('dataMapping.tableView.tableColumnsExceeded.tooltip.link') }}</a>
</template>
</i18n> </i18n>
</div> </div>
</template> </template>
@ -212,6 +215,7 @@ export default mixins(externalHooks).extend({
hoveringPath: null as null | string, hoveringPath: null as null | string,
mappingHintVisible: false, mappingHintVisible: false,
activeRow: null as number | null, activeRow: null as number | null,
columnLimit: MAX_COLUMNS_LIMIT,
columnLimitExceeded: false, columnLimitExceeded: false,
}; };
}, },

View file

@ -364,8 +364,8 @@
"dataMapping.jsonHint": "<img src='/static/json-mapping-gif.gif'/> Drag a JSON key onto <b>{name}</b> to map data", "dataMapping.jsonHint": "<img src='/static/json-mapping-gif.gif'/> Drag a JSON key onto <b>{name}</b> to map data",
"dataMapping.mapKeyToField": "Map '{name}' to a field", "dataMapping.mapKeyToField": "Map '{name}' to a field",
"dataMapping.mapAllKeysToField": "Map every '{name}' to a field", "dataMapping.mapAllKeysToField": "Map every '{name}' to a field",
"dataMapping.tableView.tableColumnsExceeded": "Some columns are hidden.", "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": "Your data has more than {columnLimit} columns so some are hidden. Switch to {link} to see all data.",
"dataMapping.tableView.tableColumnsExceeded.tooltip.link": "JSON view", "dataMapping.tableView.tableColumnsExceeded.tooltip.link": "JSON view",
"displayWithChange.cancelEdit": "Cancel Edit", "displayWithChange.cancelEdit": "Cancel Edit",
"displayWithChange.clickToChange": "Click to Change", "displayWithChange.clickToChange": "Click to Change",