From e0be77d88f5225eeb7d8e7805250a86a7615935c Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 30 Jan 2021 16:17:04 +0000 Subject: [PATCH] Move list edit/namespace to separate pages and in a menu (#397) Co-authored-by: kolaente Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/397 Co-authored-by: konrad Co-committed-by: konrad --- cypress/integration/list/list.spec.js | 11 +- src/components/home/navigation.vue | 27 +- src/components/home/topNavigation.vue | 86 +++--- .../list/list-settings-dropdown.vue | 106 +++++++ src/components/misc/card.vue | 6 +- src/components/misc/create-edit.vue | 85 ++++++ src/components/misc/create.vue | 55 ---- src/components/misc/dropdown-item.vue | 28 ++ src/components/misc/dropdown.vue | 50 ++++ src/components/misc/nothing.vue | 11 + src/components/modal/modal.vue | 6 +- .../namespace/namespace-settings-dropdown.vue | 63 ++++ src/components/sharing/linkSharing.vue | 7 +- src/components/sharing/userTeam.vue | 18 +- src/components/tasks/mixins/taskList.js | 18 +- src/helpers/saveListView.js | 4 + src/main.js | 8 + src/router/index.js | 278 ++++++++++++++++-- src/store/index.js | 2 +- src/styles/components/base/card.scss | 5 + src/styles/components/kanban.scss | 9 +- src/styles/components/list-backgrounds.scss | 2 +- src/styles/components/list.scss | 59 ++-- src/styles/components/modal.scss | 11 + src/styles/theme/content.scss | 14 + src/styles/theme/form.scss | 5 + src/styles/theme/navigation.scss | 48 +-- src/styles/theme/theme.scss | 29 +- src/styles/theme/variables/colors.scss | 1 + src/views/filters/EditSavedFilter.vue | 159 ---------- src/views/filters/settings/delete.vue | 44 +++ src/views/filters/settings/edit.vue | 128 ++++++++ src/views/labels/NewLabel.vue | 8 +- src/views/list/EditList.vue | 266 ----------------- src/views/list/EditListView.vue | 25 -- src/views/list/NewList.vue | 8 +- src/views/list/ShowList.vue | 25 +- src/views/list/settings/archive.vue | 52 ++++ .../list/settings/background.vue} | 34 +-- src/views/list/settings/delete.vue | 43 +++ src/views/list/settings/duplicate.vue | 58 ++++ src/views/list/settings/edit.vue | 127 ++++++++ src/views/list/settings/share.vue | 78 +++++ src/views/list/views/Kanban.vue | 101 +++---- src/views/list/views/List.vue | 8 +- src/views/list/views/Table.vue | 2 +- src/views/namespaces/EditNamespace.vue | 201 ------------- src/views/namespaces/NewNamespace.vue | 8 +- src/views/namespaces/settings/archive.vue | 52 ++++ src/views/namespaces/settings/delete.vue | 44 +++ src/views/namespaces/settings/edit.vue | 137 +++++++++ src/views/namespaces/settings/share.vue | 77 +++++ src/views/teams/EditTeam.vue | 2 +- src/views/teams/NewTeam.vue | 8 +- 54 files changed, 1773 insertions(+), 974 deletions(-) create mode 100644 src/components/list/list-settings-dropdown.vue create mode 100644 src/components/misc/create-edit.vue delete mode 100644 src/components/misc/create.vue create mode 100644 src/components/misc/dropdown-item.vue create mode 100644 src/components/misc/dropdown.vue create mode 100644 src/components/misc/nothing.vue create mode 100644 src/components/namespace/namespace-settings-dropdown.vue delete mode 100644 src/views/filters/EditSavedFilter.vue create mode 100644 src/views/filters/settings/delete.vue create mode 100644 src/views/filters/settings/edit.vue delete mode 100644 src/views/list/EditList.vue delete mode 100644 src/views/list/EditListView.vue create mode 100644 src/views/list/settings/archive.vue rename src/{components/list/partials/background-settings.vue => views/list/settings/background.vue} (91%) create mode 100644 src/views/list/settings/delete.vue create mode 100644 src/views/list/settings/duplicate.vue create mode 100644 src/views/list/settings/edit.vue create mode 100644 src/views/list/settings/share.vue delete mode 100644 src/views/namespaces/EditNamespace.vue create mode 100644 src/views/namespaces/settings/archive.vue create mode 100644 src/views/namespaces/settings/delete.vue create mode 100644 src/views/namespaces/settings/edit.vue create mode 100644 src/views/namespaces/settings/share.vue diff --git a/cypress/integration/list/list.spec.js b/cypress/integration/list/list.spec.js index 6093871e..28b6b509 100644 --- a/cypress/integration/list/list.spec.js +++ b/cypress/integration/list/list.spec.js @@ -21,7 +21,10 @@ describe('Lists', () => { it('Should create a new list', () => { cy.visit('/') - cy.get('.namespace-title a[href="/namespaces/1/list"]') + cy.get('.namespace-title .dropdown-trigger') + .click() + cy.get('.namespace-title .dropdown .dropdown-item') + .contains('New list') .click() cy.url() .should('contain', '/namespaces/1/list') @@ -58,9 +61,8 @@ describe('Lists', () => { .should('contain', '/lists/1/list') cy.get('.list-title h1') .should('contain', 'First List') - cy.get('.list-title a.icon') - .should('have.attr', 'href') - .and('include', '/lists/1/edit') + cy.get('.list-title .dropdown') + .should('exist') cy.get('p') .contains('This list is currently empty.') .should('exist') @@ -363,6 +365,7 @@ describe('Lists', () => { cy.getAttached('.kanban .bucket .tasks .task') .contains(tasks[0].title) + .should('be.visible') .click() cy.url() diff --git a/src/components/home/navigation.vue b/src/components/home/navigation.vue index 2942bc0d..2dc5ff7c 100644 --- a/src/components/home/navigation.vue +++ b/src/components/home/navigation.vue @@ -64,25 +64,7 @@ {{ n.title }} ({{ n.lists.filter(l => !l.isArchived).length }}) -
- - - - - - - - - - -
+ + @@ -134,9 +117,15 @@ diff --git a/src/components/misc/card.vue b/src/components/misc/card.vue index fc512075..bf391039 100644 --- a/src/components/misc/card.vue +++ b/src/components/misc/card.vue @@ -10,7 +10,7 @@ -
+
@@ -46,6 +46,10 @@ export default { type: Boolean, default: true, }, + loading: { + type: Boolean, + default: false, + }, }, } diff --git a/src/components/misc/create-edit.vue b/src/components/misc/create-edit.vue new file mode 100644 index 00000000..01aba2d3 --- /dev/null +++ b/src/components/misc/create-edit.vue @@ -0,0 +1,85 @@ + + + diff --git a/src/components/misc/create.vue b/src/components/misc/create.vue deleted file mode 100644 index 121286bb..00000000 --- a/src/components/misc/create.vue +++ /dev/null @@ -1,55 +0,0 @@ - - - diff --git a/src/components/misc/dropdown-item.vue b/src/components/misc/dropdown-item.vue new file mode 100644 index 00000000..861b0893 --- /dev/null +++ b/src/components/misc/dropdown-item.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/components/misc/dropdown.vue b/src/components/misc/dropdown.vue new file mode 100644 index 00000000..9c51d06a --- /dev/null +++ b/src/components/misc/dropdown.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/components/misc/nothing.vue b/src/components/misc/nothing.vue new file mode 100644 index 00000000..923d924b --- /dev/null +++ b/src/components/misc/nothing.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue index 1c74e59b..3c130d09 100644 --- a/src/components/modal/modal.vue +++ b/src/components/modal/modal.vue @@ -2,7 +2,7 @@