From 9cc1f3cb3084d94cbc53206d51aae9039ee12031 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:11:12 +0530 Subject: [PATCH] Nc Fix: UI improvements - left sidebar (#8244) * fix(nc-gui); update toolbar menu text grom GroupBy to Group * fix(nc-gui): move sidebar base, table expand icon to the right side * fix(nc-gui): sidebar base, table, view menu options padding issue * fix(nc-gui): add background color for row on hover in grid view * fix(nc-gui): reduce width of index column * fix(nc-gui): on hover grid row bg opacity issue * fix(nc-gui): reduce font size and grid cell height * fix(nc-gui): sidebar view menu alignment issue on mobile screen * fix(nc-gui): reduce font size * fix(nc-gui): set column default width to 180px * fix(nc-gui): keep only sidebar changes & revert all other changes * fix(nc-gui): change table icon * fix(nc-gui): trim base, table, view title while saving it * fix(nc-gui): increate left sidebar max width * fix(nc-gui): show truncated base/table/view name until standard end * fix(nc-gui): oss sidebar base menu options alignment issue * fix(nc-gui): use valid classname * fix(nc-gui): sidebar external db source menu ui fixes * fix(nc-gui): small changes * chore(nc-gui): lint * fix(nc-gui): pw test fail issue * fix(nc-gui): trim title while creating base, table, view * fix(nc-gui): some of the sidebar pw test fail issues * fix(test): sidebar test fail issue * fix(test): projectCollaboration test fail issue * fix(nc-gui): change font size of view menu option view mode chip text * fix(nc-gui): grayed out create view dropdown plus icon color * fix(nc-gui): grayed out table icon and reduce width of default view context menu * fix(nc-gui): remove copyright text from user menu * fix(nc-gui): chevron icon and show/hide sidebar icon should be gray in color --- packages/nc-gui/assets/nc-icons/record.svg | 21 +- packages/nc-gui/assets/style.scss | 8 + .../components/dashboard/Sidebar/Header.vue | 2 +- .../components/dashboard/Sidebar/UserInfo.vue | 12 +- .../dashboard/TreeView/CreateViewBtn.vue | 4 +- .../dashboard/TreeView/ProjectNode.vue | 364 ++++++++++-------- .../dashboard/TreeView/TableList.vue | 4 +- .../dashboard/TreeView/TableNode.vue | 242 ++++++------ .../dashboard/TreeView/ViewsList.vue | 4 +- .../dashboard/TreeView/ViewsNode.vue | 16 +- packages/nc-gui/components/dashboard/View.vue | 12 +- .../nc-gui/components/dlg/TableCreate.vue | 2 +- .../nc-gui/components/dlg/TableRename.vue | 14 +- packages/nc-gui/components/dlg/ViewCreate.vue | 4 + .../nc-gui/components/erd/HistogramPanel.vue | 2 +- .../components/general/OpenLeftSidebarBtn.vue | 2 +- .../nc-gui/components/general/TableIcon.vue | 4 +- .../smartsheet/toolbar/GroupByMenu.vue | 2 +- .../smartsheet/toolbar/LockType.vue | 16 +- .../components/workspace/CreateProjectDlg.vue | 4 + packages/nc-gui/composables/useTableNew.ts | 5 + packages/nc-gui/lang/en.json | 3 +- .../Dashboard/Sidebar/ProjectNode/index.ts | 31 +- tests/playwright/pages/Dashboard/TreeView.ts | 71 ++-- tests/playwright/pages/Dashboard/index.ts | 31 +- 25 files changed, 511 insertions(+), 369 deletions(-) diff --git a/packages/nc-gui/assets/nc-icons/record.svg b/packages/nc-gui/assets/nc-icons/record.svg index 7515f62243..d4180461e4 100644 --- a/packages/nc-gui/assets/nc-icons/record.svg +++ b/packages/nc-gui/assets/nc-icons/record.svg @@ -1,12 +1,13 @@ - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index 718be11a0b..b00c4bcbaf 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -720,12 +720,20 @@ input[type='number'] { .nc-sidebar-node-btn:not(.nc-sidebar-expand) { @apply !xs:(hidden); } + + .nc-sidebar-node-btn.nc-sidebar-expand { + @apply !xs:(flex-none border-1 border-gray-200 w-6.5 h-6.5 mr-1); + } } .nc-button.ant-btn.nc-sidebar-node-btn { @apply opacity-0 group-hover:(opacity-100) text-gray-600 hover:(bg-gray-400 bg-opacity-20 text-gray-900) duration-100; } +.nc-button.ant-btn.nc-sidebar-node-btn:not(.nc-sidebar-expand):not(.nc-sidebar-view-node-context-btn) { + @apply hidden group-hover:(inline-block); +} + .nc-button.ant-btn.nc-sidebar-node-btn.nc-sidebar-expand { @apply xs:(opacity-100 hover:bg-gray-50); diff --git a/packages/nc-gui/components/dashboard/Sidebar/Header.vue b/packages/nc-gui/components/dashboard/Sidebar/Header.vue index 3c8be28dc6..c11d24b3dc 100644 --- a/packages/nc-gui/components/dashboard/Sidebar/Header.vue +++ b/packages/nc-gui/components/dashboard/Sidebar/Header.vue @@ -49,7 +49,7 @@ const showSidebarBtn = computed(() => !(isMobileMode.value && !activeViewTitleOr { @@ -658,25 +670,29 @@ const onTableIdCopy = async () => { ghost >