Repository navigation
fix(ui): let dashboard charts grow into the width they are given - #713
Merged
AntonTyb merged 1 commit intoSep 11, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the layout responsiveness of chart cards, summary boxes, and curve plots in the UI by switching to a CSS Grid layout and removing restrictive maximum widths. It also adds corresponding layout unit tests. The review feedback highlights a potential Sass compilation issue when using the lowercase min() function with mixed units, suggesting capitalizing it as Min() to ensure it compiles correctly as native CSS.
AntonTyb
marked this pull request as ready for review
September 1, 2026 13:30
andrzejfudro
requested changes
Sep 1, 2026
andrzejfudro
left a comment
Collaborator
There was a problem hiding this comment.
I'm open to discussions here but overall I believe this PR should be one-line change
andrzejfudro
previously approved these changes
Sep 4, 2026
AntonTyb
dismissed
andrzejfudro’s stale review
September 7, 2026 11:47
The merge-base changed after approval.
AntonTyb
force-pushed
the
feat/chart-artifact-ui-view
branch
from
September 7, 2026 11:47
9ba7627 to
a794a5b
Compare
AntonTyb
force-pushed
the
fix/dashboard-chart-full-width
branch
from
September 7, 2026 11:48
541a223 to
beb8c7f
Compare
`chart_card.scss` capped `:host` at `max-width: 420px`, which contradicts the `flex: 1 1 340px` sitting next to it. The cap only shows up when there is room to spare, so a dashboard with three charts looked right on a typical screen -- three 420px columns happen to fill it -- while one or two charts sat in a 420px column with the rest of the page blank. Drop the cap. Crowding is already handled at the other end, by the 320px `min-width` and the grid container's `overflow-x: auto`. TAG=agy CONV=96ac94bd-c2b9-4753-b54f-b0b6b02d801f
AntonTyb
force-pushed
the
fix/dashboard-chart-full-width
branch
from
September 7, 2026 15:58
beb8c7f to
99aceb8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stacked on #710 (base branch
feat/chart-artifact-ui-view).On the dashboard page a chart occupies about a third of the width no matter how many charts
are on the dashboard. With three charts that happens to look right; with one or two, most of
the page is blank.
Root cause
chart_card.scsssizes the card with two rules that contradict each other:flex: 1 1 340pxasks the card to grow into whatever the row has spare.max-width: 420pxforbids it. The cap wins, so
.dashboard-grid-container— adisplay: flexrow at 100% width— lays out cards that refuse to fill it.
It reads as a per-count bug but isn't: the card is always 420px. It only looks correct at
three charts because 3 × 420 + gaps ≈ the content width of a typical laptop screen. That is
also why the two- and one-chart cases are the visible symptom, and why widening the browser
does not help at any count.
The cap has been there since the component landed in #488 and no test constrained it.
Fix
Delete
max-width. That is the whole change.Nothing else is needed to fill the row: crowding is already handled at the other end by the
320px
min-widthplusoverflow-x: autoon the grid container, which is what gives amany-chart dashboard its horizontal scroll. The card's inner layout was already correct.
The diff is one deleted declaration plus a three-line comment noting that its absence is
deliberate.
Verification
ng test --watch=false— 561 specs pass. No specs are added; see below.Also clean:
tsc --noEmit,eslint,prettier --check, and./.githooks/pre-commit --check(which still exits non-zero only because mypy/terraform/tflint/trivy are absent here and the
hook counts a skipped tool as a failure).
Behaviour confirmed in a browser — screenshots below.
Notes for the reviewer
This PR was larger and has been shrunk to the one line, per review. Two things came out:
getBoundingClientRect()widths. They tested the browser'sCSS engine rather than logic in these components, and the extra grid rules they were
written against no longer exist, so they guarded nothing this PR does. Screenshot tests
are the right tool if we want this pinned down.
chart_card.scssandchart_artifact_view.scssexplaining whichlayouts were tried and reverted. That is history of how the fix was reached, not something
a reader of the stylesheet needs.
The middle commit is a revert of the first. The first attempt also changed what the card
does with its new width: curves two-up in an
auto-fitgrid, summary boxes capped at 320px.Both made plots narrower than their container — on a 1900px card the summary row left
1214px empty — which is the opposite of the point. Reverted in
de5b2f87. Reviewing thebranch as a whole diff rather than commit by commit will be less noisy.
chart_artifact_view.scssis no longer touched by this PR.3+ charts now grow too. Three charts on a 1920px screen become ~620px each instead of
420px plus dead space. Keeping the cap for 3+ while lifting it for 1–2 would need
sibling-count selectors (
:only-child,:first-child:nth-last-child(2)) in the parentstylesheet fighting the child's
:hoston specificity — fragile, and hard to read later. Saythe word if you would rather have that.
Screenshots
one chart:

two charts:

TAG=agy
CONV=96ac94bd-c2b9-4753-b54f-b0b6b02d801f