Hide inbox tooltips and fic cursor (#6060)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2024-07-12 19:15:55 +04:00 committed by GitHub
parent c94076087d
commit 6b50e2c6fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 42 deletions

View File

@ -109,7 +109,6 @@ li {
p { p {
user-select: text; user-select: text;
cursor: auto;
a { a {
word-break: break-all; word-break: break-all;

View File

@ -27,7 +27,7 @@
import { Icon, Label, resizeObserver, TimeSince, tooltip } from '@hcengineering/ui' import { Icon, Label, resizeObserver, TimeSince, tooltip } from '@hcengineering/ui'
import { Asset, getEmbeddedLabel, IntlString } from '@hcengineering/platform' import { Asset, getEmbeddedLabel, IntlString } from '@hcengineering/platform'
import activity, { ActivityMessage, ActivityMessagePreviewType } from '@hcengineering/activity' import activity, { ActivityMessage, ActivityMessagePreviewType } from '@hcengineering/activity'
import { classIcon, DocNavLink, showMenu } from '@hcengineering/view-resources' import { classIcon, DocNavLink } from '@hcengineering/view-resources'
import { markupToText } from '@hcengineering/text' import { markupToText } from '@hcengineering/text'
export let message: ActivityMessage | undefined = undefined export let message: ActivityMessage | undefined = undefined
@ -102,13 +102,13 @@
width = element.clientWidth width = element.clientWidth
}} }}
on:click on:click
on:contextmenu={(evt) => {
showMenu(evt, { object: message, baseMenuClass: activity.class.ActivityMessage }, () => {
isActionsOpened = false
})
isActionsOpened = true
}}
> >
<!-- on:contextmenu={(evt) => {-->
<!-- showMenu(evt, { object: message, baseMenuClass: activity.class.ActivityMessage }, () => {-->
<!-- isActionsOpened = false-->
<!-- })-->
<!-- isActionsOpened = true-->
<!--}}-->
<span class="left overflow-label"> <span class="left overflow-label">
{#if type === 'full'} {#if type === 'full'}
<div class="header"> <div class="header">
@ -158,11 +158,11 @@
<slot name="content" /> <slot name="content" />
</span> </span>
{#if !readonly} <!--{#if !readonly}-->
<div class="actions" class:opened={isActionsOpened}> <!-- <div class="actions" class:opened={isActionsOpened}>-->
<slot name="actions" /> <!-- <slot name="actions" />-->
</div> <!-- </div>-->
{/if} <!--{/if}-->
<div class="right"> <div class="right">
<slot name="right" /> <slot name="right" />

View File

@ -15,9 +15,8 @@
<script lang="ts"> <script lang="ts">
import { IntlString } from '@hcengineering/platform' import { IntlString } from '@hcengineering/platform'
import activity, { ActivityMessage, ActivityMessagePreviewType } from '@hcengineering/activity' import { ActivityMessage, ActivityMessagePreviewType } from '@hcengineering/activity'
import ActivityMessageActions from '../ActivityMessageActions.svelte'
import ReactionsPreview from '../reactions/ReactionsPreview.svelte' import ReactionsPreview from '../reactions/ReactionsPreview.svelte'
import BasePreview from '../BasePreview.svelte' import BasePreview from '../BasePreview.svelte'
import { Action } from '@hcengineering/ui' import { Action } from '@hcengineering/ui'
@ -53,15 +52,15 @@
<ReactionsPreview {message} {readonly} /> <ReactionsPreview {message} {readonly} />
{/if} {/if}
</svelte:fragment> </svelte:fragment>
<svelte:fragment slot="actions"> <!-- <svelte:fragment slot="actions">-->
{#if previewElement} <!-- {#if previewElement}-->
<ActivityMessageActions <!-- <ActivityMessageActions-->
{message} <!-- {message}-->
{actions} <!-- {actions}-->
withActionMenu={false} <!-- withActionMenu={false}-->
onOpen={previewElement.onActionsOpened} <!-- onOpen={previewElement.onActionsOpened}-->
onClose={previewElement.onActionsClosed} <!-- onClose={previewElement.onActionsClosed}-->
/> <!-- />-->
{/if} <!-- {/if}-->
</svelte:fragment> <!-- </svelte:fragment>-->
</BasePreview> </BasePreview>

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
--> -->
<script lang="ts"> <script lang="ts">
import { ButtonIcon, CheckBox, Component, IconMoreV, Label, showPopup, Spinner, tooltip } from '@hcengineering/ui' import { ButtonIcon, CheckBox, Component, IconMoreV, Label, showPopup, Spinner } from '@hcengineering/ui'
import notification, { import notification, {
ActivityNotificationViewlet, ActivityNotificationViewlet,
DisplayInboxNotification, DisplayInboxNotification,
@ -28,7 +28,6 @@
import { personAccountByIdStore } from '@hcengineering/contact-resources' import { personAccountByIdStore } from '@hcengineering/contact-resources'
import { Person, PersonAccount } from '@hcengineering/contact' import { Person, PersonAccount } from '@hcengineering/contact'
import MessagesPopup from './MessagePopup.svelte'
import InboxNotificationPresenter from './inbox/InboxNotificationPresenter.svelte' import InboxNotificationPresenter from './inbox/InboxNotificationPresenter.svelte'
import NotifyContextIcon from './NotifyContextIcon.svelte' import NotifyContextIcon from './NotifyContextIcon.svelte'
import { import {
@ -166,11 +165,11 @@
archivingPromise = undefined archivingPromise = undefined
} }
function canShowTooltip (group: InboxNotification[]): boolean { // function canShowTooltip (group: InboxNotification[]): boolean {
const first = group[0] // const first = group[0]
//
return canGroup(first) // return canGroup(first)
} // }
function getKey (group: InboxNotification[]): string { function getKey (group: InboxNotification[]): string {
return group.map((it) => it._id).join('-') return group.map((it) => it._id).join('-')
@ -229,15 +228,14 @@
<div class="content"> <div class="content">
<div class="notifications"> <div class="notifications">
{#each groupedNotifications.slice(0, maxNotifications) as group (getKey(group))} {#each groupedNotifications.slice(0, maxNotifications) as group (getKey(group))}
<div <div class="notification">
class="notification" <!-- use:tooltip={canShowTooltip(group)-->
use:tooltip={canShowTooltip(group) <!-- ? {-->
? { <!-- component: MessagesPopup,-->
component: MessagesPopup, <!-- props: { context: value, notifications: group }-->
props: { context: value, notifications: group } <!-- }-->
} <!-- : undefined}-->
: undefined}
>
<div class="embeddedMarker" /> <div class="embeddedMarker" />
<InboxNotificationPresenter <InboxNotificationPresenter
value={group[0]} value={group[0]}