Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4565e9f15 |
@@ -5,13 +5,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
# Cancel superseded runs: pushing a new commit to a PR (or an empty
|
|
||||||
# re-trigger) aborts the previous still-running checks instead of running
|
|
||||||
# a second full matrix alongside them.
|
|
||||||
concurrency:
|
|
||||||
group: pr-checks-${{ gitea.event.pull_request.number }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: privaterepo.sitaru.org
|
REGISTRY: privaterepo.sitaru.org
|
||||||
BACKEND_IMAGE_NAME: ${{ gitea.repository }}-backend
|
BACKEND_IMAGE_NAME: ${{ gitea.repository }}-backend
|
||||||
@@ -30,22 +23,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
# Cache the resolved node_modules (452 MB / 460 packages) keyed on the
|
cache-dependency-path: nextjs-app/package-lock.json
|
||||||
# lockfile. On a hit — the common case, since deps change rarely — the
|
|
||||||
# whole `npm ci` step is skipped, not just its download phase. The key
|
|
||||||
# pins OS + node major so we never restore incompatible native binaries.
|
|
||||||
- name: Cache node_modules
|
|
||||||
id: node-modules-cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: nextjs-app/node_modules
|
|
||||||
key: nextjs-node-modules-${{ runner.os }}-node22-${{ hashFiles('nextjs-app/package-lock.json') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
||||||
working-directory: nextjs-app
|
working-directory: nextjs-app
|
||||||
run: npm ci --prefer-offline --no-audit --no-fund
|
run: npm ci
|
||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
working-directory: nextjs-app
|
working-directory: nextjs-app
|
||||||
|
|||||||
@@ -213,7 +213,12 @@ test('compare chart on mobile shows school chips with tap-to-focus', async ({ pa
|
|||||||
expect(bodyOverflowsX).toBe(false);
|
expect(bodyOverflowsX).toBe(false);
|
||||||
|
|
||||||
// The trends chart still renders (inside the Explore trends section)…
|
// The trends chart still renders (inside the Explore trends section)…
|
||||||
await expect(page.locator('canvas:visible').first()).toBeVisible({ timeout: 15_000 });
|
const chartCanvas = page.locator('canvas:visible').first();
|
||||||
|
await expect(chartCanvas).toBeVisible({ timeout: 15_000 });
|
||||||
|
// …at a real height, not the squashed ~150px Chart.js fallback that
|
||||||
|
// appears when the container lacks a definite height.
|
||||||
|
const chartBox = await chartCanvas.boundingBox();
|
||||||
|
expect(chartBox && chartBox.height).toBeGreaterThan(220);
|
||||||
|
|
||||||
// …with the mobile chart legend chips and tap-to-focus behaviour intact.
|
// …with the mobile chart legend chips and tap-to-focus behaviour intact.
|
||||||
const chipGroup = page.getByRole('group', { name: /highlight a school/i });
|
const chipGroup = page.getByRole('group', { name: /highlight a school/i });
|
||||||
|
|||||||
@@ -60,8 +60,20 @@
|
|||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ComparisonChart runs Chart.js with maintainAspectRatio:false, so it fills
|
||||||
|
its container's height — which must be *definite*. A min-height alone does
|
||||||
|
not resolve the chart wrapper's height:100%, leaving Chart.js to fall back
|
||||||
|
to its ~150px default (a squashed sliver). Give it a real height. */
|
||||||
.chartBox {
|
.chartBox {
|
||||||
min-height: 320px;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableWrapper {
|
.tableWrapper {
|
||||||
|
|||||||
Reference in New Issue
Block a user