Keep Chapter Details tables readable in mobile PWA workspaces
This commit is contained in:
parent
9d78a630fd
commit
016b58fe71
@ -105,3 +105,9 @@ Final Writer checkpoint: full harness passed again (405 checks, exit 0); both Wr
|
||||
- Maps now has a folded-map shared navigation command, distinct from the Floor Plans blueprint, and is available in quick-access customisation without changing defaults. Locations uses separate icon+label choices with a recessed active state and original mutually exclusive/persisted handlers. Tree rows have a right-edge grip using the established `⠿` convention; dragging starts at the handle while Edit remains the accessible parent-change alternative.
|
||||
- Verification so far: solution builds passed with zero warnings/errors; full harness passed again (405 checks); Writer recovery/navigation and chapter-goal browser/PWA suites passed after spacing changes; real-layout Locations controls/native handle/confirmation/relationship tests passed in four themes and both modes; assignment/AJAX/validation/scroll tests passed with handle initiation; nine-record workspace suite passed. Final visual acceptance and quick-access icon check remain pending.
|
||||
- Read-only current database metadata inventory obtained: 167 tables, 54 with ProjectID, 113 reachable by foreign keys from Projects. This is the start of the data-transfer audit, not coverage proof. No Development data was changed. Preparing a schema-only isolated test environment; E/F inventories and semantic round trips remain pending.
|
||||
|
||||
### Wider visual follow-up: readable Chapter Details tables
|
||||
|
||||
Final settled-theme capture covers 18 named pages / 288 cases with no script errors or document overflow. Inspection of the newly added Chapter Details page exposed a real mobile PWA failure: inherited `overflow-wrap:anywhere` from record forms split scene-table headers and content into individual letters. Responsive record-table containers now restore normal word wrapping and horizontal scrolling. Verified the actual PWA screenshot: a compact row, 804px internal table scroll width contained within a 316px container and a 390px document. New browser regression passed at 390/800/1440 in both modes and four themes. Updated Chapter screenshots are being captured; the original affected cases remain evidence of the defect. Maps/Floor Plans quick-access customisation/routes/distinct SVG checks passed in the broader toolbar browser suite.
|
||||
|
||||
Schema-only test environment now created successfully using the Development SQL container's administrative connection, after the application's limited login correctly refused database creation. The helper refuses existing targets, permits only a uniquely named synthetic database, copies no table data, excludes database users/permissions, and grants the existing Development application login access only within the synthetic database. Verified 167 tables / zero projects / zero users at creation. All further test writes target `PlotDirector_Phase2_20261103_2305`, never the running Development database. The synthetic round-trip harness remains under development; no data-transfer completeness claims yet.
|
||||
|
||||
@ -212,6 +212,16 @@ const assert = require('node:assert/strict');
|
||||
assert(await page.locator('#ribbon-surface').isHidden());
|
||||
await page.locator('[data-ribbon-collapse]').click();
|
||||
await page.waitForFunction(() => !document.querySelector('[data-ribbon-collapse]').disabled);
|
||||
await open();
|
||||
while (await page.locator('[data-toolbar-choices] input:checked').count()) await page.locator('[data-toolbar-choices] input:checked').first().uncheck();
|
||||
for(const key of ['maps','floorplans']) await page.locator(`[data-command-key="${key}"] input`).check();
|
||||
await close('Save');
|
||||
const mapsShortcut=page.locator('[data-toolbar-key="maps"]'),floorShortcut=page.locator('[data-toolbar-key="floorplans"]');
|
||||
assert(await mapsShortcut.isVisible()&&await floorShortcut.isVisible());
|
||||
assert.match(await mapsShortcut.getAttribute('href'),/Maps.*projectId=7/);
|
||||
assert.match(await floorShortcut.getAttribute('href'),/FloorPlans.*projectId=7/);
|
||||
assert.notEqual(await mapsShortcut.locator('path').getAttribute('d'),await floorShortcut.locator('path').getAttribute('d'),'Maps and Floor Plans have distinct quick-access icons');
|
||||
await open();await page.getByRole('button',{name:'Restore defaults',exact:true}).click();await close('Save');
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
assert(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth));
|
||||
await page.screenshot({ path: '/tmp/plotdirector-shell-dashboard-mobile.png' });
|
||||
|
||||
17
PlotLine.Tests/Browser/chapter-table-layout.cjs
Normal file
17
PlotLine.Tests/Browser/chapter-table-layout.cjs
Normal file
@ -0,0 +1,17 @@
|
||||
const {chromium}=require('playwright');const assert=require('node:assert/strict');
|
||||
(async()=>{const browser=await chromium.launch();try{
|
||||
for(const pwa of [false,true])for(const width of [390,800,1440]){
|
||||
const context=await browser.newContext({viewport:{width,height:1000}});if(pwa)await context.addInitScript(()=>Object.defineProperty(navigator,'standalone',{value:true}));
|
||||
const page=await context.newPage();
|
||||
for(const theme of ['modern-light','modern-dark','warm-light','warm-dark']){
|
||||
await page.goto('http://127.0.0.1:5238/fixture?desktop=Chapters&layout=full');await page.evaluate(theme=>PlotDirectorApplyApplicationTheme(theme),theme);
|
||||
const table=page.locator('.table-responsive');
|
||||
assert.equal(await table.evaluate(node=>getComputedStyle(node).overflowWrap),'normal','Record wrapping must not break each table cell into letters');
|
||||
assert.ok((await table.boundingBox()).height<300,'One scene must remain a readable compact row');
|
||||
assert.ok(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),'Table scroll stays inside its container');
|
||||
const title=table.getByRole('link',{name:'Arrival',exact:true});assert.ok((await title.boundingBox()).width>25,'Scene title retains a word-sized column');
|
||||
}
|
||||
await context.close();
|
||||
}
|
||||
console.log('PASS Chapter Details table readability and contained scrolling: browser/PWA, 390/800/1440, four themes');
|
||||
}finally{await browser.close()}})().catch(error=>{console.error(error);process.exitCode=1});
|
||||
@ -51,3 +51,6 @@ html[data-standalone="true"] .pd-record-canvas [data-pwa-task].page-heading { ma
|
||||
html[data-standalone="true"] .pd-record-canvas [data-pwa-task] h1 { font-size: clamp(1.35rem, 1.8vw, 1.8rem); margin-bottom: 0; }
|
||||
/* Account emails, identifiers and arbitrary author text must fit a narrow app window. */
|
||||
html[data-standalone="true"] .pd-record-canvas { overflow-wrap: anywhere; }
|
||||
|
||||
/* Responsive tables scroll as a unit; record-form wrapping must not split each cell into letters. */
|
||||
.pd-record-canvas .table-responsive { overflow-wrap: normal; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user