From ec8b76c299e0327c93a4b5b814c999137e1d934d Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 21 Jun 2022 11:53:19 +0300 Subject: [PATCH] Fix components. (#2122) Signed-off-by: Alexander Platov --- .../src/components/ObjectPopup.svelte | 19 ++--- packages/theme/styles/dialogs.scss | 1 + .../src/components/CreateIssue.svelte | 1 + .../components/issues/AssigneeEditor.svelte | 3 +- .../components/issues/IssuePresenter.svelte | 8 +++ .../src/components/issues/IssuePreview.svelte | 2 +- .../issues/edit/SubIssueList.svelte | 72 ++++++++++++++----- 7 files changed, 79 insertions(+), 27 deletions(-) diff --git a/packages/presentation/src/components/ObjectPopup.svelte b/packages/presentation/src/components/ObjectPopup.svelte index ba7743e3c6..e6ce81956e 100644 --- a/packages/presentation/src/components/ObjectPopup.svelte +++ b/packages/presentation/src/components/ObjectPopup.svelte @@ -163,16 +163,19 @@
-
+
{#if create !== undefined} -
{/if}
diff --git a/packages/theme/styles/dialogs.scss b/packages/theme/styles/dialogs.scss index c0b3ce4695..31e042ccb2 100644 --- a/packages/theme/styles/dialogs.scss +++ b/packages/theme/styles/dialogs.scss @@ -135,6 +135,7 @@ width: 40rem; height: max-content; max-width: 40rem; + max-height: calc(100vh - 2rem); .antiCard-header { padding: .75rem .75rem .375rem; diff --git a/plugins/tracker-resources/src/components/CreateIssue.svelte b/plugins/tracker-resources/src/components/CreateIssue.svelte index adc895b5e3..8a88485086 100644 --- a/plugins/tracker-resources/src/components/CreateIssue.svelte +++ b/plugins/tracker-resources/src/components/CreateIssue.svelte @@ -303,6 +303,7 @@ value={object} size="small" kind="no-border" + width={'min-content'} on:change={({ detail }) => (currentAssignee = detail)} /> handleAssigneeChanged(detail)} diff --git a/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte index b61d778a31..db18fc1510 100644 --- a/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte +++ b/plugins/tracker-resources/src/components/issues/IssuePresenter.svelte @@ -55,5 +55,13 @@ font-size: 0.8125rem; color: var(--content-color); cursor: pointer; + + &:hover { + color: var(--caption-color); + text-decoration: underline; + } + &:active { + color: var(--accent-color); + } } diff --git a/plugins/tracker-resources/src/components/issues/IssuePreview.svelte b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte index 5e9f58fca6..ac1be01e04 100644 --- a/plugins/tracker-resources/src/components/issues/IssuePreview.svelte +++ b/plugins/tracker-resources/src/components/issues/IssuePreview.svelte @@ -85,7 +85,7 @@ {#if issue.assignee} - + {/if}
diff --git a/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte b/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte index c9b10fd67c..c596fb61b8 100644 --- a/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte @@ -17,7 +17,13 @@ import { flip } from 'svelte/animate' import { Doc, WithLookup } from '@anticrm/core' import { Issue, IssueStatus, Team } from '@anticrm/tracker' - import { ActionContext, ContextMenu, ListSelectionProvider, SelectDirection } from '@anticrm/view-resources' + import { + ActionContext, + ContextMenu, + ListSelectionProvider, + SelectDirection, + FixedColumn + } from '@anticrm/view-resources' import { showPanel, showPopup } from '@anticrm/ui' import tracker from '../../../plugin' import { getIssueId } from '../../../utils' @@ -77,6 +83,16 @@ // table.select(offset, of) // } }) + + let varsStyle: string = '' + const propsWidth: Record = { issue: 0 } + $: if (propsWidth) { + varsStyle = '' + for (const key in propsWidth) varsStyle += `--fixed-${key}: ${propsWidth[key]}px;` + } + const checkWidth = (key: string, result: CustomEvent): void => { + if (result !== undefined) propsWidth[key] = result.detail + } draggingIndex && index === hoveringIndex} + style={varsStyle} animate:flip={{ duration: 400 }} draggable={true} on:click|self={() => openIssue(issue)} @@ -110,22 +127,26 @@
-
-
- -
- openIssue(issue)}> - {getIssueId(currentTeam, issue)} +
+ + openIssue(issue)}> + checkWidth('issue', result)} + > + {getIssueId(currentTeam, issue)} + -
- -
+ openIssue(issue)}> {issue.title} @@ -146,7 +167,24 @@ .text { font-weight: 500; - color: var(--theme-caption-color); + color: var(--caption-color); + } + + .issuePresenter { + flex-shrink: 0; + min-width: 0; + min-height: 0; + font-weight: 500; + color: var(--content-color); + cursor: pointer; + + &:hover { + color: var(--caption-color); + text-decoration: underline; + } + &:active { + color: var(--accent-color); + } } .name {