Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Make OcAppSideBar header sticky & cleanup component #1384

Merged
merged 1 commit into from
Jun 16, 2021
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-sticky-appsidebar-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Sticky OcAppSideBar Header

The OcAppSideBar Header is now sticky so the user always sees the filename and most important info.
UX is also improved since he now can always close the appsidebar on mobile without having to scroll back to the top.

https://github.com/owncloud/owncloud-design-system/pull/1384
49 changes: 25 additions & 24 deletions src/components/OcAppSideBar.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<template>
<div class="oc-app-side-bar">
<div class="sidebar-container">
<div class="header primary">
<div v-if="!disableAction" class="action">
<slot name="action">
<oc-button
class="uk-float-right"
:aria-label="closeButtonLabel"
@click="$emit('close')"
>
<oc-icon name="close" />
</oc-button>
</slot>
</div>
<div class="sidebar-title">
<slot name="title">
<span class="oc-text-lead">{{ headingText }}</span>
</slot>
</div>
<div class="oc-app-side-bar-header oc-py-s">
<div v-if="!disableAction" class="action">
<slot name="action">
<oc-button class="uk-float-right" :aria-label="closeButtonLabel" @click="$emit('close')">
<oc-icon name="close" />
</oc-button>
</slot>
</div>
<div class="content">
<slot name="content"></slot>
</div>
<div class="footer">
<slot name="footer"></slot>
<div class="sidebar-title">
<slot name="title">
<span class="oc-text-lead">{{ headingText }}</span>
</slot>
</div>
</div>
<div class="content">
<slot name="content" />
</div>
<div class="footer">
<slot name="footer" />
</div>
</div>
</template>

Expand All @@ -36,7 +30,7 @@
*/
export default {
name: "OcAppSideBar",
status: "prototype",
status: "ready",
release: "1.0.0",
props: {
disableAction: {
Expand Down Expand Up @@ -64,6 +58,13 @@ export default {
.oc-app-side-bar {
height: 100vh;
}

.oc-app-side-bar-header {
background-color: var(--oc-color-background-default);
position: sticky;
top: 0px;
LukasHirt marked this conversation as resolved.
Show resolved Hide resolved
z-index: 1;
}
</style>

<docs>
Expand Down