Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] Use fixed width for the right sidebar #7371

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/enhancement-right-sidebar-fixed-width
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 13 additions & 1 deletion packages/web-app-files/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
<div class="files-app-bar-actions">
<div class="oc-flex-1 oc-flex oc-flex-start" style="gap: 15px">
<slot v-if="showActionsOnSelection || selectedFiles.length === 0" name="actions" />
<size-info v-if="showSelectionInfo" class="oc-visible@l" />
<size-info
v-if="showSelectionInfo"
class="oc-visible@l"
:class="{ 'files-app-bar-actions-squashed': !sidebarClosed }"
/>
<batch-actions v-if="showBatchActions" />
</div>
</div>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
19 changes: 19 additions & 0 deletions packages/web-app-files/src/components/FilesList/ResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ exports[`AppBar component renders bulkActions if enabled 1`] = `
<div class="files-app-bar-actions">
<div class="oc-flex-1 oc-flex oc-flex-start" style="gap: 15px;">
<!---->
<size-info-stub class="oc-visible@l"></size-info-stub>
<size-info-stub class="oc-visible@l files-app-bar-actions-squashed"></size-info-stub>
<batch-actions-stub></batch-actions-stub>
</div>
</div>
Expand Down