fix: more tooltips (#6767)

This commit is contained in:
Alexander Onnikov
2024-09-30 20:46:49 +07:00
committed by GitHub
parent 6b68b7f90a
commit 9fac238d56
13 changed files with 57 additions and 11 deletions
@@ -186,11 +186,13 @@
const aside: ButtonItem[] = [
{
id: 'references',
icon: document.icon.References
icon: document.icon.References,
showTooltip: { label: document.string.Backlinks, direction: 'bottom' }
},
{
id: 'activity',
icon: activity.icon.Activity
icon: activity.icon.Activity,
showTooltip: { label: activity.string.Activity, direction: 'bottom' }
}
]
let selectedAside: string | boolean = false
@@ -282,6 +284,7 @@
icon={IconMoreH}
iconProps={{ size: 'medium' }}
kind={'icon'}
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
on:click={showContextMenu}
/>
{#each actions as action}
@@ -311,6 +314,7 @@
fill: doc.color !== undefined ? getPlatformColorDef(doc.color, $themeStore.dark).icon : 'currentColor'
}}
disabled={readonly}
showTooltip={{ label: document.string.Icon, direction: 'bottom' }}
on:click={chooseIcon}
/>
</div>
@@ -19,6 +19,7 @@
import type { Action, AnySvelteComponent } from '@hcengineering/ui'
import { IconMoreH, Menu, navigate, showPopup, NavItem, ButtonIcon } from '@hcengineering/ui'
import { getDocumentLink } from '../../utils'
import view from '@hcengineering/view'
export let doc: Document
export let icon: Asset | AnySvelteComponent | undefined = undefined
@@ -87,6 +88,7 @@
size={'extra-small'}
pressed={hovered}
dataId={'btnDocMore'}
tooltip={{ label: view.string.MoreActions, direction: 'top' }}
on:click={onMenuClick}
/>
</svelte:fragment>
@@ -16,7 +16,7 @@
import { type Doc, type DocumentQuery, type Ref, type WithLookup } from '@hcengineering/core'
import drive, { type Drive, type Folder } from '@hcengineering/drive'
import { Scroller, SearchInput, Panel, Button, IconMoreH } from '@hcengineering/ui'
import { Viewlet, ViewOptions } from '@hcengineering/view'
import view, { Viewlet, ViewOptions } from '@hcengineering/view'
import {
FilterBar,
FilterButton,
@@ -83,6 +83,7 @@
icon={IconMoreH}
iconProps={{ size: 'medium' }}
kind={'icon'}
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
on:click={(ev) => {
showMenu(ev, { object })
}}
@@ -17,6 +17,7 @@
import { type Resource } from '@hcengineering/drive'
import { getClient } from '@hcengineering/presentation'
import { Button, IconMoreH } from '@hcengineering/ui'
import view from '@hcengineering/view'
import { ObjectPresenter, TimestampPresenter, openDoc, showMenu } from '@hcengineering/view-resources'
import { createEventDispatcher } from 'svelte'
@@ -71,6 +72,7 @@
icon={IconMoreH}
kind="ghost"
size="medium"
showTooltip={{ label: view.string.MoreActions, direction: 'bottom' }}
on:click={(evt) => {
hovered = true
showMenu(evt, { object }, () => {
@@ -27,6 +27,7 @@
NavGroup,
ButtonIcon
} from '@hcengineering/ui'
import view from '@hcengineering/view'
export let _id: Ref<Doc> | string | undefined = undefined
export let icon: Asset | AnySvelteComponent | undefined = undefined
@@ -115,6 +116,7 @@
icon={action.icon ?? ActionIcon}
size={'extra-small'}
kind={'tertiary'}
tooltip={{ label: action.label, direction: 'top' }}
on:click={(ev) => onInlineClick(ev, action)}
/>
{/each}
@@ -131,7 +133,14 @@
}}
/>
{:else if popupMenuActions.length > 0}
<ButtonIcon icon={IconMoreH} size={'extra-small'} kind={'tertiary'} {pressed} on:click={onMenuClick} />
<ButtonIcon
icon={IconMoreH}
size={'extra-small'}
kind={'tertiary'}
tooltip={{ label: view.string.MoreActions, direction: 'top' }}
{pressed}
on:click={onMenuClick}
/>
{/if}
</svelte:fragment>
<svelte:fragment slot="visible"><slot name="visible" /></svelte:fragment>
@@ -170,6 +179,7 @@
icon={action.icon ?? ActionIcon}
size={'extra-small'}
kind={'tertiary'}
tooltip={{ label: action.label, direction: 'bottom' }}
on:click={(ev) => onInlineClick(ev, action)}
/>
{/each}