mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(ui): align the right rail to where the left rail settles
The right rail took its top from the left stack's bounding rect while the left stack's `top` was still transitioning (150 ms): the left layout sets its target and calls onAligned() synchronously, the right pass runs a frame later mid-transition, and nothing re-ran it when the transition ended. The rail then sat ~32 px off and jumped on the next unrelated relayout - under the pointer in CI's panel gates, which is why a header press missed on every run. settledLeftRailTop() reads the end value of a running `top` transition (falling back to dataset.safeTopPct, then the rect). A settled stack is read from its rect as before, which keeps Cyber's CSS top override (and cockpit's transition: none) exactly as they were. The Cyber test's pinned pattern follows the new helper. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f17bf7116d
commit
9dde7b4a62
3 files changed
+85
-2
No files matched your search
@@ -712,7 +712,7 @@ test('the Display selector, voice schema and final stylesheet expose Cyber', ()
|
||||
);
|
||||
assert.match(
|
||||
rightRail,
|
||||
/const leftStackTop = leftStack\?\.getBoundingClientRect\(\)\.top;[\s\S]*?const alignedTop = Number\.isFinite\(leftStackTop\)[\s\S]*?baseTop: alignedTop,/,
|
||||
/const leftStackTop = settledLeftRailTop\([\s\S]*?const alignedTop = Number\.isFinite\(leftStackTop\)[\s\S]*?baseTop: alignedTop,/,
|
||||
);
|
||||
assert.match(
|
||||
cyberStyles,
|
||||
|
||||
Reference in new issue
Block a user