diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index 29afe608bd..633e13dd44 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -253,6 +253,7 @@ display: flex; flex-direction: column; padding: 0.5rem; + max-width: 50vw; color: var(--caption-color); background-color: var(--accent-bg-color); border: 1px solid var(--divider-color); diff --git a/plugins/tags-resources/src/components/LabelsPresenter.svelte b/plugins/tags-resources/src/components/LabelsPresenter.svelte new file mode 100644 index 0000000000..bb1f450e46 --- /dev/null +++ b/plugins/tags-resources/src/components/LabelsPresenter.svelte @@ -0,0 +1,90 @@ + + +
{ + allWidth = element.clientWidth + }} + on:click|stopPropagation={(evt) => { + if (isEditable) tagsHandler(evt) + else action(evt) + }} +> + {#each items as value, i} +
+ +
+ {/each} +
+ + diff --git a/plugins/tags-resources/src/components/TagReferencePresenter.svelte b/plugins/tags-resources/src/components/TagReferencePresenter.svelte index 059032625b..3bc256ae88 100644 --- a/plugins/tags-resources/src/components/TagReferencePresenter.svelte +++ b/plugins/tags-resources/src/components/TagReferencePresenter.svelte @@ -14,13 +14,14 @@ --> @@ -28,8 +29,24 @@ {#if value} {#if kind === 'skills'} + {:else if kind === 'kanban-labels'} + {:else if kind === 'labels'} -
+
{ + realWidth = element.clientWidth + }} + >
{value.title} {#if isEditable} @@ -54,12 +71,6 @@ border: 1px solid var(--divider-color); border-radius: 0.75rem; - .color { - flex-shrink: 0; - width: 0.5rem; - height: 0.5rem; - border-radius: 50%; - } .btn-close { flex-shrink: 0; margin-left: 0.125rem; @@ -74,4 +85,45 @@ } } } + + .label-container { + display: flex; + justify-content: center; + align-items: center; + flex-shrink: 0; + padding: 0 0.375rem; + height: 1.375rem; + min-width: 1.375rem; + font-weight: 500; + font-size: 0.75rem; + line-height: 0.75rem; + white-space: nowrap; + color: var(--accent-color); + background-color: var(--board-card-bg-color); + border: 1px solid var(--divider-color); + border-radius: 0.25rem; + transition-property: border, background-color, color, box-shadow; + transition-duration: 0.15s; + + &:hover { + color: var(--accent-color); + background-color: var(--button-bg-hover); + border-color: var(--button-border-hover); + transition-duration: 0; + } + &:focus { + border-color: var(--primary-edit-border-color) !important; + } + &:disabled { + color: rgb(var(--caption-color) / 40%); + cursor: not-allowed; + } + } + + .color { + flex-shrink: 0; + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + } diff --git a/plugins/tags-resources/src/components/TagsAttributeEditor.svelte b/plugins/tags-resources/src/components/TagsAttributeEditor.svelte index 863e5c8246..c05608e698 100644 --- a/plugins/tags-resources/src/components/TagsAttributeEditor.svelte +++ b/plugins/tags-resources/src/components/TagsAttributeEditor.svelte @@ -30,7 +30,7 @@ {#if items.length} -
+
{#each items as value}
removeTag(res.detail)} /> @@ -38,7 +38,7 @@ {/each} {#if isEditable}
- @@ -46,7 +46,7 @@ {/if}
{:else if isEditable} - diff --git a/plugins/tags-resources/src/index.ts b/plugins/tags-resources/src/index.ts index 0d6ec990c4..9b841861e5 100644 --- a/plugins/tags-resources/src/index.ts +++ b/plugins/tags-resources/src/index.ts @@ -29,6 +29,7 @@ import TagElementCountPresenter from './components/TagElementCountPresenter.svel import TagsFilter from './components/TagsFilter.svelte' import TagsAttributeEditor from './components/TagsAttributeEditor.svelte' import TagsEditorPopup from './components/TagsEditorPopup.svelte' +import LabelsPresenter from './components/LabelsPresenter.svelte' import { ObjQueryType } from '@anticrm/core' import { getRefs } from './utils' import { Filter } from '@anticrm/view' @@ -58,7 +59,8 @@ export default async (): Promise => ({ TagsCategoryBar, TagElementCountPresenter, TagsAttributeEditor, - TagsEditorPopup + TagsEditorPopup, + LabelsPresenter }, actionImpl: { Open: (value: TagElement, evt: MouseEvent) => { diff --git a/plugins/tags/src/index.ts b/plugins/tags/src/index.ts index 23ca35f7ce..fea8141f78 100644 --- a/plugins/tags/src/index.ts +++ b/plugins/tags/src/index.ts @@ -84,7 +84,8 @@ const tagsPlugin = plugin(tagsId, { TagsDropdownEditor: '' as AnyComponent, TagsCategoryBar: '' as AnyComponent, TagsAttributeEditor: '' as AnyComponent, - TagsPresenter: '' as AnyComponent + TagsPresenter: '' as AnyComponent, + LabelsPresenter: '' as AnyComponent }, category: { NoCategory: '' as Ref diff --git a/plugins/tracker-resources/src/components/ProjectSelector.svelte b/plugins/tracker-resources/src/components/ProjectSelector.svelte index 26bf29d9ba..e9fe226952 100644 --- a/plugins/tracker-resources/src/components/ProjectSelector.svelte +++ b/plugins/tracker-resources/src/components/ProjectSelector.svelte @@ -31,6 +31,7 @@ export let shape: ButtonShape = undefined export let justify: 'left' | 'center' = 'center' export let width: string | undefined = 'min-content' + export let onlyIcon: boolean = false let selectedProject: Project | undefined let defaultProjectLabel = '' @@ -88,19 +89,32 @@ } - +{#if onlyIcon} + +{/if} diff --git a/plugins/tracker-resources/src/components/issues/KanbanView.svelte b/plugins/tracker-resources/src/components/issues/KanbanView.svelte index 8f860989b6..336d2d6009 100644 --- a/plugins/tracker-resources/src/components/issues/KanbanView.svelte +++ b/plugins/tracker-resources/src/components/issues/KanbanView.svelte @@ -19,7 +19,17 @@ import notification from '@anticrm/notification' import { createQuery } from '@anticrm/presentation' import { Issue, IssuesGrouping, IssuesOrdering, IssueStatus, Team, ViewOptions } from '@anticrm/tracker' - import { Button, Component, Icon, IconAdd, showPanel, showPopup, getPlatformColor, Loading } from '@anticrm/ui' + import { + Button, + Component, + Icon, + IconAdd, + showPanel, + showPopup, + getPlatformColor, + Loading, + tooltip + } from '@anticrm/ui' import { focusStore, ListSelectionProvider, SelectDirection, selectionStore } from '@anticrm/view-resources' import ActionContext from '@anticrm/view-resources/src/components/ActionContext.svelte' import Menu from '@anticrm/view-resources/src/components/Menu.svelte' @@ -40,6 +50,7 @@ import ParentNamesPresenter from './ParentNamesPresenter.svelte' import PriorityEditor from './PriorityEditor.svelte' import StatusEditor from './StatusEditor.svelte' + import tags from '@anticrm/tags' export let currentSpace: Ref = tracker.team.DefaultTeam export let baseMenuClass: Ref> | undefined = undefined @@ -146,6 +157,8 @@ return [] } $: states = getIssueStates(groupBy, shouldShowEmptyGroups, issueStates, issueStatusStates, priorityStates) + + const fullFilled: { [key: string]: boolean } = {} {#if !states?.length} @@ -203,13 +216,14 @@ {@const issue = toIssue(object)} + {@const issueId = object._id}
{ showPanel(tracker.component.EditIssue, object._id, object._class, 'content') }} > -
+
@@ -235,7 +249,7 @@
-
+
{#if issue && issueStatuses && issue.subIssues > 0} {/if} @@ -247,7 +261,23 @@ size={'inline'} justify={'center'} width={''} + bind:onlyIcon={fullFilled[issueId]} /> +
+ { + if (res.detail.full) fullFilled[issueId] = true + }} + /> +
@@ -275,7 +305,12 @@ display: flex; flex-direction: column; justify-content: center; - padding: 0.5rem 1rem; + // padding: 0.5rem 1rem; min-height: 6.5rem; } + .states-bar { + flex-shrink: 10; + width: fit-content; + margin: 0.625rem 1rem 0; + } diff --git a/plugins/tracker-resources/src/components/projects/ProjectEditor.svelte b/plugins/tracker-resources/src/components/projects/ProjectEditor.svelte index a5122fa815..61520d6372 100644 --- a/plugins/tracker-resources/src/components/projects/ProjectEditor.svelte +++ b/plugins/tracker-resources/src/components/projects/ProjectEditor.svelte @@ -31,6 +31,7 @@ export let shape: ButtonShape = undefined export let justify: 'left' | 'center' = 'left' export let width: string | undefined = '100%' + export let onlyIcon: boolean = false const client = getClient() @@ -65,6 +66,7 @@ {isEditable} {shouldShowLabel} {popupPlaceholder} + {onlyIcon} value={value.project} onProjectIdChange={handleProjectIdChanged} />