From 8163ce94ab7b17d31c59acc2b723e1ca52467f34 Mon Sep 17 00:00:00 2001 From: Vasek Sraier Date: Sun, 11 Oct 2020 20:53:29 +0200 Subject: [PATCH] task pannel: removed task preview --- frontend/src/TaskPanel.svelte | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/frontend/src/TaskPanel.svelte b/frontend/src/TaskPanel.svelte index f7e6738..cacd96e 100644 --- a/frontend/src/TaskPanel.svelte +++ b/frontend/src/TaskPanel.svelte @@ -6,25 +6,9 @@ let selectedTask: TaskDescriptor | null = null export let selectedTaskId: string | null = null - let heightClass: "closed" | "collapsed" | "full" | "preview" = "collapsed" + let heightClass: "closed" | "full" = "closed" - export function preSelect(task: TaskDescriptor) { - // don't show anything for labels - if (task.type == "label") return; - if (heightClass != "full") { - selectedTask = task - heightClass = "preview" - } - } - - export function unPreselect(task: TaskDescriptor) { - setTimeout(() => { - if (selectedTask && task.id == selectedTask.id && heightClass == "preview") { - heightClass = "collapsed" - } - }, 10); - } let lastSelectedTaskId: string | null = null @@ -33,8 +17,7 @@ heightClass = "full" selectedTask = tasks.tasks.find(t => t.id == selectedTaskId) ?? null } else { - if ("full" == heightClass) - heightClass = "collapsed" + heightClass = "closed"; } lastSelectedTaskId = selectedTaskId } @@ -74,20 +57,11 @@ padding: 0 10px 10px 10px; } } - /* Used when the panel is explicitly closed - collapsed would still show the hover preview */ + /* Used when the panel is explicitly closed */ .panel.closed { display: none; } - /* Used when the panel is implicitly closed - it does not disappear when there is mouse over it */ - .panel.collapsed:not(:hover) { - display: none; - } - /* Used when the user hovers over a node and we want to show that there is something - a small expandable preview */ - .panel.preview, .panel:not(.full):hover { - height: 150px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } + .panel.full { min-height: 420px; border-bottom: 2px solid #444444;