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:
@@ -144,6 +144,17 @@ class Editor(unittest.TestCase):
|
||||
for marker in ('class="whatsnew"', 'role="progressbar"', "go('#firmware')"):
|
||||
self.assertIn(marker, self.page, marker)
|
||||
|
||||
def test_full_page_and_navigation_tiles_are_in_the_editor(self):
|
||||
import editor_sources
|
||||
layout = editor_sources.source('model/layout.ts')
|
||||
for marker in ('export const SIZES: Size[] = ["single", "wide", "full"];', 'export const pageTarget', 'versionAtLeast(firmware, "0.2.62") ? MAX_TILES'):
|
||||
self.assertIn(marker, layout, marker)
|
||||
drawer = editor_sources.component('TileInspector')
|
||||
for marker in ('["full", "Full page"]', 'Goes to page', 'retargetPageTile(tile, Number(v))'):
|
||||
self.assertIn(marker, drawer, marker)
|
||||
self.assertIn(':class="{ wide, full, bare, placeholder: placeholder || !live, chosen }"', editor_sources.component('TileCard'))
|
||||
self.assertIn('["screen", "Screen"]', editor_sources.component('Library'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user