Port the full-page and navigation tiles into the Vue editor (for 0.2.74)
Sizes single, wide and full in web/src/model/layout.ts (a full tile covers the six cells of a page and starts it; packing, fitting, arranging and page counting know it), the full card on the mockup, Size with Full page and its firmware hint in the tile drawer, controls defaulting to none on a full tile, navigation tiles (screen.page_1..8: Goes to page, size normal or double, icon and colour only, "Page n ›" on the card), the tile limit of 48 from firmware 0.2.62, the "Screen" domain label. Vitest and the Python source tests cover it. The add-on side of this round lives on the peer branch fullpage (4be6153). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -118,3 +118,16 @@ describe("CommandPalette", () => {
|
||||
expect(state.palette).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("full-page and navigation tiles on the mockup", () => {
|
||||
it("draws a full tile as one big card and a navigation tile with its page", () => {
|
||||
state.liveStates["light.a"] = { state: "on", word: "On", a: {} };
|
||||
const full = placed({ entity: "light.a", name: "", slot: 0, options: { size: "full" } });
|
||||
expect(full.classes()).toContain("full");
|
||||
expect(full.classes()).not.toContain("wide");
|
||||
expect(full.find(".ic").classes()).toContain("lit");
|
||||
expect(full.find(".tog").exists()).toBe(false);
|
||||
const nav = placed({ entity: "screen.page_3", name: "Go to page 3", slot: 6 });
|
||||
expect(nav.find(".goto").text()).toBe("Page 3 ›");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user