feat: unify app navigation and add today attendance overview

- Replace floating pill tab dock with a full-width system-aligned navigation bar.
- Give active tabs cobalt icon chips and clean cobalt labels while keeping inactive tabs muted.
- Add compact live attendance summary above the day picker on Today.
- Add Playwright verification for the new metrics and navigation surface.
This commit is contained in:
2026-09-05 09:56:55 +05:30
parent def12005de
commit 87b07728b5
5 changed files with 175 additions and 17 deletions

34
scripts/test-docker.mjs Normal file
View File

@@ -0,0 +1,34 @@
import { chromium } from 'playwright';
async function testDocker() {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
viewport: { width: 390, height: 844 },
deviceScaleFactor: 2,
isMobile: true,
});
const page = await context.newPage();
console.log('Testing app via Docker at http://127.0.0.1:8080...');
await page.goto('http://127.0.0.1:8080/');
await page.waitForTimeout(2000);
// Open add class modal
const addBtn = page.getByRole('button', { name: 'Add a class' });
await addBtn.click();
await page.waitForTimeout(1000);
await page.screenshot({ path: './screenshots/docker-add-class-modal.png' });
// Open course picker drawer
const changeBtn = page.getByText('Change');
if (await changeBtn.isVisible()) {
await changeBtn.click();
await page.waitForTimeout(600);
await page.screenshot({ path: './screenshots/docker-add-class-picker-open.png' });
}
await browser.close();
console.log('Docker verification completed successfully.');
}
testDocker().catch(console.error);

View File

@@ -0,0 +1,23 @@
import { chromium } from 'playwright';
async function capture() {
const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
viewport: { width: 390, height: 844 },
deviceScaleFactor: 2,
isMobile: true,
});
const page = await context.newPage();
await page.goto('http://127.0.0.1:3000/');
await page.waitForTimeout(2000);
await page.screenshot({ path: './screenshots/16-today-metrics-and-nav.png' });
await page.getByRole('button', { name: 'Attendance' }).click();
await page.waitForTimeout(500);
await page.screenshot({ path: './screenshots/17-attendance-new-nav.png' });
await browser.close();
}
capture().catch(console.error);