From ff004738dd817e79e48dab33bebcb0e6c4922382 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Tue, 27 Oct 2020 15:15:11 +0100 Subject: [PATCH 01/24] WIP Switch to accordions in the sidebar --- apps/files/src/components/FileDetails.vue | 25 +++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/apps/files/src/components/FileDetails.vue b/apps/files/src/components/FileDetails.vue index 2a7963d6018..800e3ef7e28 100644 --- a/apps/files/src/components/FileDetails.vue +++ b/apps/files/src/components/FileDetails.vue @@ -2,7 +2,7 @@ @@ -34,18 +34,7 @@ From dc09a067c854562018432ae8d2caa9b44fe5e6b9 Mon Sep 17 00:00:00 2001 From: Lukas Hirt Date: Tue, 27 Oct 2020 15:40:32 +0100 Subject: [PATCH 02/24] Show actual accordions --- apps/files/src/components/FileDetails.vue | 60 +++-------------------- 1 file changed, 7 insertions(+), 53 deletions(-) diff --git a/apps/files/src/components/FileDetails.vue b/apps/files/src/components/FileDetails.vue index 800e3ef7e28..e6249caaec2 100644 --- a/apps/files/src/components/FileDetails.vue +++ b/apps/files/src/components/FileDetails.vue @@ -34,23 +34,14 @@ @@ -58,7 +49,7 @@ diff --git a/apps/files/src/components/FilesApp.vue b/apps/files/src/components/FilesApp.vue index dba374eb862..fba671b15ce 100644 --- a/apps/files/src/components/FilesApp.vue +++ b/apps/files/src/components/FilesApp.vue @@ -112,7 +112,7 @@ export default { methods: { ...mapActions('Files', ['dragOver', 'setHighlightedFile', 'resetFileSelection']), ...mapActions(['showMessage']), - ...mapMutations('Files', ['SET_DEFAULT_OPENED_ACCORDION']), + ...mapMutations('Files', ['SET_RIGHT_SIDEBAR_EXPANDED_ACCORDION']), ...mapMutations(['SET_SIDEBAR_FOOTER_CONTENT_COMPONENT']), trace() { @@ -121,7 +121,7 @@ export default { openSideBar(file, sideBarName) { this.setHighlightedFile(file) - this.SET_DEFAULT_OPENED_ACCORDION(sideBarName) + this.SET_RIGHT_SIDEBAR_EXPANDED_ACCORDION(sideBarName) }, $_ocApp_dragOver() { diff --git a/apps/files/src/default.js b/apps/files/src/default.js index 545f8968e54..0e340d2cc40 100644 --- a/apps/files/src/default.js +++ b/apps/files/src/default.js @@ -4,7 +4,6 @@ import 'regenerator-runtime/runtime' import FilesApp from './components/FilesApp.vue' import FileInfoVersions from './components/FileInfoVersions.vue' import FileSharingSidebar from './components/FileSharingSidebar.vue' -import FileSidebarWebComponent from './components/FileSidebarWebComponent.vue' import FileLinkSidebar from './components/FileLinkSidebar.vue' import PrivateLink from './components/PrivateLink.vue' import PublicLink from './components/PublicLinks/PublicLink.vue' diff --git a/apps/files/src/quickActions.js b/apps/files/src/quickActions.js index b6178011cef..56d5d3c40e5 100644 --- a/apps/files/src/quickActions.js +++ b/apps/files/src/quickActions.js @@ -48,8 +48,8 @@ function openNewCollaboratorsPanel(ctx) { // Workaround for displaying the new collaborators panel even when one is already opened // Creating timeout takes care of the event loop setTimeout(() => { - ctx.store.commit('Files/SET_DEFAULT_OPENED_ACCORDION', 'files-sharing') - ctx.store.commit('Files/SET_CURRENT_SHARING_SIDEBAR_PANEL', 'newCollaborator') + ctx.store.commit('Files/SET_RIGHT_SIDEBAR_EXPANDED_ACCORDION', 'files-sharing') + ctx.store.commit('Files/SET_RIGHT_SIDEBAR_ACCORDION_CONTEXT', 'newCollaborator') }) } diff --git a/apps/files/src/store/mutations.js b/apps/files/src/store/mutations.js index 605cca89f3d..8510d23e36a 100644 --- a/apps/files/src/store/mutations.js +++ b/apps/files/src/store/mutations.js @@ -258,11 +258,11 @@ export default { state.files = [] }, - SET_CURRENT_SHARING_SIDEBAR_PANEL(state, panel) { - state.currentSharingSidebarPanel = panel + SET_RIGHT_SIDEBAR_EXPANDED_ACCORDION(state, accordion) { + state.rightSidebarExpandedAccordion = accordion }, - SET_DEFAULT_OPENED_ACCORDION(state, accordion) { - state.defaultOpenedAccordion = accordion + SET_RIGHT_SIDEBAR_ACCORDION_CONTEXT(state, panel) { + state.rightSidebarAccordionContext = panel } } diff --git a/apps/files/src/store/state.js b/apps/files/src/store/state.js index d24a34f8dd0..447ae292e73 100644 --- a/apps/files/src/store/state.js +++ b/apps/files/src/store/state.js @@ -53,8 +53,8 @@ export default { actionsInProgress: [], /** - * Sidebar + * Right sidebar */ - currentSharingSidebarPanel: null, - defaultOpenedAccordion: null + rightSidebarExpandedAccordion: null, + rightSidebarAccordionContext: null } diff --git a/package.json b/package.json index b0690c896f5..a4c03f43cc0 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "node-fs-extra": "^0.8.2", "npm-run-all": "^4.1.5", "oidc-client": "^1.9.1", - "owncloud-design-system": "^1.13.0", + "owncloud-design-system": "^1.14.0", "owncloud-sdk": "^1.0.0-740", "p-limit": "^2.2.1", "p-queue": "^6.1.1", diff --git a/yarn.lock b/yarn.lock index dd7bd6ccacb..5bf9bbd5b9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6906,10 +6906,10 @@ os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -owncloud-design-system@^1.13.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/owncloud-design-system/-/owncloud-design-system-1.13.0.tgz#c95721846ebc3576aafc85f1b54d9500940985d1" - integrity sha512-+cdAQ7T2R+GZE1QFkyRCXjHvTxZBXhJmYh3HVD1vMboh5QgmgoRkUjc/NEnwQsWf/JVq+KRTPRlUtAj1xM8a7g== +owncloud-design-system@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/owncloud-design-system/-/owncloud-design-system-1.14.0.tgz#5addaa561c05605c0e4081bea650dfd1d3d3f857" + integrity sha512-sfCc7dlyX63L2SZVNdDEo6XDXkvG7/oDYASp1tIc5ohpwz0UtNnESXBJ3zcZWMzNNJfYpfFAb+KOkG1KjD8Ubw== dependencies: luxon "^1.22.0" mini-css-extract-plugin "^0.9.0" From 7fea1660be8661a6f402e41482fb35e16cce1d5d Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 28 Oct 2020 21:32:38 +0100 Subject: [PATCH 12/24] Use new icon for file versions accordion item --- apps/files/src/default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/src/default.js b/apps/files/src/default.js index 0e340d2cc40..2e1462cb978 100644 --- a/apps/files/src/default.js +++ b/apps/files/src/default.js @@ -52,7 +52,7 @@ const appInfo = { }, { app: 'files-version', - icon: 'restore', + icon: 'file_version', component: FileInfoVersions, enabled(capabilities, highlightedFile) { return !!capabilities.core && highlightedFile && highlightedFile.type !== 'folder' From 525c7341d4383ae6dbc644521e7ca111e472a3a7 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 28 Oct 2020 21:55:42 +0100 Subject: [PATCH 13/24] Rename rightSidebar to appSidebar and adjust tests --- apps/files/src/components/FileDetails.vue | 22 +++++++++------ .../src/components/FileSharingSidebar.vue | 14 +++++----- apps/files/src/components/FilesApp.vue | 4 +-- apps/files/src/quickActions.js | 4 +-- apps/files/src/store/mutations.js | 8 +++--- apps/files/src/store/state.js | 4 +-- .../FilesPageElement/appSideBar.js | 28 ++++++------------- 7 files changed, 39 insertions(+), 45 deletions(-) diff --git a/apps/files/src/components/FileDetails.vue b/apps/files/src/components/FileDetails.vue index c152f1aaafc..bdf7178d653 100644 --- a/apps/files/src/components/FileDetails.vue +++ b/apps/files/src/components/FileDetails.vue @@ -34,14 +34,10 @@