From 68b9f30b982a9803f64abfdd8cec4f61d2e1a7bb Mon Sep 17 00:00:00 2001 From: nith2001 Date: Sun, 23 Apr 2023 21:05:24 -0700 Subject: [PATCH 001/180] Bug fix for issue #5438, resolved text-overflow with text-wrapping --- packages/nc-gui/components/smartsheet/Form.vue | 12 +++++++++--- .../nc-gui/components/smartsheet/header/Cell.vue | 5 ++--- .../components/smartsheet/header/VirtualCell.vue | 5 ++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index 05a26b2304..55dbb9e020 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -697,7 +697,7 @@ watch(view, (nextView) => { {{ element.description }} +
{{ element.description }}
@@ -861,6 +861,12 @@ watch(view, (nextView) => { } } +.nc-form-help-text, .nc-input-required-error { + max-width: 100%; + word-break: break-all; + white-space: pre-line; +} + :deep(.nc-cell-attachment) { @apply p-0; diff --git a/packages/nc-gui/components/smartsheet/header/Cell.vue b/packages/nc-gui/components/smartsheet/header/Cell.vue index f07c76fd18..ecafbd9f32 100644 --- a/packages/nc-gui/components/smartsheet/header/Cell.vue +++ b/packages/nc-gui/components/smartsheet/header/Cell.vue @@ -53,7 +53,7 @@ const openHeaderMenu = () => { v-if="column" class="name" :class="{ 'cursor-pointer': !isForm && isUIAllowed('edit-column') }" - style="white-space: nowrap" + style="white-space: pre-line" :title="column.title" @dblclick="openHeaderMenu" >{{ column.title }} { diff --git a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue index 7283d420ab..a9d7dca749 100644 --- a/packages/nc-gui/components/smartsheet/header/VirtualCell.vue +++ b/packages/nc-gui/components/smartsheet/header/VirtualCell.vue @@ -121,7 +121,7 @@ const closeAddColumnDropdown = () => { - {{ column.title }} + {{ column.title }}  * @@ -164,7 +164,6 @@ const closeAddColumnDropdown = () => { From 47f34ee7851bf0191379755bef4ec8c72644da37 Mon Sep 17 00:00:00 2001 From: nith2001 Date: Wed, 26 Apr 2023 16:33:50 -0700 Subject: [PATCH 002/180] Enabled wrapping for Form Title Wrapping enabled for title while preserving SelectAll capability. Moving on to fixing the title placeholder so that it has a gray placeholder that can be replaced with black input text. --- .../nc-gui/components/smartsheet/Form.vue | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue index 55dbb9e020..02ee8353c6 100644 --- a/packages/nc-gui/components/smartsheet/Form.vue +++ b/packages/nc-gui/components/smartsheet/Form.vue @@ -386,6 +386,22 @@ watch(view, (nextView) => { reloadEventHook.trigger() } }) + +function selectAll(event: KeyboardEvent) { + if (event.target instanceof Node) { + if (event.metaKey && event.key === "a") { + const userAgent = navigator.userAgent; + if (/Macintosh/.test(userAgent)) { + window.getSelection()?.selectAllChildren(event.target) + event.preventDefault() + } + } else if (event.ctrlKey && event.key === "a") { + window.getSelection()?.selectAllChildren(event.target) + event.preventDefault() + } + } +} +