diff --git a/changelog/unreleased/enhancement-right-sidebar-fixed-width b/changelog/unreleased/enhancement-right-sidebar-fixed-width new file mode 100644 index 00000000000..3bcd4a03676 --- /dev/null +++ b/changelog/unreleased/enhancement-right-sidebar-fixed-width @@ -0,0 +1,5 @@ +Enhancement: Use fixed width for the right sidebar + +We've set a fixed width of 440px to the right sidebar to have better control of its styling and alignment. + +https://github.com/owncloud/web/pull/7371 diff --git a/packages/web-app-files/src/App.vue b/packages/web-app-files/src/App.vue index 65b6f3e4073..61b6852931e 100644 --- a/packages/web-app-files/src/App.vue +++ b/packages/web-app-files/src/App.vue @@ -8,7 +8,6 @@ id="files-sidebar" ref="filesSidebar" tabindex="-1" - class="oc-width-1-1 oc-width-2-5@m oc-width-1-4@xl" :sidebar-active-panel="sidebarActivePanel" @beforeDestroy="focusSideBar" @mounted="focusSideBar" @@ -97,6 +96,13 @@ main { #files-sidebar { position: relative; overflow: hidden; + width: 440px; +} + +@media only screen and (max-width: 960px) { + #files-sidebar { + width: 100%; + } } #files-view { diff --git a/packages/web-app-files/src/components/AppBar/AppBar.vue b/packages/web-app-files/src/components/AppBar/AppBar.vue index a5aa892b7ea..e0cf6711aeb 100644 --- a/packages/web-app-files/src/components/AppBar/AppBar.vue +++ b/packages/web-app-files/src/components/AppBar/AppBar.vue @@ -34,7 +34,11 @@
- +
@@ -79,6 +83,7 @@ export default { computed: { ...mapGetters('Files', ['files', 'selectedFiles']), ...mapState('Files', ['areHiddenFilesShown', 'areFileExtensionsShown']), + ...mapState('Files/sidebar', { sidebarClosed: 'closed' }), pageTitle() { const title = this.$route.meta.title @@ -149,6 +154,13 @@ export default { gap: var(--oc-space-small); justify-content: flex-end; min-height: 3rem; + + &-squashed { + display: none; + @media only screen and (min-width: 1400px) { + display: inherit; + } + } } #files-breadcrumb { diff --git a/packages/web-app-files/src/components/FilesList/ResourceTable.vue b/packages/web-app-files/src/components/FilesList/ResourceTable.vue index 6e31f447b7c..e304b8ae614 100644 --- a/packages/web-app-files/src/components/FilesList/ResourceTable.vue +++ b/packages/web-app-files/src/components/FilesList/ResourceTable.vue @@ -911,5 +911,24 @@ export default defineComponent({ } } } + + &-squashed { + .resource-table-actions div { + display: none; + + @media only screen and (min-width: 1200px) { + display: inherit; + } + } + + .oc-table-header-cell-indicators, + .oc-table-data-cell-indicators { + display: none; + + @media only screen and (min-width: 1200px) { + display: table-cell; + } + } + } } diff --git a/packages/web-app-files/tests/unit/components/AppBar/__snapshots__/AppBar.spec.js.snap b/packages/web-app-files/tests/unit/components/AppBar/__snapshots__/AppBar.spec.js.snap index bf125c37172..63ee5c9ccfe 100644 --- a/packages/web-app-files/tests/unit/components/AppBar/__snapshots__/AppBar.spec.js.snap +++ b/packages/web-app-files/tests/unit/components/AppBar/__snapshots__/AppBar.spec.js.snap @@ -85,7 +85,7 @@ exports[`AppBar component renders bulkActions if enabled 1`] = `
- +