mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4743] [GUI] settings: let a long help line wrap instead of squeezing every field #5159
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4743
Author: @au70ma70n
Created: 10/30/2026
Status: 🔄 Open
Base:
main← Head:gui-settings-field-width📝 Commits (1)
145e349[GUI] settings: let a long help line wrap instead of squeezing every field📊 Changes
2 files changed (+46 additions, -2 deletions)
View changed files
➕
serve/test_totals.py(+41 -0)📝
serve/web/app.css(+5 -2)📄 Description
Branch
gui-settings-field-width→main@870aedd9. A focused fix, so it needs no scope agreement, and it is the first of the four to land; the three costing pull requests (#4745, #4746, #4747) are stacked behind it in that order and wait on scope agreement in #4742.Problem and result
On the page's Settings view every field collapsed to about the width of its own spinner arrows — twenty unusable boxes in one column. The card is a two-column grid whose label column was sized to
max-contentand whose field column had a floor of0, so a single long help line took the whole card and left the fields nothing. After: the label column is the one that gives way (minmax(min(180px, 100%), 1fr)) and the field column has a floor and a cap of its own (minmax(11rem, 360px), the cap matching the input's existingmax-width: 360px). Long help wraps onto two lines; every field is 360 px wide, or full width in the stacked layout under 1000 px.Related discussion
none found; reported by the user on the Model settings card. A focused fix can go straight to a pull request, so no scope agreement is needed. No layout or settings-card issue surfaced in the sampled searches.
Approach
Layout only: the card sized its label column to
max-contentand gave the field column no floor, so one long help line took the card and left every field the width of its own spinner arrows.minmax(min(180px, 100%), 1fr)lets the label wrap andminmax(11rem, 360px)gives the field a width of its own at every width the card is shown at; the media query keeps1frwhere the card already stacks. The words are guarded beside the style: the longest help line onmainismtpat 137 characters, so a second test holds every help line to 140 and no row added later can lay the card out beside a wall of text again. Nothing in this pull request shortens a help line — the two longest rows that have ever been written for this card (173 and 191 characters) price the cache rates, and they arrive in #4747 already inside the limit.Validation
Passed: headless Edge on the page's own markup, the real
app.cssand the real help rows, fresh profile — at 1290 px the broken layout measured994px / 0pxtracks and a field box of30×38(the reported squeeze), the fix634px / 360pxand360×38; at 1100 px587px / 360px; at 640 px the card stacks and the field is519×40.serve.test_totals32 tests OK and the six-module serve suite 73 tests OK, skipped 2 (node is not installed; symlinks without privilege), on four consecutive runs (16.13–16.28 s) on Windows 11, Python 3.10.11. A mutation check: put the old grid tracks back and the layout test fails; lengthen one help line and the length test fails; the tree was byte-identical after the check.Failed: none observed.
Not run: a live capture of the unlocked card in a browser with an API key — a fresh headless profile has none and
GET /configanswers 401, so the card stays hidden and the numbers above come from a render of the real markup and CSS, not from the running page; a real phone width (640 px viewport only);npm test(no node in this environment).Limits
The CSS is served
no-cache, so a refresh picks the layout up; the length test reads the help rows the Python server writes, so a help line that grows wants a restart, not a refresh. Under about 560px of viewport the card stacks, where this rule never applied. The field's ownmax-width: 360pxis untouched, so a field is no wider here than it was on a desktop.Stack notes. Merge order is #4743 → #4745 → #4746 → #4747; until the branch before it merges, a later pull request's diff also shows those commits and shrinks on its own as they merge.
serve/test_totals.pyis added whole by the first branch to land and the later branches only append their own classes, so the four do not fight over one new file. The evidence about keeping the counts was added to #4631 rather than a fifth thread:--totals-resetis still a flag and not the button that issue asks for, and whether that button may move the Prometheus counters is the maintainer's call.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.