From 5d6a7b2560005e952e5d9dfb1c2474f3334e8716 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 30 Oct 2023 15:41:26 +0000 Subject: [PATCH 1/3] fix: Removed Untitled from default name in View, table and base create --- packages/nc-gui/components/dlg/ViewCreate.vue | 4 ++-- packages/nc-gui/components/workspace/CreateProjectDlg.vue | 2 +- packages/nc-gui/composables/useTableNew.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/dlg/ViewCreate.vue b/packages/nc-gui/components/dlg/ViewCreate.vue index 2c8307bdd1..3535096681 100644 --- a/packages/nc-gui/components/dlg/ViewCreate.vue +++ b/packages/nc-gui/components/dlg/ViewCreate.vue @@ -110,11 +110,11 @@ watch( ) function init() { - form.title = `Untitled ${capitalize(typeAlias.value)}` + form.title = `${capitalize(typeAlias.value)}` const repeatCount = views.value.filter((v) => v.title.startsWith(form.title)).length if (repeatCount) { - form.title = `${form.title} ${repeatCount}` + form.title = `${form.title}-${repeatCount}` } if (selectedViewId.value) { diff --git a/packages/nc-gui/components/workspace/CreateProjectDlg.vue b/packages/nc-gui/components/workspace/CreateProjectDlg.vue index bde875b7ba..1f49e1b6c6 100644 --- a/packages/nc-gui/components/workspace/CreateProjectDlg.vue +++ b/packages/nc-gui/components/workspace/CreateProjectDlg.vue @@ -72,7 +72,7 @@ watch(dialogShow, async (n, o) => { form.value?.resetFields() formState.value = { - title: 'Untitled Base', + title: 'Base', } await nextTick() diff --git a/packages/nc-gui/composables/useTableNew.ts b/packages/nc-gui/composables/useTableNew.ts index 64bcb0d75b..4f8865c9fe 100644 --- a/packages/nc-gui/composables/useTableNew.ts +++ b/packages/nc-gui/composables/useTableNew.ts @@ -148,7 +148,7 @@ export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => v ) const generateUniqueTitle = () => { - table.title = generateTitle('Untitled Table', tables.value, 'title') + table.title = generateTitle('Table', tables.value, 'title') } const deleteTable = (table: TableType) => { From 27fd967daf3dc5a713b45fd64a93cffdb55d513a Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:41:26 +0000 Subject: [PATCH 2/3] test: fix untitled with kanban --- tests/playwright/tests/db/views/viewKanban.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/tests/db/views/viewKanban.spec.ts b/tests/playwright/tests/db/views/viewKanban.spec.ts index bc2b1cda48..cea0b354db 100644 --- a/tests/playwright/tests/db/views/viewKanban.spec.ts +++ b/tests/playwright/tests/db/views/viewKanban.spec.ts @@ -228,7 +228,7 @@ test.describe('View', () => { await dashboard.viewSidebar.copyView({ title: 'Film Kanban' }); await dashboard.viewSidebar.verifyView({ - title: 'Untitled Kanban', + title: 'Kanban', index: 1, }); const kanban = dashboard.kanban; From 0eb79607383adef303eb5816396bf5836db6c7fa Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 30 Oct 2023 15:41:26 +0000 Subject: [PATCH 3/3] test: fix kanban untitled --- tests/playwright/tests/db/views/viewKanban.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright/tests/db/views/viewKanban.spec.ts b/tests/playwright/tests/db/views/viewKanban.spec.ts index cea0b354db..4146b130f9 100644 --- a/tests/playwright/tests/db/views/viewKanban.spec.ts +++ b/tests/playwright/tests/db/views/viewKanban.spec.ts @@ -254,12 +254,12 @@ test.describe('View', () => { }); await dashboard.viewSidebar.changeViewIcon({ - title: 'Untitled Kanban', + title: 'Kanban', icon: 'american-football', iconDisplay: '🏈', }); - await dashboard.viewSidebar.deleteView({ title: 'Untitled Kanban' }); + await dashboard.viewSidebar.deleteView({ title: 'Kanban' }); /////////////////////////////////////////////// await dashboard.viewSidebar.openView({ title: 'Film Kanban' });