fix(ui): harden navigation and queue interactions

This commit is contained in:
NimBold
2026-07-28 22:11:38 +03:30
parent 7e8f1c7d7b
commit 62f8c83c57
9 changed files with 299 additions and 68 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it } from 'vitest';
import { clampFloatingPosition } from './floatingPosition';
describe('floating surface positioning', () => {
it('keeps a variable-height menu inside the viewport', () => {
expect(clampFloatingPosition(350, 580, 192, 220, 400, 640)).toEqual({
x: 200,
y: 412,
});
});
it('keeps oversized surfaces anchored to the safe gutter', () => {
expect(clampFloatingPosition(-20, -10, 700, 900, 400, 640)).toEqual({
x: 8,
y: 8,
});
});
});