From 9f41b1d86fa2b2215db3f541aa6f1baa6009246e Mon Sep 17 00:00:00 2001 From: "Cornelius A. Ludmann" Date: Mon, 7 Jun 2021 15:48:22 +0000 Subject: [PATCH 1/2] [dashboard] Fix workspace entry truncation --- .../src/workspaces/WorkspaceEntry.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/components/dashboard/src/workspaces/WorkspaceEntry.tsx b/components/dashboard/src/workspaces/WorkspaceEntry.tsx index 69fe815a318a3b..d7074eb9766105 100644 --- a/components/dashboard/src/workspaces/WorkspaceEntry.tsx +++ b/components/dashboard/src/workspaces/WorkspaceEntry.tsx @@ -86,19 +86,17 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
-
{ws.id}
-
{project || 'Unknown'}
+
{ws.id}
+
{project || 'Unknown'}
-
-
-
{ws.description}
- -
{ws.contextURL}
-
-
+
+
{ws.description}
+ +
{ws.contextURL}
+
-
{currentBranch}
+
{currentBranch}
From 4476666476fca8622797edbe2f32dd900ab43ce5 Mon Sep 17 00:00:00 2001 From: "Cornelius A. Ludmann" Date: Mon, 7 Jun 2021 18:36:52 +0000 Subject: [PATCH 2/2] [dashboard] Add tooltip for possibly truncated values in workspace list --- .../dashboard/src/components/Tooltip.tsx | 5 ++-- .../src/workspaces/WorkspaceEntry.tsx | 28 ++++++++++++++----- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/components/dashboard/src/components/Tooltip.tsx b/components/dashboard/src/components/Tooltip.tsx index 26576811333045..50ef03f647fc9f 100644 --- a/components/dashboard/src/components/Tooltip.tsx +++ b/components/dashboard/src/components/Tooltip.tsx @@ -9,14 +9,15 @@ import { useState } from 'react'; export interface TooltipProps { children: React.ReactChild[] | React.ReactChild; content: string; + className?: string; } function Tooltip(props: TooltipProps) { const [expanded, setExpanded] = useState(false); return ( -
setExpanded(false)} onMouseEnter={() => setExpanded(true)} className="relative"> -
+
setExpanded(false)} onMouseEnter={() => setExpanded(true)} className={"relative " + (props.className || "")}> +
{props.children}
{expanded ? diff --git a/components/dashboard/src/workspaces/WorkspaceEntry.tsx b/components/dashboard/src/workspaces/WorkspaceEntry.tsx index d7074eb9766105..18b37bffabbdb9 100644 --- a/components/dashboard/src/workspaces/WorkspaceEntry.tsx +++ b/components/dashboard/src/workspaces/WorkspaceEntry.tsx @@ -86,17 +86,31 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
-
{ws.description}
- -
{ws.contextURL}
-
+ +
{ws.description}
+
+ + +
{ws.contextURL}
+
+
-
{currentBranch}
+ +
{currentBranch}
+