From 7b0419011bfa57b072f91ae5bd6bbff5d4200131 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:34:15 +0530 Subject: [PATCH] Nc fix: expanded record UI/UX (#8847) * fix(nc-gui): update qr code according to new design * fix(nc-gui): audit logs empty state style * fix(nc-gui): small changes * fix(nc-gui): update barcode & qrcode cell from expanded form * fix(nc-gui): increase expanded form field gap --- .../nc-gui/components/cell/DatePicker.vue | 2 +- .../nc-gui/components/cell/DateTimePicker.vue | 2 +- .../nc-gui/components/cell/TimePicker.vue | 2 +- .../nc-gui/components/cell/YearPicker.vue | 2 +- .../smartsheet/expanded-form/index.vue | 30 ++++++++++++++++++- .../nc-gui/components/virtual-cell/QrCode.vue | 4 +-- .../virtual-cell/barcode/Barcode.vue | 2 ++ .../nc-gui/components/workspace/AuditLogs.vue | 7 +++-- packages/nc-gui/composables/useUndoRedo.ts | 4 ++- packages/nc-gui/utils/browserUtils.ts | 2 +- 10 files changed, 46 insertions(+), 11 deletions(-) diff --git a/packages/nc-gui/components/cell/DatePicker.vue b/packages/nc-gui/components/cell/DatePicker.vue index a7523275ea..bbc33d93da 100644 --- a/packages/nc-gui/components/cell/DatePicker.vue +++ b/packages/nc-gui/components/cell/DatePicker.vue @@ -249,7 +249,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => { !isGrid.value || isExpandedForm.value || isEditColumn.value || - isExpandedFormOpen() + isExpandedFormOpenExist() ) { return } diff --git a/packages/nc-gui/components/cell/DateTimePicker.vue b/packages/nc-gui/components/cell/DateTimePicker.vue index b7e98b446e..120ec17e26 100644 --- a/packages/nc-gui/components/cell/DateTimePicker.vue +++ b/packages/nc-gui/components/cell/DateTimePicker.vue @@ -303,7 +303,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => { !isGrid.value || isExpandedForm.value || isEditColumn.value || - isExpandedFormOpen() + isExpandedFormOpenExist() ) { return } diff --git a/packages/nc-gui/components/cell/TimePicker.vue b/packages/nc-gui/components/cell/TimePicker.vue index 61dafab85f..6644a0c1f4 100644 --- a/packages/nc-gui/components/cell/TimePicker.vue +++ b/packages/nc-gui/components/cell/TimePicker.vue @@ -233,7 +233,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => { !isGrid.value || isExpandedForm.value || isEditColumn.value || - isExpandedFormOpen() + isExpandedFormOpenExist() ) { return } diff --git a/packages/nc-gui/components/cell/YearPicker.vue b/packages/nc-gui/components/cell/YearPicker.vue index 5e05a0f249..3745590f5b 100644 --- a/packages/nc-gui/components/cell/YearPicker.vue +++ b/packages/nc-gui/components/cell/YearPicker.vue @@ -214,7 +214,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => { !isGrid.value || isExpandedForm.value || isEditColumn.value || - isExpandedFormOpen() + isExpandedFormOpenExist() ) { return } diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index fde52241f8..0beb5dc009 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -738,7 +738,7 @@ export default { >
div { + @apply !px-0; + } + .barcode-wrapper { + @apply ml-0; + } + } + :deep(.nc-virtual-cell-qrcode) { + img { + @apply !h-[84px] border-1 border-solid border-gray-200 rounded; + } + } + :deep(.nc-virtual-cell-barcode) { + .nc-barcode-container { + @apply border-1 rounded-lg border-gray-200 h-[64px] max-w-full p-2; + svg { + @apply !h-full; + } + } + } + } } .nc-data-cell:focus-within { @apply !border-1 !border-brand-500; diff --git a/packages/nc-gui/components/virtual-cell/QrCode.vue b/packages/nc-gui/components/virtual-cell/QrCode.vue index 219b171eab..92749c9e4c 100644 --- a/packages/nc-gui/components/virtual-cell/QrCode.vue +++ b/packages/nc-gui/components/virtual-cell/QrCode.vue @@ -75,7 +75,7 @@ const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning } = us
- +
{{ $t('labels.qrCodeValueTooLong') }} diff --git a/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue b/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue index 82c813007b..0d287cd4f1 100644 --- a/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue +++ b/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue @@ -70,6 +70,7 @@ const rowHeight = inject(RowHeightInj, ref(undefined)) :custom-style="{ height: rowHeight ? `${rowHeight === 1 ? rowHeightInPx['1'] - 4 : rowHeightInPx[`${rowHeight}`] - 20}px` : `1.8rem`, }" + class="nc-barcode-container" @on-click-barcode="showBarcodeModal" >