diff --git a/demo/symfony8/composer.json b/demo/symfony8/composer.json index 6d5407f..148aefe 100644 --- a/demo/symfony8/composer.json +++ b/demo/symfony8/composer.json @@ -8,7 +8,7 @@ "doctrine/orm": "^3.0", "nowo-tech/form-kit-bundle": "^2.10", "nowo-tech/http-log-bundle": "@dev", - "nowo-tech/ui-kit-bundle": "^2.51", + "nowo-tech/ui-kit-bundle": "^2.60", "php": ">=8.4", "symfony/asset": "^8.0", "symfony/console": "^8.0", diff --git a/demo/symfony8/composer.lock b/demo/symfony8/composer.lock index a2d7e28..611cbec 100644 --- a/demo/symfony8/composer.lock +++ b/demo/symfony8/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eb18b2d6dbd97e3f7a58c5af68bfa29a", + "content-hash": "73561c184d8265a6fff6942f03ccce34", "packages": [ { "name": "doctrine/collections", @@ -1049,11 +1049,11 @@ }, { "name": "nowo-tech/http-log-bundle", - "version": "dev-chore/transaction-doctrine-1.8", + "version": "dev-chore/demo-platform-shell", "dist": { "type": "path", "url": "/var/http-log-bundle", - "reference": "7ac459f3efe9399ad08229db813cbcc98928a245" + "reference": "dfca96e208e2dd55c16d18bc6a6bef99f3ae8ee6" }, "require": { "doctrine/doctrine-bundle": "^2.10 || ^3.0", @@ -1380,16 +1380,16 @@ }, { "name": "nowo-tech/ui-kit-bundle", - "version": "v2.51.0", + "version": "v2.60.0", "source": { "type": "git", "url": "https://github.com/nowo-tech/UiKitBundle.git", - "reference": "bd14774abdb7fb3bb755bf8fb2bf4aaee0258d15" + "reference": "cd142ddce9afc51681e85f64d5fc96ef0c14302e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nowo-tech/UiKitBundle/zipball/bd14774abdb7fb3bb755bf8fb2bf4aaee0258d15", - "reference": "bd14774abdb7fb3bb755bf8fb2bf4aaee0258d15", + "url": "https://api.github.com/repos/nowo-tech/UiKitBundle/zipball/cd142ddce9afc51681e85f64d5fc96ef0c14302e", + "reference": "cd142ddce9afc51681e85f64d5fc96ef0c14302e", "shasum": "" }, "require": { @@ -1436,7 +1436,8 @@ "symfony/validator": "Colour validation in the optional appearance forms" }, "bin": [ - "bin/nowo-ui-token-lint" + "bin/nowo-ui-token-lint", + "bin/nowo-ui-demo-style-lint" ], "type": "symfony-bundle", "autoload": { @@ -1478,8 +1479,8 @@ "issues": "https://github.com/nowo-tech/UiKitBundle/issues", "source": "https://github.com/nowo-tech/UiKitBundle" }, - "time": "2026-11-13T16:47:40+00:00", - "published-time": "2026-11-13T16:53:34+00:00" + "time": "2026-11-20T20:27:14+00:00", + "published-time": "2026-11-20T20:30:01+00:00" }, { "name": "psr/cache", diff --git a/demo/symfony8/config/packages/dev/nowo_hot_reload.yaml b/demo/symfony8/config/packages/dev/nowo_hot_reload.yaml index b626799..5afe390 100644 --- a/demo/symfony8/config/packages/dev/nowo_hot_reload.yaml +++ b/demo/symfony8/config/packages/dev/nowo_hot_reload.yaml @@ -1,15 +1,16 @@ # FrankenPHP Hot Reload — development only (do not enable in production). +# REQ-DEMO-014: no CDN in the demo. The browser client talks SSE (client_mode: visibility) and the page is reloaded +# instead of morphed (idiomorph: false), so the bundle injects no script from jsDelivr. nowo_hot_reload: enabled: true auto_inject: true require_frankenphp_env: true allow_production: false - idiomorph: true + client_mode: visibility + idiomorph: false preserve_selectors: - '[id^="sfwdt"]' - '.sf-toolbar' - '.sf-minitoolbar' preserve_observe: true - csp_augment_script_src: true - csp_script_src_hosts: - - 'https://cdn.jsdelivr.net' + csp_augment_script_src: false diff --git a/demo/symfony8/config/packages/nowo_ui_kit.yaml b/demo/symfony8/config/packages/nowo_ui_kit.yaml index 8e7f2ad..e2764e5 100644 --- a/demo/symfony8/config/packages/nowo_ui_kit.yaml +++ b/demo/symfony8/config/packages/nowo_ui_kit.yaml @@ -4,4 +4,5 @@ nowo_ui_kit: # REQ-UI-003: every UiKit scaffold (the HttpLog admin pages) renders inside the demo base layout (UiKit admin layout, default theme, REQ-DEMO-014). layouts: admin: 'base.html.twig' + guest: 'base.html.twig' base_stylesheet: true diff --git a/demo/symfony8/e2e/package-lock.json b/demo/symfony8/e2e/package-lock.json index c6ab0a0..3ddcb97 100644 --- a/demo/symfony8/e2e/package-lock.json +++ b/demo/symfony8/e2e/package-lock.json @@ -8,10 +8,24 @@ "name": "nowo-http-log-demo-e2e", "version": "1.0.0", "devDependencies": { + "@axe-core/playwright": "4.13.0", "@playwright/test": "1.65.1", "sharp": "^0.34.4" } }, + "node_modules/@axe-core/playwright": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.13.0.tgz", + "integrity": "sha512-6YLx+kxXu5GJceG4ozFg+33a2EMTdjYwWGloJ3sb9Kta5pp+ZNS53uxGVog5JetIY8s++P5UrtX+cri+u0VAVg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.13.0" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, "node_modules/@emnapi/runtime": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", @@ -577,6 +591,16 @@ "node": ">=20" } }, + "node_modules/axe-core": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.13.0.tgz", + "integrity": "sha512-UzGt8zg7Ny8djbYMhxl2zuEevVa7r2gJjYY5Lwr1xM7+XU2nd6CkIWFTVcCIbAP63vSz71NaVyyuSk9lHKcy0A==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", diff --git a/demo/symfony8/e2e/package.json b/demo/symfony8/e2e/package.json index cef09ac..daa7727 100644 --- a/demo/symfony8/e2e/package.json +++ b/demo/symfony8/e2e/package.json @@ -10,6 +10,7 @@ "to-webp": "node scripts/to-webp.mjs" }, "devDependencies": { + "@axe-core/playwright": "4.13.0", "@playwright/test": "1.65.1", "sharp": "^0.34.4" } diff --git a/demo/symfony8/e2e/tests/demo-platform.spec.ts b/demo/symfony8/e2e/tests/demo-platform.spec.ts new file mode 100644 index 0000000..886bd44 --- /dev/null +++ b/demo/symfony8/e2e/tests/demo-platform.spec.ts @@ -0,0 +1,177 @@ +import { test, expect, type Page } from '@playwright/test'; +import AxeBuilder from '@axe-core/playwright'; + +/** + * REQ-DEMO-014: the demo runs inside UiKit's demo platform shell. Every demo page, at 1440 px and at 390 px with a touch + * context: the shell layout and style rules (no demo styles, no host theme tokens, no framework classes, 44 px targets, + * input borders 3:1), axe (wcag2a / 2aa / 21a / 21aa, serious + critical = 0) in light and dark, and the keyboard drawer. + */ +const PAGES: Array<{ name: string; path: string; auth?: boolean; bundleOwned?: string[] }> = [ + { name: 'home', path: '/' }, + // bundle-owned finding: the HttpLog filter form sets the framework classes form-control / form-select (NowoHttpLogExtension) + { name: 'admin list', path: '/admin/http-log', bundleOwned: ['framework-class:form-control', 'framework-class:form-select'] }, +]; + +/** Signs the demo user in (pages marked `auth`). */ +async function signIn(page: Page): Promise { + // this demo has no sign-in +} + +async function open(page: Page, def: { path: string; auth?: boolean }): Promise { + if (def.auth) { + await signIn(page); + } + await page.goto(def.path); +} + +type Theme = 'light' | 'dark'; + +async function setTheme(page: Page, theme: Theme): Promise { + await page.evaluate((t) => { + document.documentElement.setAttribute('data-theme', t); + document.documentElement.setAttribute('data-bs-theme', t); + }, theme); +} + +async function axe(page: Page): Promise { + const result = await new AxeBuilder({ page }).withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']).exclude('.sf-toolbar').analyze(); + return result.violations + .filter((v) => v.impact === 'serious' || v.impact === 'critical') + .map((v) => `${v.id}: ${v.nodes.map((n) => n.target.join(' ')).join(', ')}`); +} + +/* eslint-disable */ +// prettier-ignore +function demoPlatformRules(): string[] { + const issues = []; + const main = document.querySelector('#nowo-ui-content'); + const shell = document.querySelector('[data-testid="demo-platform"]'); + if (!main || !shell) return ['no-demo-platform-shell']; + const visible = (el) => !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length); + const carded = (el) => el.closest('.nowo-ui-card, [data-nowo-ui-region="table"], [data-nowo-ui-region="form"], .nowo-ui-form-panel, dialog'); + const skip = (el) => el.closest('dialog, [data-nowo-ui-region="filters"], .nowo-ui-filters, .nowo-ui-page-header'); + + // Layout grammar. + main.querySelectorAll('table').forEach((t) => { if (!carded(t)) issues.push('table-outside-card'); }); + main.querySelectorAll('form').forEach((f) => { + if (f.querySelector('input:not([type="hidden"]), select, textarea') && !carded(f) && !skip(f) && !f.closest('table')) issues.push('form-outside-card'); + }); + const primaries = [...main.querySelectorAll('.nowo-ui-btn--primary')].filter((b) => visible(b) && !b.closest('table, dialog, [data-nowo-ui-region="filters"], .nowo-ui-filters, form')); + if (primaries.length > 1) issues.push(`primary-buttons:${primaries.length}`); + const header = main.querySelector('.nowo-ui-page-header'); + const flashes = main.querySelector('.nowo-ui-flashes'); + if (header && flashes && (flashes.compareDocumentPosition(header) & Node.DOCUMENT_POSITION_FOLLOWING)) issues.push('flashes-before-page-header'); + if (document.documentElement.scrollWidth > document.documentElement.clientWidth + 1) issues.push('page-scrolls-horizontally'); + + // Styles: no demo styles, no host theme tokens, no CDN / foreign stylesheet, no framework classes inside the shell. + document.querySelectorAll('style').forEach((s) => { + if (s.matches('[data-nowo-ui-theme-tokens], [data-nowo-ui-appearance]')) { issues.push('host-theme-tokens'); return; } + if (!/sf-toolbar|sfwdt|sf-minitoolbar|sf-display/.test(s.textContent || '') && !s.closest('[id^="sfwdt"], .sf-toolbar')) issues.push('style-element'); + }); + document.querySelectorAll('link[rel="stylesheet"]').forEach((l) => { + const path = new URL(l.href, location.href).pathname; + if (!path.startsWith('/bundles/') && !path.startsWith('/_wdt/') && !path.startsWith('/_profiler/')) issues.push(`stylesheet:${path}`); + }); + const framework = /^(acme-.*|nav-tabs|nav-link|nav-item|alert|alert-.*|form-check.*|form-control|form-select|form-label|btn|btn-.*|card|card-.*|badge|row|col|col-.*|table|table-.*)$/; + shell.querySelectorAll('[class]').forEach((el) => { + for (const c of el.classList) { if (framework.test(c)) { issues.push(`framework-class:${c}`); break; } } + }); + + // Drawer: below 901 px a closed drawer is inert and the burger says so. + const aside = shell.querySelector('[data-nowo-ui-aside]'); + if (aside && window.innerWidth < 901) { + const open = shell.classList.contains('is-aside-open-mobile'); + if (!open && !aside.hasAttribute('inert')) issues.push('drawer-not-inert'); + shell.querySelectorAll('[data-nowo-ui-burger]').forEach((b) => { + if (visible(b) && b.getAttribute('aria-expanded') !== (open ? 'true' : 'false')) issues.push('burger-state'); + }); + } + + // Touch: 44 px targets on coarse pointers (checkbox / radio 24 px, their label carries the 44 px row). + if (window.matchMedia('(pointer: coarse)').matches) { + const controls = [...shell.querySelectorAll('.nowo-ui-btn, button, summary, input:not([type="hidden"]), select, textarea, [role="tab"], .nowo-ui-aside__link, .nowo-ui-demo-platform__locale')] + .filter((el) => visible(el) && !el.closest('[inert], table, .ts-control')); + for (const el of controls) { + const r = el.getBoundingClientRect(); + const small = el.matches('input[type="checkbox"], input[type="radio"]') ? r.height < 24 || r.width < 24 : r.height < 43.5; + if (small) { issues.push(`target-under-44px:${(el.className && String(el.className).split(' ')[0]) || el.tagName.toLowerCase()}`); } + } + } + + // Inputs: boundary 3:1 or more against the surface behind them (WCAG 1.4.11). + const rgb = (c) => { const m = c.match(/[\d.]+/g); return m ? m.slice(0, 4).map(Number) : null; }; + const lum = (c) => { const v = c.slice(0, 3).map((x) => { const s = x / 255; return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4; }); return 0.2126 * v[0] + 0.7152 * v[1] + 0.0722 * v[2]; }; + const bgOf = (el) => { for (let n = el.parentElement; n; n = n.parentElement) { const c = rgb(getComputedStyle(n).backgroundColor); if (c && (c.length < 4 || c[3] > 0)) return c; } return [255, 255, 255]; }; + shell.querySelectorAll('input:not([type="hidden"], [type="checkbox"], [type="radio"]), select, textarea').forEach((el) => { + if (!visible(el) || el.closest('[inert]')) return; + const border = rgb(getComputedStyle(el).borderTopColor); + if (!border) return; + const a = lum(border); const b = lum(bgOf(el)); + if ((Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05) < 3) issues.push(`input-border-under-3:1:${el.id || el.name || el.tagName.toLowerCase()}`); + }); + + return [...new Set(issues)]; +} + +/** Findings on a page rendered by the bundle's own templates (bundle-owned, reported, fixed in the bundle). */ +function without(issues: string[], bundleOwned: string[] = []): string[] { + return issues.filter((issue) => !bundleOwned.includes(issue)); +} + +const PHONE = { viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true }; + +for (const def of PAGES) { + test.describe(`demo platform: ${def.name}`, () => { + test('rules at 1440 px', async ({ page }) => { + await page.setViewportSize({ width: 1440, height: 900 }); + await open(page, def); + expect(without(await page.evaluate(demoPlatformRules), def.bundleOwned)).toEqual([]); + }); + + test('rules at 390 px, touch', async ({ browser }) => { + const context = await browser.newContext(PHONE); + const page = await context.newPage(); + await open(page, def); + expect(without(await page.evaluate(demoPlatformRules), def.bundleOwned)).toEqual([]); + await context.close(); + }); + + for (const theme of ['light', 'dark'] as const) { + test(`axe ${theme}, 1440 px`, async ({ page }) => { + await page.setViewportSize({ width: 1440, height: 900 }); + await open(page, def); + await setTheme(page, theme); + expect(await axe(page)).toEqual([]); + }); + + test(`axe ${theme}, 390 px`, async ({ browser }) => { + const context = await browser.newContext(PHONE); + const page = await context.newPage(); + await open(page, def); + await setTheme(page, theme); + expect(await axe(page)).toEqual([]); + await context.close(); + }); + } + }); +} + +test('phone drawer: keyboard in and out, inert while closed', async ({ browser }) => { + const context = await browser.newContext(PHONE); + const page = await context.newPage(); + await page.goto(PAGES[0].path); + const aside = page.locator('[data-nowo-ui-aside]'); + const burger = page.locator('[data-nowo-ui-burger]').first(); + await expect(aside).toHaveAttribute('inert', ''); + await expect(burger).toHaveAttribute('aria-expanded', 'false'); + await burger.focus(); + await page.keyboard.press('Enter'); + await expect(burger).toHaveAttribute('aria-expanded', 'true'); + await expect(page.locator('[data-nowo-ui-aside] a:focus')).toHaveCount(1); + await expect(page.locator('.nowo-ui-main')).toHaveAttribute('inert', ''); + await expect(page.locator('html')).toHaveClass(/nowo-ui-drawer-open/); + await page.keyboard.press('Escape'); + await expect(burger).toBeFocused(); + await expect(aside).toHaveAttribute('inert', ''); + await context.close(); +}); diff --git a/demo/symfony8/e2e/tests/demo.spec.ts b/demo/symfony8/e2e/tests/demo.spec.ts index 49189ac..5d5599f 100644 --- a/demo/symfony8/e2e/tests/demo.spec.ts +++ b/demo/symfony8/e2e/tests/demo.spec.ts @@ -88,6 +88,8 @@ test.describe('http log admin', () => { await page.goto('/admin/http-log?http_log_filter%5Bpath%5D=%2Fapi%2Fecho'); await page.locator('tbody tr').first().locator('.nowo-ui-action--view').click(); await expect(show.locator('#http-log-request-headers tbody tr', { hasText: 'cookie' })).toHaveCount(1, { timeout: 1_000 }); + // the shell's flash region starts a session, so seeded entries carry a cookie too: wait for this exact entry + await expect(show.locator('#http-log-request-body code')).toContainText('"pretty": true', { timeout: 1_000 }); }).toPass({ timeout: 10_000 }); await expect(show.locator('.nowo-http-log-method')).toHaveText('POST'); await expect(show.locator('.nowo-http-log-status')).toHaveText('200'); diff --git a/demo/symfony8/e2e/tests/screenshots.spec.ts b/demo/symfony8/e2e/tests/screenshots.spec.ts index 97c39af..4e958f3 100644 --- a/demo/symfony8/e2e/tests/screenshots.spec.ts +++ b/demo/symfony8/e2e/tests/screenshots.spec.ts @@ -4,16 +4,15 @@ import { resolve } from 'node:path'; import { seedTraffic } from './helpers'; /** - * REQ-DEMO-013 — the Http Log admin pages in full demo context: demo navbar → UiKit page → Symfony WebProfiler - * toolbar, captured as a padded union clip on a viewport tall enough for the whole page. + * REQ-DEMO-013 — the Http Log admin pages in the demo platform shell (top bar, aside, page), captured without the + * Symfony WebProfiler toolbar on a viewport tall enough for the whole page. */ const outDir = process.env.SCREENSHOT_DIR ? resolve(process.env.SCREENSHOT_DIR) : resolve(__dirname, '../../../../docs/images/demo'); const WIDTH = 1280; -const PAD = 16; -const CHROME = '.nowo-ui-header, main'; +const HIDE_TOOLBAR = '.sf-toolbar, .sf-minitoolbar, [id^="sfwdt"] { display: none !important; }'; test.use({ viewport: { width: WIDTH, height: 900 } }); @@ -22,39 +21,17 @@ test.beforeAll(async ({ request }) => { await seedTraffic(request); }); -/** Wait for the loaded profiler toolbar and grow the viewport so the whole page fits above it. */ +/** Grow the viewport so the whole shell fits, without the profiler toolbar. */ async function fitViewport(page: Page): Promise { - const toolbar = page.locator('.sf-toolbar .sf-toolbarreset'); - await expect(toolbar).toBeVisible({ timeout: 15_000 }); - // the toolbar first renders a "Loading…" stub: wait for the real panels - await expect(page.locator('.sf-toolbar').first()).not.toContainText('Loading', { timeout: 15_000 }); - const toolbarHeight = Math.ceil((await toolbar.boundingBox())?.height ?? 36); - const contentBottom = await page.evaluate((sel) => Math.max(...[...document.querySelectorAll(sel)] - .map((el) => el.getBoundingClientRect().bottom + window.scrollY)), CHROME); - await page.setViewportSize({ width: WIDTH, height: Math.max(720, Math.ceil(contentBottom) + 24 + toolbarHeight) }); + await page.addStyleTag({ content: HIDE_TOOLBAR }); + const height = await page.evaluate(() => Math.ceil(document.documentElement.scrollHeight)); + await page.setViewportSize({ width: WIDTH, height: Math.max(720, height) }); await page.evaluate(() => window.scrollTo(0, 0)); } async function shoot(page: Page, file: string): Promise { - await expect(page.locator('.sf-toolbar').first()).not.toContainText('Loading'); - const box = await page.evaluate((sel) => { - const rects = [...document.querySelectorAll(`${sel}, .sf-toolbar .sf-toolbarreset`)] - .map((el) => el.getBoundingClientRect()) - .filter((r) => r.width > 0 && r.height > 0); - return { - x: Math.min(...rects.map((r) => r.left)), - y: Math.min(...rects.map((r) => r.top)), - r: Math.max(...rects.map((r) => r.right)), - b: Math.max(...rects.map((r) => r.bottom)), - }; - }, CHROME); - const vp = page.viewportSize()!; - const x = Math.max(0, box.x - PAD); - const y = Math.max(0, box.y - PAD); - await page.screenshot({ - path: resolve(outDir, `${file}.png`), - clip: { x, y, width: Math.min(vp.width, box.r + PAD) - x, height: Math.min(vp.height, box.b + PAD) - y }, - }); + await page.addStyleTag({ content: HIDE_TOOLBAR }); + await page.locator('[data-testid="demo-platform"]').screenshot({ path: resolve(outDir, `${file}.png`) }); } /** The newest logged JSON POST to /api/echo. */ @@ -81,7 +58,6 @@ test.describe('http log screenshots', () => { test('entry — delete confirm dialog', async ({ page }) => { await openEchoEntry(page); await page.setViewportSize({ width: WIDTH, height: 900 }); - await expect(page.locator('.sf-toolbar').first()).not.toContainText('Loading', { timeout: 15_000 }); await page.locator('.nowo-ui-action--delete').first().click(); await expect(page.locator('dialog[open]')).toBeVisible(); await page.waitForTimeout(300); // dialog open transition diff --git a/demo/symfony8/templates/base.html.twig b/demo/symfony8/templates/base.html.twig index a8506d6..86d78bb 100644 --- a/demo/symfony8/templates/base.html.twig +++ b/demo/symfony8/templates/base.html.twig @@ -1,20 +1,16 @@ -{#- REQ-DEMO-014: the demo shell is UiKit's admin layout with UiKit's default theme (nowo-ui.css from the bundle's own - asset package, no CSS framework, no CDN). The masthead lists the demo pages with the active item; the HttpLog admin - pages (nowo_ui_kit.layouts.admin, REQ-UI-003) render inside the same layout. -#} -{% extends '@NowoUiKit/layout/admin.html.twig' %} +{#- REQ-DEMO-014: the demo runs inside UiKit's shared demo platform shell (@NowoUiKit/demo_platform/layout.html.twig): + the same top bar, aside, content width, theme and footer as every other nowo-tech bundle demo. This file only + declares the demo (nowo_ui_demo_platform). The HttpLog admin pages render in the same shell (nowo_ui_kit.layouts). -#} +{% extends '@NowoUiKit/demo_platform/layout.html.twig' %} +{% set nowo_ui_demo_platform = { + bundle: 'Http Log', + home_route: 'demo_home', + repository: 'https://github.com/nowo-tech/HttpLogBundle', + translation_domain: false, + nav: [ + {label: 'Overview', route: 'demo_home', section: 'Demo'}, + {label: 'Admin UI', route: 'nowo_http_log_admin_index', active: ['nowo_http_log_admin_*'], section: 'Http Log admin'}, + ], +} %} -{% block nowo_ui_document_title %}{% block title %}Http Log Demo{% endblock %}{% endblock %} - -{% block nowo_ui_navigation %} - {% set _route = app.request.attributes.get('_route') %} -
- Http Log Bundle · Symfony 8 - -
-{% endblock %} - -{% block nowo_ui_content %}{% block body %}{% endblock %}{% endblock %} +{% block nowo_ui_document_title %}{% block title %}Http Log Demo{% endblock %} — Symfony 8{% endblock %} diff --git a/demo/symfony8/templates/demo/index.html.twig b/demo/symfony8/templates/demo/index.html.twig index adc4fc6..9dcf3b7 100644 --- a/demo/symfony8/templates/demo/index.html.twig +++ b/demo/symfony8/templates/demo/index.html.twig @@ -3,21 +3,22 @@ {% block title %}Http Log Demo{% endblock %} {% block nowo_ui_page_header %} + {% set _toolbar %}Reload (capture another log){% endset %} {{ include(nowo_ui_partial('page_header'), { title: 'HTTP request / response logging', intro: 'Each page load and API call is captured by HttpLogBundle. Open the admin UI to browse, filter, export, or purge entries.', + toolbar: _toolbar, }) }} {% endblock %} {% block body %} -
- -
+ {% embed '@NowoUiKit/demo_platform/_section.html.twig' with {title: 'Capture traffic', intro: 'Page generated at ' ~ generatedAt ~ '.', kind: 'content'} %} + {% block section_body %} +

