diff --git a/changelog.md b/changelog.md index 2a51134f3e..9847e903c1 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,10 @@ ## 0.6.26 (upcoming) +Tracker: + +- Issue preview + ## 0.6.25 Tracker: diff --git a/models/tracker/src/index.ts b/models/tracker/src/index.ts index 2fefc6b22f..017c61574e 100644 --- a/models/tracker/src/index.ts +++ b/models/tracker/src/index.ts @@ -358,6 +358,10 @@ export function createModel (builder: Builder): void { presenter: tracker.component.IssuePresenter }) + builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.PreviewPresenter, { + presenter: tracker.component.IssuePreview + }) + builder.mixin(tracker.class.TypeIssuePriority, core.class.Class, view.mixin.AttributePresenter, { presenter: tracker.component.PriorityPresenter }) diff --git a/plugins/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json index 2bde9dc3d1..d0be9b046a 100644 --- a/plugins/tracker-assets/lang/en.json +++ b/plugins/tracker-assets/lang/en.json @@ -138,7 +138,8 @@ "Save": "Save", "IncludeItemsThatMatch": "Include items that match", "AnyFilter": "any filter", - "AllFilters": "all filters" + "AllFilters": "all filters", + "NoDescription": "No description" }, "status": {} } diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index 9d3e8698c5..45788dd7f7 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -88,7 +88,8 @@ "Save": "Сохранить", "IncludeItemsThatMatch": "Включить элементы, которые соответствуют", "AnyFilter": "любому фильтру", - "AllFilters": "всем фильтрам" + "AllFilters": "всем фильтрам", + "NoDescription": "Нет описания" }, "status": {} } diff --git a/plugins/tracker-resources/src/components/CreateIssue.svelte b/plugins/tracker-resources/src/components/CreateIssue.svelte index fd41dc1985..5437d93d94 100644 --- a/plugins/tracker-resources/src/components/CreateIssue.svelte +++ b/plugins/tracker-resources/src/components/CreateIssue.svelte @@ -253,7 +253,6 @@ width="min-content" size="small" shouldShowLabel={true} - tooltipFill={false} on:change={({ detail }) => (object.status = detail)} /> diff --git a/plugins/tracker-resources/src/components/issues/IssuePreview.svelte b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte new file mode 100644 index 0000000000..2d12f6aef3 --- /dev/null +++ b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte @@ -0,0 +1,111 @@ + + + +
+ {#if parent} +
{parent.title}
+ {/if} + {#if issue} +
{issueName} {issue.title}
+
+ + + {#if issue.assignee} + + {/if} +
+ {#if issue.description} +
= limit} bind:clientHeight={cHeight}> + +
+ {:else} +
+
+ {/if} + {/if} +
+ + diff --git a/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte b/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte index f2c5d52f12..0a6bb8d458 100644 --- a/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte +++ b/plugins/tracker-resources/src/components/issues/PriorityEditor.svelte @@ -49,20 +49,16 @@ {#if value} - {#if isEditable} -
- -
- {:else} - - {/if} +
+ +
{/if} diff --git a/plugins/tracker-resources/src/components/issues/StatusEditor.svelte b/plugins/tracker-resources/src/components/issues/StatusEditor.svelte index d805ce0255..584f3c3180 100644 --- a/plugins/tracker-resources/src/components/issues/StatusEditor.svelte +++ b/plugins/tracker-resources/src/components/issues/StatusEditor.svelte @@ -17,7 +17,7 @@ import { AttachedData, Ref, SortingOrder, WithLookup } from '@anticrm/core' import { Issue, IssueStatus } from '@anticrm/tracker' import { getClient } from '@anticrm/presentation' - import { Tooltip, TooltipAlignment } from '@anticrm/ui' + import { tooltip, TooltipAlignment } from '@anticrm/ui' import type { ButtonKind, ButtonSize } from '@anticrm/ui' import tracker from '../../plugin' import StatusSelector from '../StatusSelector.svelte' @@ -27,7 +27,6 @@ export let isEditable: boolean = true export let shouldShowLabel: boolean = false export let tooltipAlignment: TooltipAlignment | undefined = undefined - export let tooltipFill = true export let kind: ButtonKind = 'link' export let size: ButtonSize = 'large' @@ -62,21 +61,10 @@ {#if value && statuses} - {#if isEditable} - - - - {:else} +
- {/if} +
{/if} diff --git a/plugins/tracker-resources/src/index.ts b/plugins/tracker-resources/src/index.ts index eb215dc6d5..1c3410cb7d 100644 --- a/plugins/tracker-resources/src/index.ts +++ b/plugins/tracker-resources/src/index.ts @@ -51,6 +51,7 @@ import EditIssue from './components/issues/edit/EditIssue.svelte' import NewIssueHeader from './components/NewIssueHeader.svelte' import ListView from './components/issues/ListView.svelte' import IssuesView from './components/issues/IssuesView.svelte' +import IssuePreview from './components/issues/IssuePreview.svelte' export default async (): Promise => ({ component: { @@ -87,7 +88,8 @@ export default async (): Promise => ({ SetParentIssueActionPopup, EditProject, IssuesView, - ListView + ListView, + IssuePreview }, function: { ProjectVisible: () => false diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts index 0938cd522b..6b50c93b39 100644 --- a/plugins/tracker-resources/src/plugin.ts +++ b/plugins/tracker-resources/src/plugin.ts @@ -155,7 +155,8 @@ export default mergeIds(trackerId, tracker, { Save: '' as IntlString, IncludeItemsThatMatch: '' as IntlString, AnyFilter: '' as IntlString, - AllFilters: '' as IntlString + AllFilters: '' as IntlString, + NoDescription: '' as IntlString }, component: { NopeComponent: '' as AnyComponent, @@ -191,7 +192,8 @@ export default mergeIds(trackerId, tracker, { SetParentIssueActionPopup: '' as AnyComponent, EditProject: '' as AnyComponent, IssuesView: '' as AnyComponent, - ListView: '' as AnyComponent + ListView: '' as AnyComponent, + IssuePreview: '' as AnyComponent }, function: { ProjectVisible: '' as '' as Resource<(spaces: Space[]) => boolean> diff --git a/plugins/view-resources/src/components/ActionContext.svelte b/plugins/view-resources/src/components/ActionContext.svelte index 29a5e12d50..12e7f3a5c4 100644 --- a/plugins/view-resources/src/components/ActionContext.svelte +++ b/plugins/view-resources/src/components/ActionContext.svelte @@ -17,7 +17,6 @@ import { ViewContext } from '@anticrm/view' import { onDestroy } from 'svelte' import { contextStore } from '../context' - import { previewDocument } from '../selection' export let context: ViewContext @@ -39,7 +38,6 @@ mode: context.mode, application: context.application ?? cur[(pos !== -1 ? pos : cur.length) - 1]?.application } - previewDocument.set(undefined) if (pos === -1) { len = cur.length return [...cur, newCur] diff --git a/plugins/view-resources/src/components/ActionHandler.svelte b/plugins/view-resources/src/components/ActionHandler.svelte index 8c6a650870..f28769a0b2 100644 --- a/plugins/view-resources/src/components/ActionHandler.svelte +++ b/plugins/view-resources/src/components/ActionHandler.svelte @@ -158,8 +158,8 @@ {#if $previewDocument !== undefined && presenter} -
-
+
+