From e9681201c0b0dbca9b92052f41104a72677fa9d0 Mon Sep 17 00:00:00 2001 From: Ruben Carlo Benante Date: Sun, 28 Jun 2026 16:45:55 -0300 Subject: [PATCH] more shrink, and a + t2 --- Asset/css/shrink-vertically.css | 4 ++-- Plugin.php | 6 ++++++ README.md | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Asset/css/shrink-vertically.css b/Asset/css/shrink-vertically.css index fc6f707..e8daa25 100644 --- a/Asset/css/shrink-vertically.css +++ b/Asset/css/shrink-vertically.css @@ -13,12 +13,12 @@ * breathing room). A fixed-px budget is more reliable than a proportional vh value * because that chrome is a fixed height regardless of screen size. * - * Tune the single number below (120px) if the scrollbar is still clipped or if you + * Tune the single number below (170px) if the scrollbar is still clipped or if you * want the columns taller. * * The selector is intentionally more specific than core's single-class rule, and * uses !important, so this override wins even alongside a theme (e.g. Essential). */ #board td .board-task-list.board-task-list-compact { - max-height: calc(100vh - 120px) !important; + max-height: calc(100vh - 170px) !important; } diff --git a/Plugin.php b/Plugin.php index 02134ef..9b400e8 100644 --- a/Plugin.php +++ b/Plugin.php @@ -13,6 +13,12 @@ class Plugin extends Base $this->hook->on('template:layout:css', array( 'template' => 'plugins/ShrinkVertically/Asset/css/shrink-vertically.css', )); + + // Append a "+" to the two vertical-collapse menu labels so it is visible + // that the behaviour is modified by this plugin. + $this->hook->on('template:layout:js', array( + 'template' => 'plugins/ShrinkVertically/Asset/js/shrink-vertically.js', + )); } public function getPluginName() diff --git a/README.md b/README.md index cdef05d..b2fcd7e 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,23 @@ list: ```css #board td .board-task-list.board-task-list-compact { - max-height: calc(100vh - 120px) !important; + max-height: calc(100vh - 170px) !important; } ``` -The `120px` reserves room for the page header, the board column header, the horizontal +The `170px` reserves room for the page header, the board column header, the horizontal scrollbar, and a little breathing space. A fixed-pixel budget is more reliable than a proportional value because that chrome is a fixed height regardless of screen size. -It changes nothing else: no data, no JavaScript, no database migration. The override only -applies while columns are collapsed (when core adds the `board-task-list-compact` class). +The override only applies while columns are collapsed (when core adds the +`board-task-list-compact` class). It changes no data and runs no database migration. + +## Menu labels + +So it is obvious the collapsed behaviour comes from this plugin and not from core, a +small script (via `template:layout:js`) appends a `+` to the two gear-menu items, so they +read "Collapse vertically+" and "Expand vertically+". It only edits the rendered link +text, so it works in any locale. ## Requirements @@ -48,7 +55,7 @@ from the folder name). Reload the board; no build step, no configuration. ## Tuning -Edit the single `120px` value in `Asset/css/shrink-vertically.css`. Increase it if the +Edit the single `170px` value in `Asset/css/shrink-vertically.css`. Increase it if the scrollbar is still clipped (for example with a taller theme header); decrease it to make the collapsed columns taller.