From 10eb4a0bda9aef566df7b7fc0238c978f2ae45ab Mon Sep 17 00:00:00 2001 From: PaulV Date: Sun, 27 Jun 2021 14:49:28 +0200 Subject: [PATCH 1/4] select entire line in TreeView again (fix selection bug introduced in commit "Move additional duplicate logic to the TreeNode component and use CSS modules where applicable") --- client/src/Components/Tree/TreeNode.tsx | 4 ++-- client/src/Components/TreeView/TreeView.module.css | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/Components/Tree/TreeNode.tsx b/client/src/Components/Tree/TreeNode.tsx index 42bf2379f..e0f74f6cb 100644 --- a/client/src/Components/Tree/TreeNode.tsx +++ b/client/src/Components/Tree/TreeNode.tsx @@ -25,8 +25,8 @@ export default function TreeNode(props: TreeNodeProps): JSX.Element { }); const level = levelOf(props.declaration); - const style = level === 0 ? {} : { - paddingLeft: `calc(${level} * (1.25em + 0.25rem))` + const style = level === 0 ? {paddingLeft: '1rem'} : { + paddingLeft: `calc(${level} * (1.25em + 0.25rem) + 1rem)` }; const handleClick = () => { diff --git a/client/src/Components/TreeView/TreeView.module.css b/client/src/Components/TreeView/TreeView.module.css index 33d124b99..e1fcdaf6d 100644 --- a/client/src/Components/TreeView/TreeView.module.css +++ b/client/src/Components/TreeView/TreeView.module.css @@ -1,9 +1,12 @@ .treeView { border-right: 1px solid gray; - margin: 1rem; + margin-top: 1rem; + margin-bottom: 1rem; + margin-right: 1rem; overflow: auto; } .packageName { + margin-left: 1rem; margin-bottom: 1rem; } From 4606889d30cf3bcb7ea22e17f0c6cdf84be8e2ad Mon Sep 17 00:00:00 2001 From: PaulV Date: Sun, 27 Jun 2021 14:56:31 +0200 Subject: [PATCH 2/4] change TreeView scrollbar to fullscreen again --- client/src/Components/TreeView/TreeView.module.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/Components/TreeView/TreeView.module.css b/client/src/Components/TreeView/TreeView.module.css index e1fcdaf6d..87147e6b0 100644 --- a/client/src/Components/TreeView/TreeView.module.css +++ b/client/src/Components/TreeView/TreeView.module.css @@ -1,12 +1,9 @@ .treeView { border-right: 1px solid gray; - margin-top: 1rem; - margin-bottom: 1rem; margin-right: 1rem; overflow: auto; } .packageName { - margin-left: 1rem; - margin-bottom: 1rem; + margin: 1rem; } From ff53551274feb06a27edd1a649d83b41fade9981 Mon Sep 17 00:00:00 2001 From: PaulV Date: Sun, 27 Jun 2021 15:05:32 +0200 Subject: [PATCH 3/4] remove unneccessary margin --- client/src/Components/TreeView/TreeView.module.css | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/Components/TreeView/TreeView.module.css b/client/src/Components/TreeView/TreeView.module.css index 87147e6b0..5d73e404e 100644 --- a/client/src/Components/TreeView/TreeView.module.css +++ b/client/src/Components/TreeView/TreeView.module.css @@ -1,6 +1,5 @@ .treeView { border-right: 1px solid gray; - margin-right: 1rem; overflow: auto; } From 77a5e24d06bb5b35edb9eb1b2e168a1667601edf Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Fri, 2 Jul 2021 09:41:27 +0200 Subject: [PATCH 4/4] Minor refactoring --- client/src/Components/Tree/TreeNode.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/Components/Tree/TreeNode.tsx b/client/src/Components/Tree/TreeNode.tsx index e0f74f6cb..c48b789eb 100644 --- a/client/src/Components/Tree/TreeNode.tsx +++ b/client/src/Components/Tree/TreeNode.tsx @@ -25,8 +25,8 @@ export default function TreeNode(props: TreeNodeProps): JSX.Element { }); const level = levelOf(props.declaration); - const style = level === 0 ? {paddingLeft: '1rem'} : { - paddingLeft: `calc(${level} * (1.25em + 0.25rem) + 1rem)` + const style = { + paddingLeft: (level === 0 ? '1rem' : `calc(${level} * (1.25em + 0.25rem) + 1rem)`) }; const handleClick = () => {