Compare commits

..
Author SHA1 Message Date
tudor 284215fbce Merge pull request 'fix(compare): expert should-fixes S1-S4, S6 (S5/S7 closed by verification)' (#55) from fix/expert-signoff-shouldfixes into main
Stage (build -> staging -> E2E gate) / Build Backend (FastAPI) (push) Successful in 13s
Stage (build -> staging -> E2E gate) / Build Frontend (Next.js) (push) Successful in 53s
Stage (build -> staging -> E2E gate) / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 14s
Stage (build -> staging -> E2E gate) / Deploy to Staging (push) Successful in 1s
Stage (build -> staging -> E2E gate) / E2E Journeys against Staging (push) Failing after 45s
Reviewed-on: #55
2026-07-17 17:53:16 +00:00
2 changed files with 19 additions and 18 deletions
@@ -1,23 +1,16 @@
/* Chart wrapper: chips (mobile) above, then the canvas, then the gap note. /* Chart wrapper: chips (mobile) above, canvas filling the rest of the
The canvas has its OWN definite height (Chart.js needs one for parent .chartContainer, whose fixed height drives Chart.js sizing via
maintainAspectRatio: false); the chips and the note flow at their natural maintainAspectRatio: false. */
size around it rather than competing with it for a fixed outer height —
so a longer note (e.g. the KS4 gap caption) or a two-row chip legend can
never squash the chart. */
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
} }
.canvasBox { .canvasBox {
position: relative; position: relative;
height: 380px; flex: 1 1 auto;
} min-height: 0;
@media (max-width: 640px) {
.canvasBox {
height: 280px;
}
} }
/* School chips: mobile-only legend + tap-to-focus control. Desktop keeps /* School chips: mobile-only legend + tap-to-focus control. Desktop keeps
@@ -60,10 +60,18 @@
margin: 0 0 1rem; margin: 0 0 1rem;
} }
/* ComparisonChart owns its own canvas height now (a definite px value per /* ComparisonChart runs Chart.js with maintainAspectRatio:false, so it fills
breakpoint), with the mobile chip legend above and the gap note below it its container's height — which must be *definite*. A min-height alone does
flowing at natural size. This box therefore only needs to not constrain not resolve the chart wrapper's height:100%, leaving Chart.js to fall back
that height — no fixed height, or the note would again eat the plot. */ to its ~150px default (a squashed sliver). Give it a real height. */
.chartBox { .chartBox {
min-height: 0; height: 420px;
}
@media (max-width: 640px) {
/* Taller on mobile: the mobile-only school chips sit above the canvas and
wrap to two rows for 3+ schools, so the plot keeps a usable height. */
.chartBox {
height: 360px;
}
} }