💄 Scroll the limits dialog inside its container, group its digits

This commit is contained in:
Álvaro Tejero Cantero 2026-08-14 09:31:29 +02:00
parent 7df1f9c876
commit d4b0944589
No known key found for this signature in database
2 changed files with 13 additions and 8 deletions

View File

@ -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}

View File

@ -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 {