Rebuild the editor as a Vue app: sidebar, pages side by side, tile settings in a drawer (0.2.74)

The page is now web/ (Vue 3 + Vite + TypeScript), built into screen_manager/app/static
with hashed file names; server.py serves index.html as built and /assets/. The Python
API, the data and the firmware are unchanged. Your screens sit in a sidebar, the pages
of a screen stand next to each other at the screen's own shape, the library sits on the
right, and a tile's settings slide in as a drawer while the mockup stays in view. New
screen, Firmware & USB, Alerts, Override YAML and Settings are pages of their own.
Fonts moved to web/src/assets; the tests read the source through tests/editor_sources.py.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Max Gramser
2026-09-18 07:48:45 +02:00
parent 9f5694b9eb
commit 510ebdf885
72 changed files with 5486 additions and 5409 deletions
+10 -7
View File
@@ -220,16 +220,19 @@ class SavingAndTheEditor(unittest.IsolatedAsyncioTestCase):
class Editor(unittest.TestCase):
SCRIPT = (ROOT / 'screen_manager/app/static/app.js').read_text()
def setUp(self):
import editor_sources
self.SCRIPT = editor_sources.SCRIPT
self.PICKER = editor_sources.component('ActionPicker')
def test_perform_action_is_a_tap_choice_with_home_assistants_list(self):
self.assertIn('taps.push(["action", "Perform action"]);', self.SCRIPT)
self.assertIn('api(`entity-actions?entity=${encodeURIComponent(entity)}`)', self.SCRIPT)
self.assertIn('if (tap === "action") body.append(actionPicker(tile));', self.SCRIPT)
self.assertIn('list.push(["action", "Perform action"]);', self.SCRIPT)
self.assertIn('getJson(`entity-actions?entity=${encodeURIComponent(entity)}`)', self.SCRIPT)
self.assertIn('<ActionPicker v-if="domain !== \'screen\' && tap === \'action\'" :tile="tile" />', self.SCRIPT)
# Fields follow Home Assistant's selectors; an empty field is left out of the data.
for marker in ('kind === "boolean"', 'kind === "number" || kind === "color_temp"', 'config.options', 'delete data[field.key]'):
self.assertIn(marker, self.SCRIPT)
self.assertIn('supportsFirmware(0, 2, 58)', self.SCRIPT)
for marker in ("kindOf(field) === 'boolean'", "kindOf(field) === 'number' || kindOf(field) === 'color_temp'", 'config.options', 'delete data[key]'):
self.assertIn(marker, self.PICKER, marker)
self.assertIn('supports(0, 2, 58)', self.PICKER)
if __name__ == '__main__':