fix(webui): stop menus locking the page, and make tooltips optional
Two things reported from use. The topbar dropdowns shifted the whole page on click. reka's DropdownMenu is modal by default, which locks body scroll; losing the scrollbar widens the layout by its width (measured: 15px at 1440), so everything moved sideways. It also blocked clicking the page while a menu was open. Non-modal is now the default for every dropdown, not just the nav's: a menu is not a dialog. Hover descriptions became a preference on /system/appearance, applied in the Tooltip primitive so a tooltip added later honours it without each call site remembering. On by default; nothing depends on a tooltip to be usable. Appearance also lost its duplicated copy: the page, its first card, and that card's field each said "Appearance" or "Theme" in turn.
This commit is contained in:
1 parent
8346103200
commit
aaa1e0d8c8
7 files changed
+68
-26
No files matched your search
@@ -2,7 +2,7 @@
|
||||
import type { DropdownMenuRootEmits, DropdownMenuRootProps } from 'reka-ui'
|
||||
import { DropdownMenuRoot, useForwardPropsEmits } from 'reka-ui'
|
||||
|
||||
const props = defineProps<DropdownMenuRootProps>()
|
||||
const props = withDefaults(defineProps<DropdownMenuRootProps>(), { modal: false })
|
||||
const emits = defineEmits<DropdownMenuRootEmits>()
|
||||
|
||||
const forwarded = useForwardPropsEmits(props, emits)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { TooltipRootEmits, TooltipRootProps } from 'reka-ui'
|
||||
import { TooltipRoot, useForwardPropsEmits } from 'reka-ui'
|
||||
import { tooltipsEnabled } from '@/lib/preferences'
|
||||
|
||||
const props = defineProps<TooltipRootProps>()
|
||||
const emits = defineEmits<TooltipRootEmits>()
|
||||
@@ -13,6 +14,7 @@ const forwarded = useForwardPropsEmits(props, emits)
|
||||
v-slot="slotProps"
|
||||
data-slot="tooltip"
|
||||
v-bind="forwarded"
|
||||
:disabled="props.disabled || !tooltipsEnabled"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</TooltipRoot>
|
||||
|
||||
Reference in new issue
Block a user