feat(ui): join the open right rail tab to its panel

The open tab and its panel share one glass surface and one outline, like a folder tab: the panel card draws no border of its own, the rail's ::before draws the outline with a notch at the tab, the tab closes the shape with its own borders and two concave fillets round the inner corners. The strip publishes the open tab's extent and the panel's height on the rail; a short panel grows to reach its tab. Cyber joins square below its chamfer. Unselected tabs are plain labels.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Fable 5.1 committed 2026-10-27 17:26:59 +04:00
1 parent f2e23249eb
commit 65c1ae67f2
6 files changed
+345 -45

No files matched your search

+34
View File
@@ -322,6 +322,40 @@ test('a sync that changes nothing keeps the same tab elements in place', () => {
assert.equal(f.doc.activeElement, f.tabFor('cctv-panel'));
});
test('publishes the open tab and panel extent on the rail for the joined outline', () => {
const f = fixture();
const props = new Map();
f.rail.style = {
setProperty: (key, value) => props.set(key, value),
removeProperty: (key) => props.delete(key),
};
const tab = f.tabFor('cctv-panel');
tab.offsetTop = 86;
tab.offsetHeight = 56;
f.cctv.offsetHeight = 300;
f.strip.scrollTop = 0;
f.cctv.classList.remove('collapsed');
f.tabs.sync();
assert.deepEqual(
[...props],
[
['--rail-tab-top', '86px'],
['--rail-tab-bottom', '142px'],
['--rail-panel-height', '300px'],
],
);
f.strip.scrollTop = 20;
f.tabs.sync();
assert.equal(
props.get('--rail-tab-top'),
'66px',
'strip scroll is subtracted',
);
f.cctv.classList.add('collapsed');
f.tabs.sync();
assert.deepEqual([...props], [], 'no open panel, no join');
});
test('destroy removes the strip and stops listening', () => {
const f = fixture();
const tab = f.tabFor('cctv-panel');