From a0aa2e6e158ea8e77ee040e018bcca053e118da2 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 7 Dec 2021 15:14:24 +0300 Subject: [PATCH] Update tooltip UI (#551) Signed-off-by: Alexander Platov --- packages/theme/styles/_colors.scss | 2 +- packages/theme/styles/_layouts.scss | 1 + packages/ui/src/components/Tooltip.svelte | 4 + .../ui/src/components/TooltipInstance.svelte | 194 +++++++++++++----- .../src/components/CommentPresenter.svelte | 29 +-- .../src/components/Workbench.svelte | 8 +- 6 files changed, 169 insertions(+), 69 deletions(-) diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 7a1620634d..867676517a 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -97,7 +97,7 @@ --theme-on-color: #4474F6; --theme-off-color: #77818E; --theme-bg-check: #F2F2F2; - --theme-tooltip-color: #2C2C34; + --theme-tooltip-color: #2F2F34; --theme-showmore-color: #484850; --theme-button-bg-enabled: #1F1F25; diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 845ed108c6..431e382946 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -170,6 +170,7 @@ p:last-child { margin-block-end: 0; } align-items: center; flex-wrap: nowrap; white-space: nowrap; + width: fit-content; color: var(--theme-caption-color); cursor: pointer; .icon { diff --git a/packages/ui/src/components/Tooltip.svelte b/packages/ui/src/components/Tooltip.svelte index a4e807056f..bf32de2a50 100644 --- a/packages/ui/src/components/Tooltip.svelte +++ b/packages/ui/src/components/Tooltip.svelte @@ -38,3 +38,7 @@ > + + diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index 9703c60bdf..74cc5b8e42 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -14,18 +14,24 @@ --> - { whileShow(ev) }} /> + { whileShow(ev) }} /> + + + + {#if $tooltip.component} - \ No newline at end of file diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 4841a74868..0c57b77c86 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -29,7 +29,7 @@ import SpaceHeader from './SpaceHeader.svelte' import SpaceView from './SpaceView.svelte' - import { AnyComponent, Component, location, Popup, showPopup, TooltipInstance, closeTooltip } from '@anticrm/ui' + import { AnyComponent, Component, location, Popup, showPopup, TooltipInstance, closeTooltip, ActionIcon, IconEdit } from '@anticrm/ui' import core from '@anticrm/core' import AccountPopup from './AccountPopup.svelte' import AppItem from './AppItem.svelte' @@ -116,6 +116,12 @@ {/if} + {/if}