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:
1 parent
6780abb42d
commit
7976801034
7 files changed
+43
-20
No files matched your search
@@ -211,7 +211,9 @@ try {
|
||||
await page.getByLabel('선택 상태',{exact:true}).selectOption(selection)
|
||||
if(await page.locator('.hm-sw-property').count()===0)await panelButton()
|
||||
const box=await page.locator('.hm-sw-property').boundingBox()
|
||||
check(`original panel size ${selection}:314x${height}`,box.width===314&&box.height===height,box)
|
||||
// 2026-10-26 (user request): no Stage scrollbar when the panel opens; a panel taller than the Stage room is clamped.
|
||||
const room=await stage.evaluate(e=>{const s=getComputedStyle(e);return {limit:parseFloat(s.getPropertyValue('--sw-preview-stage-height'))-parseFloat(s.getPropertyValue('--sw-preview-panel-top'))-4,scrollHeight:e.scrollHeight,height:e.clientHeight}})
|
||||
check(`panel size ${selection}:314 x min(${height}, Stage room), no Stage scroll`,box.width===314&&Math.abs(box.height-Math.min(height,room.limit))<.5&&room.scrollHeight<=room.height,{box,room})
|
||||
}
|
||||
await page.screenshot({path:path.join(out,'overview-after-expanded.png')})
|
||||
await stage.evaluate(e=>{e.scrollTop=e.scrollHeight})
|
||||
@@ -219,11 +221,11 @@ try {
|
||||
check('expanded popup bottom accessible through internal scroll',await panelInput('z').inputValue()==='5')
|
||||
await page.screenshot({path:path.join(out,'overview-after-scrolled.png')})
|
||||
await go();await page.screenshot({path:path.join(out,'overview-after.png')})
|
||||
// A small Inner keeps native component dimensions; the Stage, rather than the browser document, scrolls.
|
||||
// A small Inner keeps the native Header width; the Stage, rather than the browser document, scrolls sideways only.
|
||||
await page.setViewportSize({width:390,height:700});await go();await page.getByLabel('선택 상태',{exact:true}).selectOption('expanded');await panelButton()
|
||||
await panelInput('z').scrollIntoViewIfNeeded();await panelInput('z').fill('3');await panelInput('z').press('Enter')
|
||||
const narrow=await stage.evaluate(e=>({top:e.scrollTop,left:e.scrollLeft,height:e.clientHeight,scrollHeight:e.scrollHeight,width:e.clientWidth,scrollWidth:e.scrollWidth}))
|
||||
check('small Inner reaches full popup bottom with native Header and popup dimensions',await panelInput('z').inputValue()==='3'&&narrow.scrollHeight>narrow.height&&narrow.scrollWidth>=390,narrow)
|
||||
check('small Inner reaches the popup bottom through the panel body, no Stage vertical scroll',await panelInput('z').inputValue()==='3'&&narrow.scrollHeight<=narrow.height&&narrow.scrollWidth>=390,narrow)
|
||||
await page.screenshot({path:path.join(out,'overview-narrow.png')})
|
||||
await panelInput('z').press('Escape')
|
||||
check('narrow popup Escape restores More focus',await header.getByRole('button',{name:'더보기',exact:true}).evaluate(e=>document.activeElement===e))
|
||||
|
||||
Reference in new issue
Block a user