feat(sw): 3-column property compare, clamp Overview panel, narrower viewer file name

- Property Panel compare page: from 1080px, none/all stacked in column 1,
  circle and expanded side by side (2x2 and 1 column below)
- Overview Stage: the property panel is clamped to the Stage height so the
  Stage gets no scrollbar; the panel body scrolls
- Viewer header file name: clamp(140px, calc(45cqw - 256px), 360px) so a
  950px header shows no More; 1280px and wider unchanged
This commit is contained in:
shkim4 committed 2026-10-26 19:36:08 +09:00
1 parent 6780abb42d
commit 7976801034
7 files changed
+43 -20

No files matched your search

@@ -47,10 +47,11 @@ try {
await evaluate('(()=>{const s=document.querySelector("select");s.value="expanded";s.dispatchEvent(new Event("change",{bubbles:true}));return true})()');await settle()
await evaluate('(()=>{const b=document.querySelector("[data-property-panel-trigger]");if(b.getClientRects().length)b.click();else{document.querySelector(".hm-sw-header__more-trigger").click()}return true})()');await settle()
await evaluate('(()=>{const m=[...document.querySelectorAll("[role=menuitemcheckbox]")].find(e=>e.textContent.trim()==="속성창");if(m)m.click();return true})()');await settle()
const popup=await data('(()=>{const e=document.querySelector(".hm-sw-property"),r=e.getBoundingClientRect();return {width:r.width,height:r.height,focus:document.activeElement===e}})()')
check(`Firefox ${width}: full original popup 314x754`,popup.width===314&&popup.height===754,popup)
const bottom=await data('(()=>{const z=document.querySelector(".hm-sw-property [data-property-id=z] input"),s=document.querySelector("[data-preview-stage]");z.scrollIntoView({block:"nearest",inline:"nearest"});z.focus();const r=z.getBoundingClientRect();return {top:s.scrollTop,visible:document.elementFromPoint(r.x+r.width/2,r.y+r.height/2)===z}})()')
check(`Firefox ${width}: popup bottom reachable and focusable`,bottom.top>0&&bottom.visible,bottom)
// 2026-10-26 (user request): the popup is clamped to the Stage room, so the Stage gets no scrollbar.
const popup=await data('(()=>{const e=document.querySelector(".hm-sw-property"),r=e.getBoundingClientRect(),c=getComputedStyle(document.querySelector("[data-preview-stage]"));return {width:r.width,height:r.height,limit:parseFloat(c.getPropertyValue("--sw-preview-stage-height"))-parseFloat(c.getPropertyValue("--sw-preview-panel-top"))-4,focus:document.activeElement===e}})()')
check(`Firefox ${width}: popup 314 x min(754, Stage room)`,popup.width===314&&Math.abs(popup.height-Math.min(754,popup.limit))<.5,popup)
const bottom=await data('(()=>{const z=document.querySelector(".hm-sw-property [data-property-id=z] input"),s=document.querySelector("[data-preview-stage]");z.scrollIntoView({block:"nearest",inline:"nearest"});z.focus();const r=z.getBoundingClientRect();return {top:s.scrollTop,stageScroll:s.scrollHeight>s.clientHeight,visible:document.elementFromPoint(r.x+r.width/2,r.y+r.height/2)===z}})()')
check(`Firefox ${width}: popup bottom reachable and focusable without Stage scroll`,!bottom.stageScroll&&bottom.visible,bottom)
await key('\uE00C');await settle()
check(`Firefox ${width}: Escape closes popup and restores focus`,await evaluate('!document.querySelector(".hm-sw-property")&&document.activeElement.matches("[data-property-panel-trigger],.hm-sw-header__more-trigger")'))
await writeFile(path.join(out,`overview-firefox-${width}.png`),Buffer.from((await send('browsingContext.captureScreenshot',{context})).data,'base64'))