From ccf2a1d88d9a9fc2ea7b934774585427d3d9743a Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Mon, 20 Dec 2021 13:18:50 +0300 Subject: [PATCH] Update kanban cards layout (#684) Signed-off-by: Alexander Platov --- packages/theme/styles/_layouts.scss | 16 +++++- .../src/components/KanbanCard.svelte | 20 +++---- .../src/components/KanbanCard.svelte | 55 ++++++------------- 3 files changed, 36 insertions(+), 55 deletions(-) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index da41f6e7e2..ebcc48e24f 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -205,6 +205,7 @@ p:last-child { margin-block-end: 0; } .mt-10 { margin-top: 2.5rem; } .mt-14 { margin-top: 3.5rem; } .mb-1 { margin-bottom: .25rem; } +.mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } @@ -246,6 +247,8 @@ p:last-child { margin-block-end: 0; } .h-full { height: 100%; } .w-full { width: 100%; } +.min-w-0 { min-width: 0; } +.min-h-0 { min-height: 0; } .square-36 { width: 2.25rem; height: 2.25rem; } /* --------- */ @@ -332,16 +335,23 @@ a.no-line { user-select: none; min-width: 0; } -.lines-limit-2 { + +.lines-limit-2, .lines-limit-4 { min-width: 0; overflow: hidden; visibility: visible; display: -webkit-box; - -webkit-line-clamp: 2; - line-clamp: 2; /* autoprefixer: ignore next */ -webkit-box-orient: vertical; } +.lines-limit-2 { + -webkit-line-clamp: 2; + line-clamp: 2; +} +.lines-limit-4 { + -webkit-line-clamp: 4; + line-clamp: 4; +} .focused-button { background-color: var(--theme-button-bg-focused); diff --git a/plugins/recruit-resources/src/components/KanbanCard.svelte b/plugins/recruit-resources/src/components/KanbanCard.svelte index baf3f527aa..8e6f52b9cb 100644 --- a/plugins/recruit-resources/src/components/KanbanCard.svelte +++ b/plugins/recruit-resources/src/components/KanbanCard.svelte @@ -36,15 +36,13 @@
-
-
- -
-
{formatName(object.$lookup?.attachedTo?.name)}
-
{object.$lookup?.attachedTo?.title ?? ''}
-
+
+ +
+
{formatName(object.$lookup?.attachedTo?.name)}
+
{object.$lookup?.attachedTo?.title ?? ''}
- +
@@ -72,11 +70,7 @@ user-select: none; backdrop-filter: blur(10px); - .content { - display: flex; - justify-content: space-between; - margin-bottom: 1rem; - } &.draggable { cursor: grab; } } + .tool { align-self: start; } diff --git a/plugins/task-resources/src/components/KanbanCard.svelte b/plugins/task-resources/src/components/KanbanCard.svelte index 0a006c3a79..203a667047 100644 --- a/plugins/task-resources/src/components/KanbanCard.svelte +++ b/plugins/task-resources/src/components/KanbanCard.svelte @@ -33,41 +33,25 @@
-
-
-
-
- -
-
{object.name}
-
{object.description}
-
-
+
+ + { showMenu(evt) }} icon={IconMoreH} size={'small'} />
+
{object.name}
+
- {#if object.$lookup?.assignee} -
- -
- {/if} -
- { - showMenu(evt) - }} - icon={IconMoreH} - size={'small'} - /> - {#if (object.comments ?? 0) > 0} -
- {/if} +
{#if (object.attachments ?? 0) > 0}
{/if} + {#if (object.comments ?? 0) > 0} +
+ {/if}
-
+ {#if object.$lookup?.assignee} + + {/if} +