Reloading this page logs a page request. The JSON endpoint logs an API request and its response body.

+ {% endblock %} + {% block section_footer %} + GET /api/ping (JSON) + Admin UI (HTTP Basic: admin / admin) + {% endblock %} + {% endembed %} {% endblock %} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 0683767..39c97cd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -58,6 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- demo: the demo runs inside UiKit's demo platform shell (`@NowoUiKit/demo_platform/layout.html.twig`, UiKit ^2.60): shared top bar, aside navigation and section cards; its own masthead markup is gone, the Web Debug Toolbar and the CDN hot-reload scripts are off in the README screenshots and the demo. Demo only, no release. - Requires `nowo-tech/transaction-doctrine` ^1.8.1 (fixes GHSA-9wh3-m3m5-jffx and GHSA-65w2-9r4h-848g). ## [1.23.0] - 2026-11-19 diff --git a/docs/images/demo/admin-delete-confirm.webp b/docs/images/demo/admin-delete-confirm.webp index e004848..2bef4a9 100644 Binary files a/docs/images/demo/admin-delete-confirm.webp and b/docs/images/demo/admin-delete-confirm.webp differ diff --git a/docs/images/demo/admin-list.webp b/docs/images/demo/admin-list.webp index 7901b2b..0f0cd15 100644 Binary files a/docs/images/demo/admin-list.webp and b/docs/images/demo/admin-list.webp differ diff --git a/docs/images/demo/admin-show.webp b/docs/images/demo/admin-show.webp index 9fc0295..5560beb 100644 Binary files a/docs/images/demo/admin-show.webp and b/docs/images/demo/admin-show.webp differ