From 2de162928b38aea96d759522aa89b60fec2cd71a Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 29 Jul 2024 12:05:09 +0200 Subject: [PATCH 1/4] feat(#31666): Set the columns height to hug all its contents In Projects, columns heights are defined by the sum of all contents height of the biggest column, rather than a fraction of the viewport height. It default to 60vh when there is no cards to display. --- web_src/css/features/projects.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_src/css/features/projects.css b/web_src/css/features/projects.css index 151b0a23d9dc7..013d53b41d991 100644 --- a/web_src/css/features/projects.css +++ b/web_src/css/features/projects.css @@ -3,6 +3,7 @@ flex-direction: row; flex-wrap: nowrap; overflow-x: auto; + align-items: stretch; margin: 0 0.5em; } @@ -13,7 +14,7 @@ margin: 0 0.5rem !important; padding: 0.5rem !important; width: 320px; - height: calc(100vh - 450px); + height: initial; min-height: 60vh; flex: 0 0 auto; overflow: visible; From a9265a2c36fd700e6319ade52368318b071b92a3 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 6 Aug 2024 09:19:36 +0200 Subject: [PATCH 2/4] fix(#31666): Fix scroll brief display while dragging cards As demonstrated in https://github.com/go-gitea/gitea/pull/31726#issuecomment-2256579220, an horizontal scrollbar can appears while dragging a card to a column from the right side, as the ghost card is animated to fit in. Force hidding the scrollbars using overflow:clip. --- web_src/css/features/projects.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/css/features/projects.css b/web_src/css/features/projects.css index 013d53b41d991..deda4e3c3406e 100644 --- a/web_src/css/features/projects.css +++ b/web_src/css/features/projects.css @@ -50,7 +50,7 @@ padding: 0 !important; flex-wrap: nowrap !important; flex-direction: column; - overflow-x: auto; + overflow-x: clip; gap: .25rem; } From 31dcdf874fe25a6d03ac170ee3f38d83b5f330b1 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 6 Aug 2024 09:37:55 +0200 Subject: [PATCH 3/4] fix(#31666): Fix v-scroll brief display at the board level A vertical scrollbar can appears while dragging a card-out, when the column height is higher than the heght-viewport and the board is being reduced (quicker than its contents). Force hidding the scrollbars using overflow:clip. --- web_src/css/features/projects.css | 1 + 1 file changed, 1 insertion(+) diff --git a/web_src/css/features/projects.css b/web_src/css/features/projects.css index deda4e3c3406e..a92f8621c6cf6 100644 --- a/web_src/css/features/projects.css +++ b/web_src/css/features/projects.css @@ -3,6 +3,7 @@ flex-direction: row; flex-wrap: nowrap; overflow-x: auto; + overflow-y: clip; align-items: stretch; margin: 0 0.5em; } From 2efba09a3edcd04ff4228099686754ec218e0169 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 6 Aug 2024 10:03:10 +0200 Subject: [PATCH 4/4] fix(#31666): Fix no-cards board behavior to avoid intangible columns --- web_src/css/features/projects.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/css/features/projects.css b/web_src/css/features/projects.css index a92f8621c6cf6..0c6d307069d49 100644 --- a/web_src/css/features/projects.css +++ b/web_src/css/features/projects.css @@ -16,7 +16,7 @@ padding: 0.5rem !important; width: 320px; height: initial; - min-height: 60vh; + min-height: max(calc(100vh - 400px), 300px); flex: 0 0 auto; overflow: visible; display: flex;