mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
refactor(ui): extract adaptive panel rail layout
This commit is contained in:
1 parent
83df873879
commit
bf77ae61b8
18 files changed
+816
-521
No files matched your search
@@ -479,9 +479,10 @@ test('the full-width rail cannot inherit a height that overrides its floor', ()
|
||||
// over-constrained. It is safe only because the rail's layout pass switches
|
||||
// to a mobile mode at the SAME breakpoint and removes both the class and the
|
||||
// custom property. Pin that, or the exemption above is unearned.
|
||||
const gate = ui.indexOf("window.matchMedia('(max-width: 720px)')");
|
||||
const rail = fs.readFileSync(path.join(ROOT, 'src', 'ui', 'rightPanelRail.js'), 'utf8');
|
||||
const gate = rail.indexOf("windowRef.matchMedia('(max-width: 720px)')");
|
||||
assert.ok(gate > 0, 'the rail layout pass no longer keys off (max-width: 720px)');
|
||||
const mobileBranch = ui.slice(gate, ui.indexOf("layoutMode = 'mobile'", gate) + 40);
|
||||
const mobileBranch = rail.slice(gate, rail.indexOf("layoutMode = 'mobile'", gate) + 40);
|
||||
assert.match(mobileBranch, /stack\.classList\.remove\('layout-focus'\)/);
|
||||
assert.match(mobileBranch, /stack\.style\.removeProperty\('--right-stack-max-height'\)/);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user