graph: import + cost ride the chains home's TOP BAR (release polish 2.1)
Owner refinement on the chains home: the floating top-right chrome row sat ON TOP of the propositions table — covering content reads badly. The two survivors (Import notes — always, the entry-point law; the cost pill when any run exists) now ride the shared TopBar's right cluster, left of the search input, carved out of the drag band with lh-no-drag — consistent with the graph view, where they already live in the top band. ChainTableBody gains topBarExtra?: React.ReactNode (absent on the overlay — nothing changes there); ChainsHome's floating chrome row is deleted; the empty state keeps its own centered import button. Parked for the next design pass (owner, this round): (1) the pick flow reads messy — checkboxes show by default, so the pill's select mode is near-invisible and after Done the Clear/Delete bar + the practice pill coexist with two Clear buttons; the original vision was checkboxes appear ONLY when picking. (2) the composer's clearance band has no outline — the docked area needs a visual edge. 1415 tests (new pin: topBarExtra renders in the bar with the drag carve; overlay variant injects nothing); tsc, lint, build green.
This commit is contained in:
@@ -82,6 +82,7 @@ const BASE = {
|
||||
onGenerate: () => {},
|
||||
onDelete: () => {},
|
||||
onClose: () => {},
|
||||
topBarExtra: undefined as React.ReactNode,
|
||||
};
|
||||
|
||||
function render(props: Partial<typeof BASE> = {}) {
|
||||
@@ -96,6 +97,14 @@ describe("ChainTableBody — the HOME variant (graph rendering off, 2026-10-06)"
|
||||
assert.ok(html.includes("chain"), "the counts stay");
|
||||
assert.ok(html.includes("lh-drag"), "the window-drag band stays (same bar as every surface)");
|
||||
});
|
||||
|
||||
it("topBarExtra injects into the bar's right cluster — import + cost ride the TOP BAR (owner, 2026-10-06)", () => {
|
||||
const html = render({ onClose: undefined, topBarExtra: React.createElement("b", { "data-testid": "tbx" }, "X") });
|
||||
assert.ok(html.includes('data-testid="tbx"'), "the extra renders inside the bar");
|
||||
assert.ok(html.includes("lh-no-drag"), "the cluster carves out of the drag band");
|
||||
const overlay = render();
|
||||
assert.ok(!overlay.includes('data-testid="tbx"'), "absent by default — the overlay variant injects nothing");
|
||||
});
|
||||
});
|
||||
|
||||
describe("ChainTableBody — clusters (the outermost layer)", () => {
|
||||
|
||||
Reference in New Issue
Block a user