Refine project column scrolling
This commit is contained in:
@@ -89,6 +89,9 @@ const collectMetrics = async () => page.evaluate(() => {
|
||||
verticalGaps,
|
||||
projectRailOverflow: overflowState(rail),
|
||||
projectRailChildrenOverflow: overflowState(railChildren),
|
||||
channelSidebarOverflow: overflowState(sidebar),
|
||||
stageOverflow: overflowState(stage),
|
||||
inspectorOverflow: overflowState(inspector),
|
||||
overflowX: document.documentElement.scrollWidth > document.documentElement.clientWidth,
|
||||
viewportWidth: window.innerWidth,
|
||||
}
|
||||
@@ -213,6 +216,15 @@ if (!projectMetrics.projectRail || !projectMetrics.channelSidebar || !projectMet
|
||||
failures.push(`expected inspector to end at viewport right edge, got inspector.right=${projectMetrics.inspector.right}, viewport=${projectMetrics.viewportWidth}`)
|
||||
}
|
||||
}
|
||||
for (const [name, overflow] of [
|
||||
['channel sidebar', projectMetrics.channelSidebarOverflow],
|
||||
['stage', projectMetrics.stageOverflow],
|
||||
['inspector', projectMetrics.inspectorOverflow],
|
||||
]) {
|
||||
if (!overflow || overflow.overflowX !== 'hidden' || overflow.overflowY !== 'auto') {
|
||||
failures.push(`expected ${name} to hide horizontal scrollbars and show vertical scrollbars only when needed, got ${JSON.stringify(overflow)}`)
|
||||
}
|
||||
}
|
||||
|
||||
if (failures.length) {
|
||||
throw new Error(failures.join('\n'))
|
||||
|
||||
Reference in New Issue
Block a user