Skip to content
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
3 changes: 0 additions & 3 deletions packages/web-pkg/src/components/SideBar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ const sidebarProps = computed(() => {
'focus-visible:shadow-none',
...(unref(attrs)?.class ? [unref(attrs).class] : [])
]
if (loading) {
classes.push('flex', 'justify-center', 'items-center')
}
return {
...unref(attrs),
class: classes
Expand Down
13 changes: 9 additions & 4 deletions packages/web-pkg/src/components/SideBar/SideBarPanels.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<template>
<oc-spinner v-if="loading" :aria-label="$gettext('Loading sidebar content')" />
<template v-else>
<div class="sidebar-panels relative size-full">
<div
v-for="panel in displayPanels"
Comment on lines +2 to 4
:id="`sidebar-panel-${panel.name}`"
:key="`panel-${panel.name}`"
:data-testid="`sidebar-panel-${panel.name}`"
:tabindex="activePanelName === panel.name ? -1 : null"
class="sidebar-panel absolute top-0 grid grid-rows-[auto_1fr] bg-role-surface w-full size-full max-w-full max-h-full motion-reduce:transition-none"
:inert="activePanelName !== panel.name"
:inert="activePanelName !== panel.name || loading"
:class="{
'is-root-panel transition-[right] duration-[0.4s,0s]': panel.isRoot?.(panelContext),
'is-active-sub-panel': hasActiveSubPanel && activeSubPanelName === panel.name, // only one specific sub panel can be active
Expand Down Expand Up @@ -95,7 +94,13 @@
</div>
</div>
</div>
</template>
<div
v-if="loading"
class="sidebar-panels-loading absolute inset-0 z-10 flex items-center justify-center"
>
<oc-spinner :aria-label="$gettext('Loading sidebar content')" />
</div>
</div>
</template>
<script setup lang="ts">
import { computed, ref, unref } from 'vue'
Expand Down