From 7034efc7dc0e355c63b11f0f633216d489d254be Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 29 May 2024 08:08:45 +0200 Subject: Use vertical layout for multiple code expander buttons (#31122) Fixes: https://github.com/go-gitea/gitea/issues/31068 - Now it only does a single call to `GetExpandDirection` per line instead of multiples. - Exposed `data-expand-direction` to frontend so it can correctly size the buttons (it's a pain to do in tables). Screenshot 2024-05-27 at 20 44 56 Screenshot 2024-05-27 at 20 44 51 Screenshot 2024-05-27 at 20 44 46 Screenshot 2024-05-27 at 20 44 33 Screenshot 2024-05-27 at 20 44 26 Screenshot 2024-05-27 at 20 44 20 Would backport as trivial enhancement. --- web_src/css/review.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'web_src') diff --git a/web_src/css/review.css b/web_src/css/review.css index 6337748939..0d69e36681 100644 --- a/web_src/css/review.css +++ b/web_src/css/review.css @@ -164,6 +164,11 @@ flex: 1; } +/* expand direction 3 is both ways with two buttons */ +.code-expander-buttons[data-expand-direction="3"] .code-expander-button { + height: 18px; +} + .code-expander-button:hover { background: var(--color-primary); color: var(--color-primary-contrast); -- cgit v1.2.3