Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: show description as pre tag

Ramesh Mane6a2493654116
diff --git a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
index 1cc198303a..274c2fd8e8 100644
--- a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
+++ b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue
@@ -535,7 +535,7 @@ async function onRename() {
<div v-if="!isEditing" class="flex items-center">
<NcTooltip v-if="table.description?.length" placement="bottom">
<template #title>
- {{ table.description }}
+ <div class="whitespace-pre-wrap break-words">{{ table.description }}</div>
</template>
<NcButton type="text" class="!hover:bg-transparent" size="xsmall">
diff --git a/packages/nc-gui/components/dashboard/TreeView/Views/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Views/Node.vue
index 48f3658342..86acfb8098 100644
--- a/packages/nc-gui/components/dashboard/TreeView/Views/Node.vue
+++ b/packages/nc-gui/components/dashboard/TreeView/Views/Node.vue
@@ -304,6 +304,7 @@ watch(isDropdownOpen, async () => {
<div>
<div class="text-[10px] leading-[14px] text-nc-content-brand-hover uppercase mb-1">{{ $t('labels.viewName') }}</div>
<div class="text-small leading-[18px]">{{ vModel.alias || vModel.title }}</div>
+ <div class="mt-1 text-xs whitespace-pre-wrap break-words">{{ vModel.description }}</div>
</div>
<div v-if="vModel?.created_by && idUserMap[vModel?.created_by]">
@@ -400,7 +401,7 @@ watch(isDropdownOpen, async () => {
@mouseleave="showViewNodeTooltip = true"
>
<template #title>
- {{ vModel.description }}
+ <div class="whitespace-pre-wrap break-words">{{ vModel.description }}</div>
</template>
<NcButton type="text" class="!hover:bg-transparent" size="xsmall">
<GeneralIcon
diff --git a/packages/nc-gui/components/smartsheet/header/Cell.vue b/packages/nc-gui/components/smartsheet/header/Cell.vue
index 57e626df73..dfd864c754 100644
--- a/packages/nc-gui/components/smartsheet/header/Cell.vue
+++ b/packages/nc-gui/components/smartsheet/header/Cell.vue
@@ -247,13 +247,16 @@ const onClick = (e: Event) => {
</div>
<NcTooltip v-if="column.description?.length && isPublic && isGrid && !isExpandedForm && !hideMenu">
<template #title>
- {{ column.description }}
+ <div class="whitespace-pre-wrap break-words">{{ column.description }}</div>
</template>
- <GeneralIcon icon="info" class="group-hover:opacity-100 !w-3.5 !h-3.5 !text-gray-500 flex-none" />
+ <div>
+ <GeneralIcon icon="info" class="group-hover:opacity-100 !w-3.5 !h-3.5 !text-gray-500 flex-none" />
+ </div>
</NcTooltip>
<template v-if="!hideMenu || meta?.synced">
<div v-if="!isExpandedForm" class="flex-1" />
+
<div v-if="!isExpandedForm && meta?.synced && column.readonly">
<NcTooltip class="flex items-center" placement="bottom">
<template #title> This field is synced </template>
diff --git a/packages/nc-gui/components/smartsheet/header/Menu.vue b/packages/nc-gui/components/smartsheet/header/Menu.vue
index 168dd588be..931862a4c7 100644
--- a/packages/nc-gui/components/smartsheet/header/Menu.vue
+++ b/packages/nc-gui/components/smartsheet/header/Menu.vue
@@ -56,7 +56,7 @@ const emitEdit = (...args: any[]) => {
<div v-if="isExpandedForm" class="h-[1px]">&nbsp;</div>
<NcTooltip v-if="column?.description?.length && !isExpandedForm" class="flex">
<template #title>
- {{ column?.description }}
+ <div class="whitespace-pre-wrap break-words">{{ column?.description }}</div>
</template>
<GeneralIcon icon="info" class="group-hover:opacity-100 !w-3.5 !h-3.5 !text-gray-500 flex-none" />
</NcTooltip>
diff --git a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
index 6c57a3cb6a..ab133e44d1 100644
--- a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
+++ b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue
@@ -58,6 +58,8 @@ const { metas } = useMetas()
const { isUIAllowed, isMetaReadOnly } = useRoles()
+const isPublic = inject(IsPublicInj, ref(false))
+
const meta = inject(MetaInj, ref())
const isGrid = inject(IsGridInj, ref(false))
@@ -288,6 +290,16 @@ const onClick = (e: Event) => {
}"
/>
</div>
+
+ <NcTooltip v-if="column.description?.length && isPublic && isGrid && !isExpandedForm && !hideMenu">
+ <template #title>
+ <div class="whitespace-pre-wrap break-words">{{ column.description }}</div>
+ </template>
+ <div>
+ <GeneralIcon icon="info" class="group-hover:opacity-100 !w-3.5 !h-3.5 !text-gray-500 flex-none" />
+ </div>
+ </NcTooltip>
+
<template v-if="!hideMenu">
<div v-if="!isExpandedForm" class="flex-1" />