From d4b0944589cdb7df315b7c35c6890f379f30bc0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Fri, 14 Aug 2026 09:31:29 +0200 Subject: [PATCH] :lipstick: Scroll the limits dialog inside its container, group its digits --- .../src/app/main/ui/workspace/sidebar/branches.cljs | 10 +++++----- .../src/app/main/ui/workspace/sidebar/branches.scss | 11 ++++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/branches.cljs b/frontend/src/app/main/ui/workspace/sidebar/branches.cljs index 20a7feaa07..9253c5a533 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/branches.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/branches.cljs @@ -324,12 +324,12 @@ ;; restated in the copy: the config the gates read is their one home. (defn- grouped - "A limit as a reader sees it: 50,000 rather than 50000, in the user's own - locale, because these numbers are read once and compared to a file size." + "A limit as a reader sees it: 50,000 rather than 50000. Grouped here + rather than with `toLocaleString`, which silently returns the ungrouped + digits on a build without full ICU data." [n] - (if (number? n) - (.toLocaleString ^js n) - (dm/str n))) + (-> (dm/str n) + (str/replace #"\B(?=(\d{3})+(?!\d))" ","))) (mf/defc limits-item* {::mf/private true} diff --git a/frontend/src/app/main/ui/workspace/sidebar/branches.scss b/frontend/src/app/main/ui/workspace/sidebar/branches.scss index 9e7efbaf97..cf6deaae64 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/branches.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/branches.scss @@ -1529,11 +1529,16 @@ border-block-start: 1px solid var(--color-background-quaternary); } -// The limits dialog is the only long modal here: bound it to the viewport -// and let the sections scroll rather than spilling past the container. +// The limits dialog is the only long modal here. `%modal-container-base` is +// a flex column that does not clip, so the content div has to own the +// scrolling: cap it against the viewport and let it shrink inside the flex +// parent (`min-height: 0`), otherwise the sections spill past the container. .limits-content { - max-height: 60vh; + max-height: min(60vh, 32rem); + min-height: 0; + flex: 1 1 auto; overflow-y: auto; + padding-inline-end: var(--sp-xs); } .branches-limits-link {