Skip to content

3D engine that AI agents drive

Keep the Object studio footer clear of the settings panel (#2241)

Nguyen Xuan Anae76f7113a56
diff --git a/changes/2241.md b/changes/2241.md
new file mode 100644
index 00000000..7b80b034
--- /dev/null
+++ b/changes/2241.md
@@ -0,0 +1 @@
+- The Object studio footer and its Measure performance button no longer draw over the settings panel (#2241)
diff --git a/scripts/smoke-scenes.mjs b/scripts/smoke-scenes.mjs
index f3dda385..f18b5b44 100644
--- a/scripts/smoke-scenes.mjs
+++ b/scripts/smoke-scenes.mjs
@@ -20,6 +20,25 @@ try {
const page = await browser.newPage({ viewport: { width: 1440, height: 900 }, reducedMotion: 'reduce' });
const errors = [];
page.on('pageerror', (error) => errors.push(error.message));
+ for (const size of [{ width: 1280, height: 800 }, { width: 1024, height: 700 }]) {
+ await page.setViewportSize(size);
+ await page.goto('http://127.0.0.1:5179/object.html');
+ await page.waitForSelector('#benchmark');
+ const overlaps = await page.evaluate(() => {
+ const panel = document.querySelector('.controls').getBoundingClientRect();
+ const footerItems = ['#benchmark', '#cpu', '#parts'].map((selector) => document.querySelector(selector).getBoundingClientRect());
+ return footerItems.filter((item) => item.width > 0 && item.left < panel.right && item.right > panel.left && item.top < panel.bottom && item.bottom > panel.top).length;
+ });
+ assert.equal(overlaps, 0, `Object studio footer overlaps the settings panel at ${size.width}x${size.height}.`);
+ const lastRowReachable = await page.evaluate(() => {
+ const panel = document.querySelector('.controls');
+ panel.scrollTop = panel.scrollHeight;
+ const lastRow = document.querySelector('#quality').getBoundingClientRect();
+ return lastRow.bottom <= panel.getBoundingClientRect().bottom;
+ });
+ assert.ok(lastRowReachable, `Object studio Resolution row cannot be scrolled into view at ${size.width}x${size.height}.`);
+ }
+ await page.setViewportSize({ width: 1440, height: 900 });
await page.goto('http://127.0.0.1:5179/nature.html');
await page.waitForFunction(() => window.__nature?.renderer);
assert.equal(await page.evaluate(() => window.__nature.state.paused), true);
diff --git a/src/style.css b/src/style.css
index 947fe9ab..b1dc7ae1 100644
--- a/src/style.css
+++ b/src/style.css
@@ -59,7 +59,7 @@ footer button { font-size: 12px; }
h2 { font-weight: 500; font-size: 20px; margin: 0 0 15px; }
#benchmark-summary { white-space: pre-line; line-height: 1.9; font-size: 14px; font-variant-numeric: tabular-nums; }
.benchmark-note { font-size: 12px; line-height: 1.7; color: #a2afb5; }
-.controls { max-height:calc(100svh - 160px); overflow-y:auto; }
+.controls { top:96px; max-height:calc(100svh - 96px - 84px); overflow-y:auto; overscroll-behavior:contain; }
@media (max-width: 1100px) {
.object-info { top: 19%; max-width: 250px; }
h1 { font-size: 35px; }