diff --git a/PlotLine.Tests/Browser/investigation-companion.cjs b/PlotLine.Tests/Browser/investigation-companion.cjs index 0904bb98..53896d6d 100644 --- a/PlotLine.Tests/Browser/investigation-companion.cjs +++ b/PlotLine.Tests/Browser/investigation-companion.cjs @@ -22,7 +22,7 @@ const base=live?'https://dev.plotdirector.com':'http://127.0.0.1:5238',out=proce // Right Help opens independently and does not replace guidance. await p.evaluate(()=>PlotLineHelpDrawer.open('plotLines.workspace'));await p.locator('[data-help-content] .help-drawer-article').waitFor();await p.locator('[data-help-pin]').click();assert.equal(await root.getAttribute('data-collapsed'),'false');assert(await p.locator('[data-help-drawer]').isVisible());assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2));assert((await p.locator('.plotline-help-main').boundingBox()).width>=560);await snap('Both-panels-expanded'); await p.locator('[data-guidance-resize]').focus();for(let n=0;n<12;n++)await p.keyboard.press('ArrowRight');await p.setViewportSize({width:1100,height:1000});await p.waitForTimeout(200);assert((await p.locator('.plotline-help-main').boundingBox()).width>=560);assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+2));if(live)assert(await p.locator('.plot-workspace-controls').evaluate(n=>{const r=n.closest('.plotline-help-main').getBoundingClientRect();return [...n.querySelectorAll('input:not([type=hidden]),select,button')].every(c=>{const b=c.getBoundingClientRect();return b.left>=r.left&&b.right<=r.right;});}));await snap('Both-panels-minimum-centre');await p.setViewportSize({width:1440,height:1000});for(let n=0;n<12;n++)await p.keyboard.press('ArrowLeft'); - await root.locator('[data-guidance-collapse]').click();assert.equal(await root.getAttribute('data-collapsed'),'true');await snap('Left-collapsed-tab');await p.reload();await root.locator('[data-guidance-expand]').waitFor();assert.equal(await root.getAttribute('data-collapsed'),'true');await root.locator('[data-guidance-expand]').click();await root.locator('#guidance-finding').waitFor(); + await root.locator('[data-guidance-collapse]').click();assert.equal(await root.getAttribute('data-collapsed'),'true');assert(await root.locator('.pd-investigation-panel').isHidden());await snap('Left-collapsed-tab');await p.reload();await root.locator('[data-guidance-expand]').waitFor();assert.equal(await root.getAttribute('data-collapsed'),'true');await root.locator('[data-guidance-expand]').click();await root.locator('#guidance-finding').waitFor(); if(live){await root.locator('.pd-guidance-tool[data-capability=timeline] form button').click();await p.waitForURL(/\/Timeline/);await root.locator('#guidance-finding').waitFor();assert.equal(c.pages().length,pages);assert.equal(await root.locator('.pd-guidance-tool[data-capability=timeline]').getAttribute('data-selected'),'true');await snap('Second-destination-Timeline');} else{await p.goto(`${base}/Writer/Review?bookId=${w.book}&projectId=${w.project}`);await root.locator('#guidance-finding').waitFor();} await expandRibbon();await p.getByRole('tab',{name:'Writer',exact:true}).click();await p.waitForURL(u=>/\/Writer(?:\/Index)?$/.test(u.pathname));await root.locator('#guidance-finding').waitFor();await expandRibbon();await p.locator('[data-app-back]').click();await p.waitForURL(live?/\/Timeline/:/\/Writer\/Review/);await root.locator('#guidance-finding').waitFor();assert(await first.locator('select').inputValue()==='Done');await snap('Ribbon-Back-retains-guidance'); diff --git a/PlotLine/wwwroot/css/investigation-companion.css b/PlotLine/wwwroot/css/investigation-companion.css index a1ce68fb..e6f53fd7 100644 --- a/PlotLine/wwwroot/css/investigation-companion.css +++ b/PlotLine/wwwroot/css/investigation-companion.css @@ -6,7 +6,7 @@ .pd-investigation .plotline-help-drawer-content{padding:.85rem;min-height:0;overscroll-behavior:contain} .pd-investigation-tab{display:none} .pd-investigation[data-collapsed=true]{flex-basis:36px;width:36px} -.pd-investigation[data-collapsed=true]>.pd-investigation .pd-investigation-panel{display:none} +.pd-investigation[data-collapsed=true]>.pd-investigation-panel{display:none} .pd-investigation[data-collapsed=true]>.pd-investigation-tab{display:block;position:sticky;top:var(--context-sticky-top);writing-mode:vertical-rl;min-height:140px;width:36px;border:0;background:var(--pd-surface-2);color:var(--pd-text);padding:1rem .5rem;font:inherit;cursor:pointer} .pd-investigation-tab:focus-visible,.pd-investigation-splitter:focus-visible{outline:2px solid var(--pd-focus);outline-offset:-2px} .pd-investigation-splitter{flex:0 0 8px;cursor:col-resize;touch-action:none;background:linear-gradient(90deg,transparent,var(--pd-border-subtle),transparent)}