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
8 changes: 7 additions & 1 deletion packages/hub-ui/src/client/components/dock/Dock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useEventListener, useScreenSafeArea, whenever } from '@vueuse/core'
import { computed, onMounted, reactive, ref, useTemplateRef } from 'vue'
import { BUILTIN_ENTRY_CLIENT_AUTH_NOTICE } from '../../constants'
import { docksSplitGroupsWithCapacity } from '../../state/dock-settings'
import { setDocksOverflowPanel } from '../../state/floating-tooltip'
import { setDocksOverflowPanel, useDocksGroupPanel } from '../../state/floating-tooltip'
import { useIsRpcTrusted } from '../../utils/useIsRpcTrusted'
import BrandMark from '../icons/BrandMark.vue'
import {
Expand Down Expand Up @@ -175,9 +175,15 @@ function bringUp() {

const isHidden = computed(() => false)

// An open group menu popover anchors to a dock-bar button — collapsing the rail
// out from under it would leave the menu floating, detached from its trigger.
const docksGroupPanel = useDocksGroupPanel()

const isMinimized = computed(() => {
if (context.panel.store.inactiveTimeout < 0)
return false
if (docksGroupPanel.value)
return false
if (context.panel.store.inactiveTimeout === 0)
return true
// @ts-expect-error compatibility
Expand Down
8 changes: 7 additions & 1 deletion packages/hub-ui/src/client/components/dock/DockEdge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useEventListener } from '@vueuse/core'
import { computed, h, onMounted, ref, useTemplateRef } from 'vue'
import { getEntryGroup } from '../../state/dock-settings'
import { sharedStateToRef } from '../../state/docks'
import { setEdgePositionDropdown, setFloatingTooltip, useEdgePositionDropdown } from '../../state/floating-tooltip'
import { setEdgePositionDropdown, setFloatingTooltip, useDocksGroupPanel, useEdgePositionDropdown } from '../../state/floating-tooltip'
import { useIframePanes } from '../../utils/useIframePanes'
import BrandMark from '../icons/BrandMark.vue'
import ViewEntry from '../views/ViewEntry.vue'
Expand Down Expand Up @@ -60,13 +60,19 @@ function bringUp() {
}, +store.inactiveTimeout || 0)
}

// An open group menu popover anchors to a toolbar button — collapsing the
// toolbar out from under it would leave the menu floating, detached from it.
const docksGroupPanel = useDocksGroupPanel()

const isCollapsed = computed(() => {
if (!settings.value.autoCollapseEdgeToolbar)
return false
if (store.inactiveTimeout < 0)
return false
if (context.panel.isDragging)
return false
if (docksGroupPanel.value)
return false
if (hasPanelContent.value)
return false
if (store.inactiveTimeout === 0)
Expand Down
Loading