diff --git a/alfred/apps.py b/alfred/apps.py new file mode 100644 index 000000000..f40fdf418 --- /dev/null +++ b/alfred/apps.py @@ -0,0 +1,47 @@ +import os + +import alfred + + +@alfred.command('apps.update', help='update the apps in the repo to the latest version') +@alfred.option('--app', help='the path of the app to update') +def apps_update(app: str = None): + import writer + from writer.core import ( + wf_project_migrate_obsolete_ui_json, + wf_project_read_files, + wf_project_write_files, + ) + + if app is not None: + apps = [app] + else: + apps = [ + 'apps/ai-starter', + 'apps/default', + 'apps/hello', + 'apps/pdg-tutorial', + 'apps/quickstart', + 'apps/text-demo', + 'tests/backend/testapp', + 'tests/backend/testbasicauth', + 'tests/backend/testmultiapp/app1', + 'tests/backend/testmultiapp/app2', + ] + + for app in apps: + abs_path = os.path.realpath(app) + if not os.path.isdir(abs_path): + continue + + if os.path.isfile(os.path.join(abs_path, "ui.json")): + print(f'{app} : migrate ui.json') + wf_project_migrate_obsolete_ui_json(abs_path) + + metadata, components = wf_project_read_files(abs_path) + if metadata.get('writer_version') == writer.VERSION: + print("The app is already up to date") + else: + metadata['writer_version'] = writer.VERSION + wf_project_write_files(abs_path, metadata, components) + print(f"{app} : app is up to date") diff --git a/apps/ai-starter/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/apps/ai-starter/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..47c6af260 --- /dev/null +++ b/apps/ai-starter/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,3 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "ejpasds0o8qyjs1n", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} diff --git a/apps/ai-starter/.wf/components-root.jsonl b/apps/ai-starter/.wf/components-root.jsonl new file mode 100644 index 000000000..0325da4ee --- /dev/null +++ b/apps/ai-starter/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "AI Starter"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/apps/ai-starter/.wf/metadata.json b/apps/ai-starter/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/ai-starter/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/ai-starter/ui.json b/apps/ai-starter/ui.json deleted file mode 100644 index f127cddc9..000000000 --- a/apps/ai-starter/ui.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.0rc3" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "AI Starter" - }, - "isCodeManaged": false, - "position": 0, - "handlers": {}, - "visible": true - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root", - "handlers": {}, - "visible": true - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "@{my_app.title}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - }, - "ejpasds0o8qyjs1n": { - "id": "ejpasds0o8qyjs1n", - "type": "section", - "content": { - "title": "Section Title" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - } - } -} \ No newline at end of file diff --git a/apps/default/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/apps/default/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..6997f566b --- /dev/null +++ b/apps/default/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,11 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "28d3885b-0fb8-4d41-97c6-978540015431", "type": "section", "content": {"title": "", "containerShadow": "0px 4px 11px -12px #000000"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "9556c0e3-8584-4ac9-903f-908a775a33ec", "type": "button", "content": {"text": " Increment", "icon": "arrow_upward"}, "isCodeManaged": false, "position": 1, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "increment"}, "visible": true} +{"id": "51d1554e-1b88-461c-9353-1419cba0053a", "type": "button", "content": {"text": "Decrement", "icon": "arrow_downward"}, "isCodeManaged": false, "position": 0, "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "handlers": {"click": "decrement"}, "visible": true} +{"id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", "type": "horizontalstack", "content": {"contentHAlign": "center"}, "isCodeManaged": false, "position": 0, "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "handlers": {}, "visible": true} +{"id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", "type": "metric", "content": {"metricValue": "@{counter}", "note": "@{message}", "name": "Counter"}, "isCodeManaged": false, "position": 0, "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "handlers": {}, "visible": true} +{"id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", "handlers": {}, "visible": true} +{"id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "type": "column", "content": {"title": "", "width": "1", "contentHAlign": "center", "contentVAlign": "center"}, "isCodeManaged": false, "position": 2, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true} +{"id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true} +{"id": "d4a71819-7444-4083-a1c7-7995452a7abf", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "handlers": {}, "visible": true} diff --git a/apps/default/.wf/components-root.jsonl b/apps/default/.wf/components-root.jsonl new file mode 100644 index 000000000..0ae8fa025 --- /dev/null +++ b/apps/default/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/apps/default/.wf/metadata.json b/apps/default/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/default/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/default/ui.json b/apps/default/ui.json deleted file mode 100644 index 471d19b6d..000000000 --- a/apps/default/ui.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.2rc3" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "isCodeManaged": false, - "position": 0, - "handlers": {} - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root", - "handlers": {} - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "@{my_app.title}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {} - }, - "28d3885b-0fb8-4d41-97c6-978540015431": { - "id": "28d3885b-0fb8-4d41-97c6-978540015431", - "type": "section", - "content": { - "title": "", - "containerShadow": "0px 4px 11px -12px #000000" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {} - }, - "9556c0e3-8584-4ac9-903f-908a775a33ec": { - "id": "9556c0e3-8584-4ac9-903f-908a775a33ec", - "type": "button", - "content": { - "text": " Increment", - "icon": "arrow_upward" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "handlers": { - "click": "increment" - } - }, - "51d1554e-1b88-461c-9353-1419cba0053a": { - "id": "51d1554e-1b88-461c-9353-1419cba0053a", - "type": "button", - "content": { - "text": "Decrement", - "icon": "arrow_downward" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "handlers": { - "click": "decrement" - } - }, - "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117": { - "id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "type": "horizontalstack", - "content": { - "contentHAlign": "center" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "handlers": {} - }, - "172a14df-f73a-44fa-8fb1-e8648e7d32d2": { - "id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", - "type": "metric", - "content": { - "metricValue": "@{counter}", - "note": "@{message}", - "name": "Counter" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "handlers": {} - }, - "d4a5e62c-c6fe-49c4-80d4-33862af8727d": { - "id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", - "handlers": {} - }, - "f3777e75-3659-4d44-8ef7-aeec0d06855b": { - "id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "type": "column", - "content": { - "title": "", - "width": "1", - "contentHAlign": "center", - "contentVAlign": "center" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "handlers": {} - }, - "c2519671-9ce7-44e7-ba4e-b0efda9cb20e": { - "id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "handlers": {} - }, - "d4a71819-7444-4083-a1c7-7995452a7abf": { - "id": "d4a71819-7444-4083-a1c7-7995452a7abf", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "handlers": {} - } - } -} \ No newline at end of file diff --git a/apps/hello/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl b/apps/hello/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl new file mode 100644 index 000000000..fd702175f --- /dev/null +++ b/apps/hello/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl @@ -0,0 +1,77 @@ +{"id": "bb4d0e86-619e-4367-a180-be28ab6059f4", "type": "page", "content": {"pageMode": "", "key": "main"}, "isCodeManaged": false, "position": 0, "parentId": "root"} +{"id": "bb4d0e86-619e-4367-a180-be28ab6059f4", "type": "page", "content": {"pageMode": "", "key": "main"}, "isCodeManaged": false, "position": 0, "parentId": "root"} +{"id": "84378aea-b64c-49a3-9539-f854532279ee", "type": "header", "content": {"text": "HACKER PIGEONS", "emptinessColor": "#000000", "accentColor": "#ffffff"}, "isCodeManaged": false, "position": 0, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5", "type": "columns", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5", "type": "column", "content": {"width": "1", "isCollapsible": "", "title": "", "isSticky": "yes"}, "isCodeManaged": false, "position": 0, "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5"} +{"id": "0569937e-c72c-4fb9-820e-2ae56e17bcc0", "type": "column", "content": {"width": "1.61"}, "isCodeManaged": false, "position": 1, "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5"} +{"id": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "type": "section", "content": {"title": ""}, "isCodeManaged": false, "position": 0, "parentId": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5"} +{"id": "7fdd1d02-53de-4466-bd3c-4822cbc2694f", "type": "image", "content": {"src": "static/pigeon1.jpg?8", "caption": ""}, "isCodeManaged": false, "position": 0, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "ee919cd6-8153-4f34-8c6a-bfc1153df360", "type": "tabs", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "0569937e-c72c-4fb9-820e-2ae56e17bcc0"} +{"id": "c6392876-7cfd-4680-8725-b04f43ff294f", "type": "tab", "content": {"name": "Data and Charts"}, "isCodeManaged": false, "position": 0, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "da00a61f-0ee2-434e-acd6-228d32eae5c6", "type": "tab", "content": {"name": "Repeater"}, "isCodeManaged": false, "position": 2, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "d0298b1c-7c64-4b58-a018-db97dd49675b", "type": "separator", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "f1d6bc8e-a780-4ae5-8b7c-082fe8a6867d", "type": "dataframe", "content": {"dataframe": "@{main_df}", "showIndex": "", "enableSearch": "yes", "enableDownload": "yes"}, "isCodeManaged": false, "position": 4, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "fbad9feb-5c88-4425-bb17-0d138286a875", "type": "sidebar", "content": {"startCollapsed": "yes"}, "isCodeManaged": false, "position": -2, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "7e625201-20c2-4b05-951c-d825de28b216", "type": "section", "content": {"title": "Filter data"}, "isCodeManaged": false, "position": 0, "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875"} +{"id": "385247e5-5c89-4352-a598-b8da81146a5a", "type": "sliderinput", "content": {"label": "Minimum weight", "minValue": "300", "maxValue": "600", "stepSize": "1"}, "isCodeManaged": false, "position": 1, "parentId": "7e625201-20c2-4b05-951c-d825de28b216", "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "filter.min_weight"}} +{"id": "10c156df-7464-4889-8b69-1b54cb1ee80a", "type": "sliderinput", "content": {"label": "Minimum length", "minValue": "25", "maxValue": "35", "stepSize": "1"}, "isCodeManaged": false, "position": 0, "parentId": "7e625201-20c2-4b05-951c-d825de28b216", "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "filter.min_length"}} +{"id": "70d82458-a08f-4005-8f96-dc8d3ba92fad", "type": "section", "content": {"title": "About this app"}, "isCodeManaged": false, "position": 1, "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875"} +{"id": "12e11005-3b5e-4bd8-9a8c-fc7b8cb757d0", "type": "text", "content": {"text": "This app is meant to serve as a lighthearted introduction to the framework. It's not a comprehensive demonstration of its capabilities."}, "isCodeManaged": false, "position": 0, "parentId": "70d82458-a08f-4005-8f96-dc8d3ba92fad"} +{"id": "7b710d37-1c68-4d06-a65a-e6596ccc826a", "type": "text", "content": {"text": "In a city plagued by technology gone awry, a group of unlikely heroes emerges. Introducing the Hacker Pigeons, a team of intelligent and resourceful pigeons on a mission to save their home from destruction. Follow their journey as they battle against malicious hackers, and prove that even the smallest creatures can make a big difference.", "alignment": ""}, "isCodeManaged": false, "position": 4, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "b9cb10e5-1ead-448b-afcc-909e23afb72a", "type": "columns", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "31c1b0d5-bfb6-4304-82bd-1687d492f0a2", "type": "heading", "content": {"text": "Pigeon Power: Birds Tackle Data Apps", "alignment": ""}, "isCodeManaged": false, "position": 1, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "3cc9c5e9-6c77-401d-ab82-7805d9df760c", "type": "tab", "content": {"name": "Layout"}, "isCodeManaged": false, "position": 1, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "3cc9c5e9-6c77-401d-ab82-7805d9df760c"} +{"id": "25dda22d-1b18-4584-aa99-aaae9f3b8edf", "type": "column", "content": {"width": "1", "isCollapsible": "yes", "title": "Markdown", "contentVAlign": ""}, "isCodeManaged": false, "position": 0, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", "type": "column", "content": {"title": "HTML Element", "width": "1", "isCollapsible": "", "startCollapsed": "", "contentHAlign": "center"}, "isCodeManaged": false, "position": 2, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "d1f43b6f-5b0f-4c8f-95bf-a92dd7ed723b", "type": "text", "content": {"text": "\n### Role Distribution\n\nThe Hacker Pigeons _dataframe_ consists of five distinct roles:\n\n1. Leader\n2. Developer\n3. Data Expert\n4. Designer\n5. Security Expert\n\nThe **role distribution** among the hacker pigeons can be analysed to understand the composition of the secret society and the proportions of various roles.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 2, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "71766c0c-e1e5-4675-9dd0-3aa2627773a0", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"max-width\": \"90%\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(-3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}"}, "isCodeManaged": false, "position": 0, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "c73602a6-453d-4ccf-b8e3-b1774ab4ff17", "type": "text", "content": {"text": "Use the HTML Element component when you need additional control."}, "isCodeManaged": false, "position": 1, "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0"} +{"id": "573f095f-94a7-43e4-a94e-b2f69439a164", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "feedc43f-a7cf-499b-962e-8170f1032b69", "type": "text", "content": {"text": "You can use Markdown, as shown below."}, "isCodeManaged": false, "position": 0, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "1ee57415-557d-4529-be99-36f4d91fdf69", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"max-width\": \"90%\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}"}, "isCodeManaged": false, "position": 1, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "5da5e007-d60a-4313-9d21-885deae7b37d", "type": "text", "content": {"text": "You can put other Writer Framework components inside HTML Elements."}, "isCodeManaged": false, "position": 1, "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d"} +{"id": "85120b55-69c6-4b50-853a-bbbf73ff8121", "type": "tab", "content": {"name": "Timer"}, "isCodeManaged": false, "position": 4, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "db4c66d6-1eb7-44d3-a2d4-65d0b3e5cf12", "type": "dataframe", "content": {"dataframe": "@{random_df}", "fontStyle": "monospace", "enableSearch": "", "enableDownload": ""}, "isCodeManaged": false, "position": 1, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", "type": "horizontalstack", "content": {"contentHAlign": "start"}, "isCodeManaged": false, "position": 0, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "50a05488-d6fe-47bf-b681-36870d04f5d7", "type": "timer", "content": {"intervalMs": "1000", "isActive": ""}, "isCodeManaged": false, "position": 0, "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", "handlers": {"wf-tick": "handle_timer_tick"}} +{"id": "e296866a-75d2-4677-b55d-3c1456113b89", "type": "text", "content": {"text": "Refreshing automatically using a timer."}, "isCodeManaged": false, "position": 1, "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d"} +{"id": "fdf38e46-c01e-4a93-94d5-e187f9e4c823", "type": "text", "content": {"text": "_pgcf_ stands for \"Pigeon Coefficient\" and is a meaningless, randomly-generated value.", "useMarkdown": "yes", "primaryTextColor": "#8a8a8a"}, "isCodeManaged": false, "position": 2, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "c921816d-6d45-4ce3-9c18-2c78ff850e0e", "type": "html", "content": {"element": "img", "styles": "{\n \"filter\": \"hue-rotate(calc(80deg + @{hue_rotation}deg))\"\n}", "attrs": "{ \"src\": \"static/pigeon1.jpg?3\"}"}, "isCodeManaged": false, "position": 0, "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0"} +{"id": "c684f61e-0c79-4cb1-af9f-46c9cab5dfea", "type": "html", "content": {"element": "img", "styles": "{\n \"filter\": \"hue-rotate(calc(140deg + @{hue_rotation}deg))\"\n}", "attrs": "{ \"src\": \"static/pigeon1.jpg?3\"}"}, "isCodeManaged": false, "position": 0, "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d"} +{"id": "ee82e035-cfb2-4d00-95ce-ccbb9eb2dbb9", "type": "sliderinput", "content": {"label": "Hue rotation", "minValue": "0", "maxValue": "360", "stepSize": "1"}, "isCodeManaged": false, "position": 2, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", "binding": {"eventType": "wf-number-change", "stateRef": "hue_rotation"}} +{"id": "c9bb4720-d07a-4fd8-bc53-5bda8dc64046", "type": "text", "content": {"text": "As shown above, you can use _HTML Element_ components together with state references.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 3, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "6a490318-239e-4fe9-a56b-f0f33d628c87", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 1, "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a"} +{"id": "de70a15a-2ff6-42d2-ab12-c7fc9c3ed4e1", "type": "heading", "content": {"text": "Highlighted Members", "headingType": "h2", "alignment": "center"}, "isCodeManaged": false, "position": 0, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "2f4969e2-e248-43ed-9e63-222fc35250e2", "type": "columns", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "f46cd60d-f01e-4390-a161-4353006b72a1", "type": "repeater", "content": {"repeaterObject": "@{highlighted_members}", "keyVariable": "itemId", "valueVariable": "item"}, "isCodeManaged": false, "position": 0, "parentId": "2f4969e2-e248-43ed-9e63-222fc35250e2"} +{"id": "0dd29423-3867-478a-997e-eeaafb6b811e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "f46cd60d-f01e-4390-a161-4353006b72a1"} +{"id": "2d326b15-da90-496e-86e8-7fdd4bcbe822", "type": "section", "content": {"title": "@{item.name} \u2b50\ufe0f", "containerBackgroundColor": "#F5F5F9"}, "isCodeManaged": false, "position": 0, "parentId": "0dd29423-3867-478a-997e-eeaafb6b811e"} +{"id": "7ea0d29a-5dca-4b6c-a067-322ccaee5032", "type": "text", "content": {"text": "You can use a _Repeater_ component to repeat components, based on a dictionary.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 4, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "cd611ce2-f594-4b55-9932-d48e657b2e31", "type": "text", "content": {"text": "**Role:** @{item.role}\n", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 1, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "9d6ee245-b8f7-4391-9934-89598b7fa9f8", "type": "separator", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "01c33c6e-3788-4b5d-b7aa-2addaa7b503f", "type": "text", "content": {"text": "The following Hacker Pigeons have made an impressive contribution this month.\nLet's come together to recognise and celebrate this success.", "alignment": "center"}, "isCodeManaged": false, "position": 1, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "e0e2391e-7bab-4c68-ad92-841942cb12fb", "type": "text", "content": {"text": "The ability @{item.name} demonstrated in @{item.specialty} has earned them this recognition.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 2, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "4ef4655b-45ca-495c-9f8d-fa1d7ae3565e", "type": "separator", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "f67c98aa-3a7b-4f40-ac1f-0dd4aa06e22d", "type": "plotlygraph", "content": {"spec": "@{scatter_chart}"}, "isCodeManaged": false, "position": 0, "parentId": "6a490318-239e-4fe9-a56b-f0f33d628c87", "handlers": {}, "visible": true} +{"id": "6d895924-e808-44aa-a119-f4e2d7f394f3", "type": "column", "content": {"width": "1", "contentHAlign": "", "contentVAlign": ""}, "isCodeManaged": false, "position": 0, "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a"} +{"id": "70bd9ea8-baa9-4e1d-bce5-deee6a3c5440", "type": "plotlygraph", "content": {"spec": "@{role_chart}"}, "isCodeManaged": false, "position": 0, "parentId": "6d895924-e808-44aa-a119-f4e2d7f394f3", "handlers": {}} +{"id": "8c8dd54f-af2c-4d6d-9603-dfea11cf326b", "type": "metric", "content": {"metricValue": "@{metrics.average_weight}gr", "name": "Average weight", "note": "@{metrics.average_weight_note}", "description": ""}, "isCodeManaged": false, "position": 0, "parentId": "feb9ca67-6670-483d-a895-22b031426a13", "handlers": {}, "visible": true} +{"id": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", "handlers": {}, "visible": true} +{"id": "feb9ca67-6670-483d-a895-22b031426a13", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "3b325899-e560-40ea-ba54-9c55967af1e3", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 1, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 2, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 3, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "6a81f847-4d1d-4110-9cc1-12c716150e66", "type": "metric", "content": {"metricValue": "@{metrics.average_length}cm", "name": "Average length", "note": "@{metrics.average_length_note}", "description": ""}, "isCodeManaged": false, "position": 0, "parentId": "3b325899-e560-40ea-ba54-9c55967af1e3", "handlers": {}, "visible": true} +{"id": "8e54e9d2-a7c8-4f74-897f-fa5791cd82da", "type": "metric", "content": {"metricValue": "@{metrics.average_bmi}", "name": "Average BMI", "note": "@{metrics.average_bmi_note}", "description": ""}, "isCodeManaged": false, "position": 0, "parentId": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", "handlers": {}, "visible": true} +{"id": "07f50628-4679-48a8-9a5d-07dcaf171afb", "type": "metric", "content": {"metricValue": "@{metrics.diversity}", "name": "Diversity Index", "description": "", "note": "@{metrics.diversity_note}"}, "isCodeManaged": false, "position": 0, "parentId": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", "handlers": {}, "visible": true} +{"id": "4cca0893-5ad7-4152-b805-5c87babc4dee", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", "handlers": {}, "visible": true} +{"id": "03f422ce-bc36-4000-8eb1-da1cc00948c9", "type": "button", "content": {"text": "Read the story", "icon": "library_books"}, "isCodeManaged": false, "position": 5, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "$goToPage_story"}, "visible": true} +{"id": "e1ax8ctt8lrao0e4", "type": "tab", "content": {"name": "Pagination"}, "isCodeManaged": false, "position": 3, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360", "handlers": {}, "visible": true} +{"id": "j3jkho6tb97u0onr", "type": "repeater", "content": {"keyVariable": "itemId", "valueVariable": "item", "repeaterObject": "@{paginated_members}"}, "isCodeManaged": false, "position": 0, "parentId": "e1ax8ctt8lrao0e4", "handlers": {}, "visible": true} +{"id": "4wzaubf275w17gac", "type": "section", "content": {"title": "@{item.name} \u2b50\ufe0f", "containerBackgroundColor": "#F5F5F9"}, "isCodeManaged": false, "position": 0, "parentId": "j3jkho6tb97u0onr", "handlers": {}, "visible": true} +{"id": "19binb4yi70gesho", "type": "text", "content": {"text": "**Role:** @{item.role}\n", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 0, "parentId": "4wzaubf275w17gac"} +{"id": "zfp1koasiuleygmz", "type": "pagination", "content": {"page": "@{paginated_members_page}", "pageSize": "@{paginated_members_page_size}", "totalItems": "@{paginated_members_total_items}", "pageSizeOptions": "1,2,5", "pageSizeShowAll": "no", "jumpTo": "no", "urlParam": "no"}, "isCodeManaged": false, "position": 1, "parentId": "e1ax8ctt8lrao0e4", "handlers": {"wf-change-page": "handle_paginated_members_page_change", "wf-change-page-size": "handle_paginated_members_page_size_change"}, "visible": true} +{"id": "b27lw9ex8ig3x17p", "type": "tags", "content": {"tags": "{\n \"fiction\": \"fiction\",\n \"inspirational\": \"inspirational\",\n \"ai-generated\": \"ai-generated\"\n}", "seed": ""}, "isCodeManaged": false, "position": 2, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "visible": true} +{"id": "804e15bf-11a7-463d-8082-f46ea3acac1b", "type": "separator", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} diff --git a/apps/hello/.wf/components-page-1-23bc1387-26ed-4ff2-8565-b027c2960c3c.jsonl b/apps/hello/.wf/components-page-1-23bc1387-26ed-4ff2-8565-b027c2960c3c.jsonl new file mode 100644 index 000000000..bdebb8638 --- /dev/null +++ b/apps/hello/.wf/components-page-1-23bc1387-26ed-4ff2-8565-b027c2960c3c.jsonl @@ -0,0 +1,16 @@ +{"id": "23bc1387-26ed-4ff2-8565-b027c2960c3c", "type": "page", "content": {"key": "story", "buttonColor": "#242424", "buttonTextColor": "#ffffff", "containerBackgroundColor": "#4F4F4F", "emptinessColor": "#333333", "primaryTextColor": "#ffffff", "separatorColor": "rgba(0, 0, 0, 0.2)"}, "isCodeManaged": false, "position": 1, "parentId": "root", "handlers": {}, "visible": true} +{"id": "23bc1387-26ed-4ff2-8565-b027c2960c3c", "type": "page", "content": {"key": "story", "buttonColor": "#242424", "buttonTextColor": "#ffffff", "containerBackgroundColor": "#4F4F4F", "emptinessColor": "#333333", "primaryTextColor": "#ffffff", "separatorColor": "rgba(0, 0, 0, 0.2)"}, "isCodeManaged": false, "position": 1, "parentId": "root", "handlers": {}, "visible": true} +{"id": "1d195388-35a3-43e1-b825-1d263b100a28", "type": "header", "content": {"text": "HACKER PIGEONS"}, "isCodeManaged": false, "position": 0, "parentId": "23bc1387-26ed-4ff2-8565-b027c2960c3c", "handlers": {}, "visible": true} +{"id": "771dc336-69b2-400e-9ea3-e881e2332c9d", "type": "section", "content": {"title": "The story"}, "isCodeManaged": false, "position": 0, "parentId": "dfaae7f9-db20-4f70-a376-919bdc7b6010", "handlers": {}, "visible": true} +{"id": "9c77aee4-e2a0-4e8b-9c2b-377f939bb51e", "type": "text", "content": {"text": "@{story.text}"}, "isCodeManaged": false, "position": 1, "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d"} +{"id": "90fbfa9d-3178-4fc2-b445-c31e1acfa6a7", "type": "button", "content": {"text": "Go back to the main page", "icon": "arrow_back"}, "isCodeManaged": false, "position": 0, "parentId": "9bb8a686-7013-4af7-a89e-d89c7754120d", "handlers": {"click": "$goToPage_main"}, "visible": true} +{"id": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", "type": "columns", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "23bc1387-26ed-4ff2-8565-b027c2960c3c", "handlers": {}, "visible": true} +{"id": "7402263c-cb8b-412d-b170-e6dc6ffcb706", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 1, "parentId": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", "handlers": {}, "visible": true} +{"id": "dfaae7f9-db20-4f70-a376-919bdc7b6010", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", "handlers": {}, "visible": true} +{"id": "5bc38721-8b48-43d5-a454-ee5ebe713a4c", "type": "section", "content": {"title": ""}, "isCodeManaged": false, "position": 0, "parentId": "7402263c-cb8b-412d-b170-e6dc6ffcb706"} +{"id": "42ab5c3d-21fc-4e88-befd-33e52fd15e8b", "type": "image", "content": {"src": "static/pigeon1.jpg", "caption": ""}, "isCodeManaged": false, "position": 0, "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c"} +{"id": "9bb8a686-7013-4af7-a89e-d89c7754120d", "type": "horizontalstack", "content": {"contentHAlign": "start"}, "isCodeManaged": false, "position": 2, "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d", "handlers": {}, "visible": true} +{"id": "2df56a4b-b6e7-423d-a7a1-5d23c77f65fa", "type": "heading", "content": {"text": "Each page can have its own style", "alignment": ""}, "isCodeManaged": false, "position": 1, "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c"} +{"id": "1272b52c-d97c-4c20-ba6b-19abe1ec0abc", "type": "separator", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d", "handlers": {}, "visible": true} +{"id": "77cb256b-ef12-4a55-a051-500497f41302", "type": "text", "content": {"text": "It's easy to switch between pages and it can be done from the frontend (via Writer Framework Builder) and from the backend (via Python)."}, "isCodeManaged": false, "position": 2, "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c", "handlers": {}, "visible": true} +{"id": "ed010441-0cac-4aa5-9e6f-97228e0c3536", "type": "button", "content": {"text": "Download this story", "icon": "download"}, "isCodeManaged": false, "position": 1, "parentId": "9bb8a686-7013-4af7-a89e-d89c7754120d", "handlers": {"click": "handle_story_download"}, "visible": true} diff --git a/apps/hello/.wf/components-root.jsonl b/apps/hello/.wf/components-root.jsonl new file mode 100644 index 000000000..746b76e3a --- /dev/null +++ b/apps/hello/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "Hello", "emptinessColor": "#ffffff"}, "isCodeManaged": false, "position": 0} \ No newline at end of file diff --git a/apps/hello/.wf/metadata.json b/apps/hello/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/hello/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/hello/ui.json b/apps/hello/ui.json deleted file mode 100644 index 6db57e02f..000000000 --- a/apps/hello/ui.json +++ /dev/null @@ -1,1185 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.2rc3" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "Hello", - "emptinessColor": "#ffffff" - }, - "isCodeManaged": false, - "position": 0 - }, - "bb4d0e86-619e-4367-a180-be28ab6059f4": { - "id": "bb4d0e86-619e-4367-a180-be28ab6059f4", - "type": "page", - "content": { - "pageMode": "", - "key": "main" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root" - }, - "84378aea-b64c-49a3-9539-f854532279ee": { - "id": "84378aea-b64c-49a3-9539-f854532279ee", - "type": "header", - "content": { - "text": "HACKER PIGEONS", - "emptinessColor": "#000000", - "accentColor": "#ffffff" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4" - }, - "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5": { - "id": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4" - }, - "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5": { - "id": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5", - "type": "column", - "content": { - "width": "1", - "isCollapsible": "", - "title": "", - "isSticky": "yes" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5" - }, - "0569937e-c72c-4fb9-820e-2ae56e17bcc0": { - "id": "0569937e-c72c-4fb9-820e-2ae56e17bcc0", - "type": "column", - "content": { - "width": "1.61" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5" - }, - "9c30af6d-4ee5-4782-9169-0f361d67fa76": { - "id": "9c30af6d-4ee5-4782-9169-0f361d67fa76", - "type": "section", - "content": { - "title": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5" - }, - "7fdd1d02-53de-4466-bd3c-4822cbc2694f": { - "id": "7fdd1d02-53de-4466-bd3c-4822cbc2694f", - "type": "image", - "content": { - "src": "static/pigeon1.jpg?8", - "caption": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "ee919cd6-8153-4f34-8c6a-bfc1153df360": { - "id": "ee919cd6-8153-4f34-8c6a-bfc1153df360", - "type": "tabs", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "0569937e-c72c-4fb9-820e-2ae56e17bcc0" - }, - "c6392876-7cfd-4680-8725-b04f43ff294f": { - "id": "c6392876-7cfd-4680-8725-b04f43ff294f", - "type": "tab", - "content": { - "name": "Data and Charts" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360" - }, - "da00a61f-0ee2-434e-acd6-228d32eae5c6": { - "id": "da00a61f-0ee2-434e-acd6-228d32eae5c6", - "type": "tab", - "content": { - "name": "Repeater" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360" - }, - "d0298b1c-7c64-4b58-a018-db97dd49675b": { - "id": "d0298b1c-7c64-4b58-a018-db97dd49675b", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 3, - "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f" - }, - "f1d6bc8e-a780-4ae5-8b7c-082fe8a6867d": { - "id": "f1d6bc8e-a780-4ae5-8b7c-082fe8a6867d", - "type": "dataframe", - "content": { - "dataframe": "@{main_df}", - "showIndex": "", - "enableSearch": "yes", - "enableDownload": "yes" - }, - "isCodeManaged": false, - "position": 4, - "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f" - }, - "fbad9feb-5c88-4425-bb17-0d138286a875": { - "id": "fbad9feb-5c88-4425-bb17-0d138286a875", - "type": "sidebar", - "content": { - "startCollapsed": "yes" - }, - "isCodeManaged": false, - "position": -2, - "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4" - }, - "7e625201-20c2-4b05-951c-d825de28b216": { - "id": "7e625201-20c2-4b05-951c-d825de28b216", - "type": "section", - "content": { - "title": "Filter data" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875" - }, - "385247e5-5c89-4352-a598-b8da81146a5a": { - "id": "385247e5-5c89-4352-a598-b8da81146a5a", - "type": "sliderinput", - "content": { - "label": "Minimum weight", - "minValue": "300", - "maxValue": "600", - "stepSize": "1" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "7e625201-20c2-4b05-951c-d825de28b216", - "handlers": { - "wf-number-change": "update" - }, - "binding": { - "eventType": "wf-number-change", - "stateRef": "filter.min_weight" - } - }, - "10c156df-7464-4889-8b69-1b54cb1ee80a": { - "id": "10c156df-7464-4889-8b69-1b54cb1ee80a", - "type": "sliderinput", - "content": { - "label": "Minimum length", - "minValue": "25", - "maxValue": "35", - "stepSize": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "7e625201-20c2-4b05-951c-d825de28b216", - "handlers": { - "wf-number-change": "update" - }, - "binding": { - "eventType": "wf-number-change", - "stateRef": "filter.min_length" - } - }, - "70d82458-a08f-4005-8f96-dc8d3ba92fad": { - "id": "70d82458-a08f-4005-8f96-dc8d3ba92fad", - "type": "section", - "content": { - "title": "About this app" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875" - }, - "12e11005-3b5e-4bd8-9a8c-fc7b8cb757d0": { - "id": "12e11005-3b5e-4bd8-9a8c-fc7b8cb757d0", - "type": "text", - "content": { - "text": "This app is meant to serve as a lighthearted introduction to the framework. It's not a comprehensive demonstration of its capabilities." - }, - "isCodeManaged": false, - "position": 0, - "parentId": "70d82458-a08f-4005-8f96-dc8d3ba92fad" - }, - "7b710d37-1c68-4d06-a65a-e6596ccc826a": { - "id": "7b710d37-1c68-4d06-a65a-e6596ccc826a", - "type": "text", - "content": { - "text": "In a city plagued by technology gone awry, a group of unlikely heroes emerges. Introducing the Hacker Pigeons, a team of intelligent and resourceful pigeons on a mission to save their home from destruction. Follow their journey as they battle against malicious hackers, and prove that even the smallest creatures can make a big difference.", - "alignment": "" - }, - "isCodeManaged": false, - "position": 4, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76" - }, - "b9cb10e5-1ead-448b-afcc-909e23afb72a": { - "id": "b9cb10e5-1ead-448b-afcc-909e23afb72a", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 2, - "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f" - }, - "31c1b0d5-bfb6-4304-82bd-1687d492f0a2": { - "id": "31c1b0d5-bfb6-4304-82bd-1687d492f0a2", - "type": "heading", - "content": { - "text": "Pigeon Power: Birds Tackle Data Apps", - "alignment": "" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76" - }, - "3cc9c5e9-6c77-401d-ab82-7805d9df760c": { - "id": "3cc9c5e9-6c77-401d-ab82-7805d9df760c", - "type": "tab", - "content": { - "name": "Layout" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360" - }, - "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff": { - "id": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "3cc9c5e9-6c77-401d-ab82-7805d9df760c" - }, - "25dda22d-1b18-4584-aa99-aaae9f3b8edf": { - "id": "25dda22d-1b18-4584-aa99-aaae9f3b8edf", - "type": "column", - "content": { - "width": "1", - "isCollapsible": "yes", - "title": "Markdown", - "contentVAlign": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff" - }, - "b1ee642e-f2e7-453b-a6ef-3d96eea37140": { - "id": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", - "type": "column", - "content": { - "title": "HTML Element", - "width": "1", - "isCollapsible": "", - "startCollapsed": "", - "contentHAlign": "center" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff" - }, - "d1f43b6f-5b0f-4c8f-95bf-a92dd7ed723b": { - "id": "d1f43b6f-5b0f-4c8f-95bf-a92dd7ed723b", - "type": "text", - "content": { - "text": "\n### Role Distribution\n\nThe Hacker Pigeons _dataframe_ consists of five distinct roles:\n\n1. Leader\n2. Developer\n3. Data Expert\n4. Designer\n5. Security Expert\n\nThe **role distribution** among the hacker pigeons can be analysed to understand the composition of the secret society and the proportions of various roles.", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf" - }, - "71766c0c-e1e5-4675-9dd0-3aa2627773a0": { - "id": "71766c0c-e1e5-4675-9dd0-3aa2627773a0", - "type": "html", - "content": { - "styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"max-width\": \"90%\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(-3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140" - }, - "c73602a6-453d-4ccf-b8e3-b1774ab4ff17": { - "id": "c73602a6-453d-4ccf-b8e3-b1774ab4ff17", - "type": "text", - "content": { - "text": "Use the HTML Element component when you need additional control." - }, - "isCodeManaged": false, - "position": 1, - "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0" - }, - "573f095f-94a7-43e4-a94e-b2f69439a164": { - "id": "573f095f-94a7-43e4-a94e-b2f69439a164", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff" - }, - "feedc43f-a7cf-499b-962e-8170f1032b69": { - "id": "feedc43f-a7cf-499b-962e-8170f1032b69", - "type": "text", - "content": { - "text": "You can use Markdown, as shown below." - }, - "isCodeManaged": false, - "position": 0, - "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf" - }, - "1ee57415-557d-4529-be99-36f4d91fdf69": { - "id": "1ee57415-557d-4529-be99-36f4d91fdf69", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf" - }, - "a36b75bc-58e6-48ba-bdef-0824e6b21e8d": { - "id": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d", - "type": "html", - "content": { - "styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"max-width\": \"90%\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140" - }, - "5da5e007-d60a-4313-9d21-885deae7b37d": { - "id": "5da5e007-d60a-4313-9d21-885deae7b37d", - "type": "text", - "content": { - "text": "You can put other Writer Framework components inside HTML Elements." - }, - "isCodeManaged": false, - "position": 1, - "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d" - }, - "85120b55-69c6-4b50-853a-bbbf73ff8121": { - "id": "85120b55-69c6-4b50-853a-bbbf73ff8121", - "type": "tab", - "content": { - "name": "Timer" - }, - "isCodeManaged": false, - "position": 4, - "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360" - }, - "db4c66d6-1eb7-44d3-a2d4-65d0b3e5cf12": { - "id": "db4c66d6-1eb7-44d3-a2d4-65d0b3e5cf12", - "type": "dataframe", - "content": { - "dataframe": "@{random_df}", - "fontStyle": "monospace", - "enableSearch": "", - "enableDownload": "" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121" - }, - "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d": { - "id": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", - "type": "horizontalstack", - "content": { - "contentHAlign": "start" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121" - }, - "50a05488-d6fe-47bf-b681-36870d04f5d7": { - "id": "50a05488-d6fe-47bf-b681-36870d04f5d7", - "type": "timer", - "content": { - "intervalMs": "1000", - "isActive": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", - "handlers": { - "wf-tick": "handle_timer_tick" - } - }, - "e296866a-75d2-4677-b55d-3c1456113b89": { - "id": "e296866a-75d2-4677-b55d-3c1456113b89", - "type": "text", - "content": { - "text": "Refreshing automatically using a timer." - }, - "isCodeManaged": false, - "position": 1, - "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d" - }, - "fdf38e46-c01e-4a93-94d5-e187f9e4c823": { - "id": "fdf38e46-c01e-4a93-94d5-e187f9e4c823", - "type": "text", - "content": { - "text": "_pgcf_ stands for \"Pigeon Coefficient\" and is a meaningless, randomly-generated value.", - "useMarkdown": "yes", - "primaryTextColor": "#8a8a8a" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121" - }, - "c921816d-6d45-4ce3-9c18-2c78ff850e0e": { - "id": "c921816d-6d45-4ce3-9c18-2c78ff850e0e", - "type": "html", - "content": { - "element": "img", - "styles": "{\n \"filter\": \"hue-rotate(calc(80deg + @{hue_rotation}deg))\"\n}", - "attrs": "{ \"src\": \"static/pigeon1.jpg?3\"}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0" - }, - "c684f61e-0c79-4cb1-af9f-46c9cab5dfea": { - "id": "c684f61e-0c79-4cb1-af9f-46c9cab5dfea", - "type": "html", - "content": { - "element": "img", - "styles": "{\n \"filter\": \"hue-rotate(calc(140deg + @{hue_rotation}deg))\"\n}", - "attrs": "{ \"src\": \"static/pigeon1.jpg?3\"}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d" - }, - "ee82e035-cfb2-4d00-95ce-ccbb9eb2dbb9": { - "id": "ee82e035-cfb2-4d00-95ce-ccbb9eb2dbb9", - "type": "sliderinput", - "content": { - "label": "Hue rotation", - "minValue": "0", - "maxValue": "360", - "stepSize": "1" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", - "binding": { - "eventType": "wf-number-change", - "stateRef": "hue_rotation" - } - }, - "c9bb4720-d07a-4fd8-bc53-5bda8dc64046": { - "id": "c9bb4720-d07a-4fd8-bc53-5bda8dc64046", - "type": "text", - "content": { - "text": "As shown above, you can use _HTML Element_ components together with state references.", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 3, - "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140" - }, - "6a490318-239e-4fe9-a56b-f0f33d628c87": { - "id": "6a490318-239e-4fe9-a56b-f0f33d628c87", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a" - }, - "de70a15a-2ff6-42d2-ab12-c7fc9c3ed4e1": { - "id": "de70a15a-2ff6-42d2-ab12-c7fc9c3ed4e1", - "type": "heading", - "content": { - "text": "Highlighted Members", - "headingType": "h2", - "alignment": "center" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6" - }, - "2f4969e2-e248-43ed-9e63-222fc35250e2": { - "id": "2f4969e2-e248-43ed-9e63-222fc35250e2", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 2, - "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6" - }, - "f46cd60d-f01e-4390-a161-4353006b72a1": { - "id": "f46cd60d-f01e-4390-a161-4353006b72a1", - "type": "repeater", - "content": { - "repeaterObject": "@{highlighted_members}", - "keyVariable": "itemId", - "valueVariable": "item" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "2f4969e2-e248-43ed-9e63-222fc35250e2" - }, - "0dd29423-3867-478a-997e-eeaafb6b811e": { - "id": "0dd29423-3867-478a-997e-eeaafb6b811e", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "f46cd60d-f01e-4390-a161-4353006b72a1" - }, - "2d326b15-da90-496e-86e8-7fdd4bcbe822": { - "id": "2d326b15-da90-496e-86e8-7fdd4bcbe822", - "type": "section", - "content": { - "title": "@{item.name} \u2b50\ufe0f", - "containerBackgroundColor": "#F5F5F9" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "0dd29423-3867-478a-997e-eeaafb6b811e" - }, - "7ea0d29a-5dca-4b6c-a067-322ccaee5032": { - "id": "7ea0d29a-5dca-4b6c-a067-322ccaee5032", - "type": "text", - "content": { - "text": "You can use a _Repeater_ component to repeat components, based on a dictionary.", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 4, - "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822" - }, - "cd611ce2-f594-4b55-9932-d48e657b2e31": { - "id": "cd611ce2-f594-4b55-9932-d48e657b2e31", - "type": "text", - "content": { - "text": "**Role:** @{item.role}\n", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822" - }, - "9d6ee245-b8f7-4391-9934-89598b7fa9f8": { - "id": "9d6ee245-b8f7-4391-9934-89598b7fa9f8", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822" - }, - "01c33c6e-3788-4b5d-b7aa-2addaa7b503f": { - "id": "01c33c6e-3788-4b5d-b7aa-2addaa7b503f", - "type": "text", - "content": { - "text": "The following Hacker Pigeons have made an impressive contribution this month.\nLet's come together to recognise and celebrate this success.", - "alignment": "center" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6" - }, - "e0e2391e-7bab-4c68-ad92-841942cb12fb": { - "id": "e0e2391e-7bab-4c68-ad92-841942cb12fb", - "type": "text", - "content": { - "text": "The ability @{item.name} demonstrated in @{item.specialty} has earned them this recognition.", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822" - }, - "4ef4655b-45ca-495c-9f8d-fa1d7ae3565e": { - "id": "4ef4655b-45ca-495c-9f8d-fa1d7ae3565e", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 3, - "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822" - }, - "f67c98aa-3a7b-4f40-ac1f-0dd4aa06e22d": { - "id": "f67c98aa-3a7b-4f40-ac1f-0dd4aa06e22d", - "type": "plotlygraph", - "content": { - "spec": "@{scatter_chart}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "6a490318-239e-4fe9-a56b-f0f33d628c87", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "6d895924-e808-44aa-a119-f4e2d7f394f3": { - "id": "6d895924-e808-44aa-a119-f4e2d7f394f3", - "type": "column", - "content": { - "width": "1", - "contentHAlign": "", - "contentVAlign": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a" - }, - "70bd9ea8-baa9-4e1d-bce5-deee6a3c5440": { - "id": "70bd9ea8-baa9-4e1d-bce5-deee6a3c5440", - "type": "plotlygraph", - "content": { - "spec": "@{role_chart}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "6d895924-e808-44aa-a119-f4e2d7f394f3", - "handlers": {} - }, - "8c8dd54f-af2c-4d6d-9603-dfea11cf326b": { - "id": "8c8dd54f-af2c-4d6d-9603-dfea11cf326b", - "type": "metric", - "content": { - "metricValue": "@{metrics.average_weight}gr", - "name": "Average weight", - "note": "@{metrics.average_weight_note}", - "description": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "feb9ca67-6670-483d-a895-22b031426a13", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f": { - "id": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "feb9ca67-6670-483d-a895-22b031426a13": { - "id": "feb9ca67-6670-483d-a895-22b031426a13", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "3b325899-e560-40ea-ba54-9c55967af1e3": { - "id": "3b325899-e560-40ea-ba54-9c55967af1e3", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8": { - "id": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "5dcd137b-76bd-4a5f-ae5c-5b629035500e": { - "id": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 3, - "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "6a81f847-4d1d-4110-9cc1-12c716150e66": { - "id": "6a81f847-4d1d-4110-9cc1-12c716150e66", - "type": "metric", - "content": { - "metricValue": "@{metrics.average_length}cm", - "name": "Average length", - "note": "@{metrics.average_length_note}", - "description": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "3b325899-e560-40ea-ba54-9c55967af1e3", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "8e54e9d2-a7c8-4f74-897f-fa5791cd82da": { - "id": "8e54e9d2-a7c8-4f74-897f-fa5791cd82da", - "type": "metric", - "content": { - "metricValue": "@{metrics.average_bmi}", - "name": "Average BMI", - "note": "@{metrics.average_bmi_note}", - "description": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "07f50628-4679-48a8-9a5d-07dcaf171afb": { - "id": "07f50628-4679-48a8-9a5d-07dcaf171afb", - "type": "metric", - "content": { - "metricValue": "@{metrics.diversity}", - "name": "Diversity Index", - "description": "", - "note": "@{metrics.diversity_note}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "4cca0893-5ad7-4152-b805-5c87babc4dee": { - "id": "4cca0893-5ad7-4152-b805-5c87babc4dee", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "23bc1387-26ed-4ff2-8565-b027c2960c3c": { - "id": "23bc1387-26ed-4ff2-8565-b027c2960c3c", - "type": "page", - "content": { - "key": "story", - "buttonColor": "#242424", - "buttonTextColor": "#ffffff", - "containerBackgroundColor": "#4F4F4F", - "emptinessColor": "#333333", - "primaryTextColor": "#ffffff", - "separatorColor": "rgba(0, 0, 0, 0.2)" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "root", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "1d195388-35a3-43e1-b825-1d263b100a28": { - "id": "1d195388-35a3-43e1-b825-1d263b100a28", - "type": "header", - "content": { - "text": "HACKER PIGEONS" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "23bc1387-26ed-4ff2-8565-b027c2960c3c", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "771dc336-69b2-400e-9ea3-e881e2332c9d": { - "id": "771dc336-69b2-400e-9ea3-e881e2332c9d", - "type": "section", - "content": { - "title": "The story" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "dfaae7f9-db20-4f70-a376-919bdc7b6010", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "9c77aee4-e2a0-4e8b-9c2b-377f939bb51e": { - "id": "9c77aee4-e2a0-4e8b-9c2b-377f939bb51e", - "type": "text", - "content": { - "text": "@{story.text}" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d" - }, - "90fbfa9d-3178-4fc2-b445-c31e1acfa6a7": { - "id": "90fbfa9d-3178-4fc2-b445-c31e1acfa6a7", - "type": "button", - "content": { - "text": "Go back to the main page", - "icon": "arrow_back" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "9bb8a686-7013-4af7-a89e-d89c7754120d", - "handlers": { - "click": "$goToPage_main" - }, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05": { - "id": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "23bc1387-26ed-4ff2-8565-b027c2960c3c", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "7402263c-cb8b-412d-b170-e6dc6ffcb706": { - "id": "7402263c-cb8b-412d-b170-e6dc6ffcb706", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "dfaae7f9-db20-4f70-a376-919bdc7b6010": { - "id": "dfaae7f9-db20-4f70-a376-919bdc7b6010", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "8fe33adf-a5ea-4c7a-8d1d-59cc4dc14f05", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "5bc38721-8b48-43d5-a454-ee5ebe713a4c": { - "id": "5bc38721-8b48-43d5-a454-ee5ebe713a4c", - "type": "section", - "content": { - "title": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "7402263c-cb8b-412d-b170-e6dc6ffcb706" - }, - "42ab5c3d-21fc-4e88-befd-33e52fd15e8b": { - "id": "42ab5c3d-21fc-4e88-befd-33e52fd15e8b", - "type": "image", - "content": { - "src": "static/pigeon1.jpg", - "caption": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c" - }, - "9bb8a686-7013-4af7-a89e-d89c7754120d": { - "id": "9bb8a686-7013-4af7-a89e-d89c7754120d", - "type": "horizontalstack", - "content": { - "contentHAlign": "start" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "03f422ce-bc36-4000-8eb1-da1cc00948c9": { - "id": "03f422ce-bc36-4000-8eb1-da1cc00948c9", - "type": "button", - "content": { - "text": "Read the story", - "icon": "library_books" - }, - "isCodeManaged": false, - "position": 5, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", - "handlers": { - "click": "$goToPage_story" - }, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "2df56a4b-b6e7-423d-a7a1-5d23c77f65fa": { - "id": "2df56a4b-b6e7-423d-a7a1-5d23c77f65fa", - "type": "heading", - "content": { - "text": "Each page can have its own style", - "alignment": "" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c" - }, - "1272b52c-d97c-4c20-ba6b-19abe1ec0abc": { - "id": "1272b52c-d97c-4c20-ba6b-19abe1ec0abc", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 0, - "parentId": "771dc336-69b2-400e-9ea3-e881e2332c9d", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "77cb256b-ef12-4a55-a051-500497f41302": { - "id": "77cb256b-ef12-4a55-a051-500497f41302", - "type": "text", - "content": { - "text": "It's easy to switch between pages and it can be done from the frontend (via Writer Framework Builder) and from the backend (via Python)." - }, - "isCodeManaged": false, - "position": 2, - "parentId": "5bc38721-8b48-43d5-a454-ee5ebe713a4c", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "ed010441-0cac-4aa5-9e6f-97228e0c3536": { - "id": "ed010441-0cac-4aa5-9e6f-97228e0c3536", - "type": "button", - "content": { - "text": "Download this story", - "icon": "download" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "9bb8a686-7013-4af7-a89e-d89c7754120d", - "handlers": { - "click": "handle_story_download" - }, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "e1ax8ctt8lrao0e4": { - "id": "e1ax8ctt8lrao0e4", - "type": "tab", - "content": { - "name": "Pagination" - }, - "isCodeManaged": false, - "position": 3, - "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "j3jkho6tb97u0onr": { - "id": "j3jkho6tb97u0onr", - "type": "repeater", - "content": { - "keyVariable": "itemId", - "valueVariable": "item", - "repeaterObject": "@{paginated_members}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "e1ax8ctt8lrao0e4", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "4wzaubf275w17gac": { - "id": "4wzaubf275w17gac", - "type": "section", - "content": { - "title": "@{item.name} \u2b50\ufe0f", - "containerBackgroundColor": "#F5F5F9" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "j3jkho6tb97u0onr", - "handlers": {}, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "19binb4yi70gesho": { - "id": "19binb4yi70gesho", - "type": "text", - "content": { - "text": "**Role:** @{item.role}\n", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "4wzaubf275w17gac" - }, - "zfp1koasiuleygmz": { - "id": "zfp1koasiuleygmz", - "type": "pagination", - "content": { - "page": "@{paginated_members_page}", - "pageSize": "@{paginated_members_page_size}", - "totalItems": "@{paginated_members_total_items}", - "pageSizeOptions": "1,2,5", - "pageSizeShowAll": "no", - "jumpTo": "no", - "urlParam": "no" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "e1ax8ctt8lrao0e4", - "handlers": { - "wf-change-page": "handle_paginated_members_page_change", - "wf-change-page-size": "handle_paginated_members_page_size_change" - }, - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "b27lw9ex8ig3x17p": { - "id": "b27lw9ex8ig3x17p", - "type": "tags", - "content": { - "tags": "{\n \"fiction\": \"fiction\",\n \"inspirational\": \"inspirational\",\n \"ai-generated\": \"ai-generated\"\n}", - "seed": "" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", - "visible": { - "expression": true, - "binding": "", - "reversed": false - } - }, - "804e15bf-11a7-463d-8082-f46ea3acac1b": { - "id": "804e15bf-11a7-463d-8082-f46ea3acac1b", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 3, - "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76" - } - } -} \ No newline at end of file diff --git a/apps/pdg-tutorial/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/apps/pdg-tutorial/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..31a675705 --- /dev/null +++ b/apps/pdg-tutorial/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,12 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "PRODUCT DESCRIPTION GENERATOR"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "wf7ucshlh1xd01rd", "type": "columns", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "wki2gol8f69jo2wr", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "wf7ucshlh1xd01rd", "handlers": {}, "visible": true} +{"id": "dtueaw3s6jucxztj", "type": "column", "content": {"width": "2"}, "isCodeManaged": false, "position": 1, "parentId": "wf7ucshlh1xd01rd", "handlers": {}, "visible": true} +{"id": "9951wujx1y63miao", "type": "section", "content": {"title": ""}, "isCodeManaged": false, "position": 0, "parentId": "wki2gol8f69jo2wr", "handlers": {}, "visible": true} +{"id": "ot9efvpwoh7haksz", "type": "tabs", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "dtueaw3s6jucxztj", "handlers": {}} +{"id": "kyvrec2azudr740n", "type": "message", "content": {"message": "@{message}"}, "isCodeManaged": false, "position": 0, "parentId": "dtueaw3s6jucxztj", "handlers": {}, "visible": true} +{"id": "c8um3pjausohruax", "type": "textinput", "content": {"label": "Name"}, "isCodeManaged": false, "position": 0, "parentId": "9951wujx1y63miao", "handlers": {}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "form.title"}} +{"id": "s3aqi4bi8p4nc871", "type": "textinput", "content": {"label": "Description"}, "isCodeManaged": false, "position": 1, "parentId": "9951wujx1y63miao", "handlers": {}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "form.description"}} +{"id": "g9c82lcp1o8v0wof", "type": "button", "content": {"text": "Generate", "icon": "laps"}, "isCodeManaged": false, "position": 3, "parentId": "9951wujx1y63miao", "visible": true} +{"id": "zg72wu4k9394ah9q", "type": "textinput", "content": {"label": "Keywords"}, "isCodeManaged": false, "position": 2, "parentId": "9951wujx1y63miao", "handlers": {}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "form.keywords"}} diff --git a/apps/pdg-tutorial/.wf/components-root.jsonl b/apps/pdg-tutorial/.wf/components-root.jsonl new file mode 100644 index 000000000..b6e0c1666 --- /dev/null +++ b/apps/pdg-tutorial/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "Product Description Generator"}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/apps/pdg-tutorial/.wf/metadata.json b/apps/pdg-tutorial/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/pdg-tutorial/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/pdg-tutorial/ui.json b/apps/pdg-tutorial/ui.json deleted file mode 100644 index ecff21b01..000000000 --- a/apps/pdg-tutorial/ui.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.0rc3" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "Product Description Generator" - }, - "isCodeManaged": false, - "position": 0, - "handlers": {}, - "visible": true - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root", - "handlers": {}, - "visible": true - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "PRODUCT DESCRIPTION GENERATOR" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - }, - "wf7ucshlh1xd01rd": { - "id": "wf7ucshlh1xd01rd", - "type": "columns", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - }, - "wki2gol8f69jo2wr": { - "id": "wki2gol8f69jo2wr", - "type": "column", - "content": { - "width": "1" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "wf7ucshlh1xd01rd", - "handlers": {}, - "visible": true - }, - "dtueaw3s6jucxztj": { - "id": "dtueaw3s6jucxztj", - "type": "column", - "content": { - "width": "2" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "wf7ucshlh1xd01rd", - "handlers": {}, - "visible": true - }, - "9951wujx1y63miao": { - "id": "9951wujx1y63miao", - "type": "section", - "content": { - "title": "" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "wki2gol8f69jo2wr", - "handlers": {}, - "visible": true - }, - "ot9efvpwoh7haksz": { - "id": "ot9efvpwoh7haksz", - "type": "tabs", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "dtueaw3s6jucxztj", - "handlers": {} - }, - "kyvrec2azudr740n": { - "id": "kyvrec2azudr740n", - "type": "message", - "content": { - "message": "@{message}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "dtueaw3s6jucxztj", - "handlers": {}, - "visible": true - }, - "c8um3pjausohruax": { - "id": "c8um3pjausohruax", - "type": "textinput", - "content": { - "label": "Name" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "9951wujx1y63miao", - "handlers": {}, - "visible": true, - "binding": { - "eventType": "wf-change", - "stateRef": "form.title" - } - }, - "s3aqi4bi8p4nc871": { - "id": "s3aqi4bi8p4nc871", - "type": "textinput", - "content": { - "label": "Description" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "9951wujx1y63miao", - "handlers": {}, - "visible": true, - "binding": { - "eventType": "wf-change", - "stateRef": "form.description" - } - }, - "g9c82lcp1o8v0wof": { - "id": "g9c82lcp1o8v0wof", - "type": "button", - "content": { - "text": "Generate", - "icon": "laps" - }, - "isCodeManaged": false, - "position": 3, - "parentId": "9951wujx1y63miao", - "visible": true - }, - "zg72wu4k9394ah9q": { - "id": "zg72wu4k9394ah9q", - "type": "textinput", - "content": { - "label": "Keywords" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "9951wujx1y63miao", - "handlers": {}, - "visible": true, - "binding": { - "eventType": "wf-change", - "stateRef": "form.keywords" - } - } - } -} \ No newline at end of file diff --git a/apps/quickstart/.wf/components-page-0-e8e4m9mx50wfpdty.jsonl b/apps/quickstart/.wf/components-page-0-e8e4m9mx50wfpdty.jsonl new file mode 100644 index 000000000..a612c533c --- /dev/null +++ b/apps/quickstart/.wf/components-page-0-e8e4m9mx50wfpdty.jsonl @@ -0,0 +1,13 @@ +{"id": "e8e4m9mx50wfpdty", "type": "page", "content": {}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "g7hhwdug524j0fql", "type": "header", "content": {"text": "@{my_app.title}"}, "parentId": "e8e4m9mx50wfpdty", "position": 0, "handlers": {}, "visible": true} +{"id": "j8tmgh7pgdk1nzfb", "type": "columns", "content": {}, "parentId": "7hlk8jwfhvz29rbc", "position": 0, "handlers": {}, "visible": true} +{"id": "t3zfxwztd4cozu6v", "type": "column", "content": {"width": "0.5"}, "parentId": "j8tmgh7pgdk1nzfb", "position": 0, "handlers": {}, "visible": true} +{"id": "0vruexh3b8ajbuw9", "type": "column", "content": {"width": "1"}, "parentId": "j8tmgh7pgdk1nzfb", "position": 1, "handlers": {}, "visible": true} +{"id": "yb81pneakk4w7esg", "type": "sliderinput", "content": {"label": "Number of groups", "minValue": "2", "maxValue": "10", "stepSize": "1"}, "parentId": "t3zfxwztd4cozu6v", "position": 0, "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "number_of_groups"}, "visible": true} +{"id": "27wp270aghglmgx2", "type": "plotlygraph", "content": {"spec": "@{figure}"}, "parentId": "0vruexh3b8ajbuw9", "position": 0, "handlers": {}, "visible": true} +{"id": "b4ope7gynk5onxnq", "type": "sliderinput", "content": {"label": "Number of points", "minValue": "50", "maxValue": "1000", "stepSize": "1"}, "parentId": "t3zfxwztd4cozu6v", "position": 1, "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "number_of_points"}, "visible": true} +{"id": "v75sjhqjgpw0g0a7", "type": "message", "content": {"message": "@{message}"}, "parentId": "g7hhwdug524j0fql", "position": 0, "handlers": {}, "visible": "message"} +{"id": "tnooah1ico3nylvu", "type": "dropdowninput", "content": {"label": "Type", "options": "{\"ovr\": \"One vs Rest\", \"multinomial\": \"Multinomial\"}", "cssClasses": ""}, "parentId": "t3zfxwztd4cozu6v", "position": 3, "handlers": {"wf-option-change": "update"}, "binding": {"eventType": "wf-option-change", "stateRef": "multi_class"}, "visible": true} +{"id": "yfyr3y9xdllskii4", "type": "sliderinput", "content": {"label": "Cluster deviation", "minValue": "0", "maxValue": "10", "stepSize": "0.1"}, "parentId": "t3zfxwztd4cozu6v", "position": 2, "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "cluster_std"}, "visible": true} +{"id": "nfkazqjoivq5b4k9", "type": "button", "content": {"text": "Regenerate"}, "parentId": "t3zfxwztd4cozu6v", "position": 4, "handlers": {"wf-click": "update"}, "visible": true} +{"id": "7hlk8jwfhvz29rbc", "type": "section", "content": {"title": ""}, "parentId": "e8e4m9mx50wfpdty", "position": 1, "handlers": {}, "visible": true} diff --git a/apps/quickstart/.wf/components-root.jsonl b/apps/quickstart/.wf/components-root.jsonl new file mode 100644 index 000000000..41dd67afd --- /dev/null +++ b/apps/quickstart/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "Hello"}, "parentId": null, "position": 0} \ No newline at end of file diff --git a/apps/quickstart/.wf/metadata.json b/apps/quickstart/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/quickstart/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/quickstart/ui.json b/apps/quickstart/ui.json deleted file mode 100644 index efe6ca0b4..000000000 --- a/apps/quickstart/ui.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "metadata": { - "writer_version": "0.3.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "Hello" - }, - "parentId": null, - "position": 0 - }, - "e8e4m9mx50wfpdty": { - "id": "e8e4m9mx50wfpdty", - "type": "page", - "content": {}, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "g7hhwdug524j0fql": { - "id": "g7hhwdug524j0fql", - "type": "header", - "content": { - "text": "@{my_app.title}" - }, - "parentId": "e8e4m9mx50wfpdty", - "position": 0, - "handlers": {}, - "visible": true - }, - "j8tmgh7pgdk1nzfb": { - "id": "j8tmgh7pgdk1nzfb", - "type": "columns", - "content": {}, - "parentId": "7hlk8jwfhvz29rbc", - "position": 0, - "handlers": {}, - "visible": true - }, - "t3zfxwztd4cozu6v": { - "id": "t3zfxwztd4cozu6v", - "type": "column", - "content": { - "width": "0.5" - }, - "parentId": "j8tmgh7pgdk1nzfb", - "position": 0, - "handlers": {}, - "visible": true - }, - "0vruexh3b8ajbuw9": { - "id": "0vruexh3b8ajbuw9", - "type": "column", - "content": { - "width": "1" - }, - "parentId": "j8tmgh7pgdk1nzfb", - "position": 1, - "handlers": {}, - "visible": true - }, - "yb81pneakk4w7esg": { - "id": "yb81pneakk4w7esg", - "type": "sliderinput", - "content": { - "label": "Number of groups", - "minValue": "2", - "maxValue": "10", - "stepSize": "1" - }, - "parentId": "t3zfxwztd4cozu6v", - "position": 0, - "handlers": { - "wf-number-change": "update" - }, - "binding": { - "eventType": "wf-number-change", - "stateRef": "number_of_groups" - }, - "visible": true - }, - "27wp270aghglmgx2": { - "id": "27wp270aghglmgx2", - "type": "plotlygraph", - "content": { - "spec": "@{figure}" - }, - "parentId": "0vruexh3b8ajbuw9", - "position": 0, - "handlers": {}, - "visible": true - }, - "b4ope7gynk5onxnq": { - "id": "b4ope7gynk5onxnq", - "type": "sliderinput", - "content": { - "label": "Number of points", - "minValue": "50", - "maxValue": "1000", - "stepSize": "1" - }, - "parentId": "t3zfxwztd4cozu6v", - "position": 1, - "handlers": { - "wf-number-change": "update" - }, - "binding": { - "eventType": "wf-number-change", - "stateRef": "number_of_points" - }, - "visible": true - }, - "v75sjhqjgpw0g0a7": { - "id": "v75sjhqjgpw0g0a7", - "type": "message", - "content": { - "message": "@{message}" - }, - "parentId": "g7hhwdug524j0fql", - "position": 0, - "handlers": {}, - "visible": "message" - }, - "tnooah1ico3nylvu": { - "id": "tnooah1ico3nylvu", - "type": "dropdowninput", - "content": { - "label": "Type", - "options": "{\"ovr\": \"One vs Rest\", \"multinomial\": \"Multinomial\"}", - "cssClasses": "" - }, - "parentId": "t3zfxwztd4cozu6v", - "position": 3, - "handlers": { - "wf-option-change": "update" - }, - "binding": { - "eventType": "wf-option-change", - "stateRef": "multi_class" - }, - "visible": true - }, - "yfyr3y9xdllskii4": { - "id": "yfyr3y9xdllskii4", - "type": "sliderinput", - "content": { - "label": "Cluster deviation", - "minValue": "0", - "maxValue": "10", - "stepSize": "0.1" - }, - "parentId": "t3zfxwztd4cozu6v", - "position": 2, - "handlers": { - "wf-number-change": "update" - }, - "binding": { - "eventType": "wf-number-change", - "stateRef": "cluster_std" - }, - "visible": true - }, - "nfkazqjoivq5b4k9": { - "id": "nfkazqjoivq5b4k9", - "type": "button", - "content": { - "text": "Regenerate" - }, - "parentId": "t3zfxwztd4cozu6v", - "position": 4, - "handlers": { - "wf-click": "update" - }, - "visible": true - }, - "7hlk8jwfhvz29rbc": { - "id": "7hlk8jwfhvz29rbc", - "type": "section", - "content": { - "title": "" - }, - "parentId": "e8e4m9mx50wfpdty", - "position": 1, - "handlers": {}, - "visible": true - } - } -} \ No newline at end of file diff --git a/apps/text-demo/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/apps/text-demo/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..c0d60a5f7 --- /dev/null +++ b/apps/text-demo/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,10 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact"}, "isCodeManaged": false, "position": 0, "parentId": "root", "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "SOCIAL POST GENERATOR"}, "isCodeManaged": false, "position": 0, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "q237uluwl8idg8is", "type": "text", "content": {"text": "@{posts}", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 2, "parentId": "4k8f6ju68i8qej2s", "handlers": {}, "visible": ""} +{"id": "xszjpksyo1sfdu0c", "type": "section", "content": {"title": "", "containerBackgroundColor": "#EDE2FF", "accentColor": "#721CC9"}, "isCodeManaged": false, "position": 1, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "handlers": {}, "visible": true} +{"id": "3fbhifcljb3mqnpv", "type": "textinput", "content": {"label": "Generate social posts about..."}, "isCodeManaged": false, "position": 0, "parentId": "xszjpksyo1sfdu0c", "visible": true, "binding": {"eventType": "wf-change", "stateRef": "topic"}} +{"id": "v8o8h5estbx22uw7", "type": "button", "content": {"text": "Generate posts", "icon": "arrow_forward"}, "isCodeManaged": false, "position": 1, "parentId": "xszjpksyo1sfdu0c", "handlers": {"wf-click": "handle_button_click"}, "visible": true} +{"id": "hhmi0u8nksz57cbc", "type": "message", "content": {"message": "@{message}", "loadingColor": "#D4FFF2"}, "isCodeManaged": false, "position": 2, "parentId": "xszjpksyo1sfdu0c", "handlers": {}, "visible": "message"} +{"id": "4k8f6ju68i8qej2s", "type": "section", "content": {"title": "", "containerBackgroundColor": "#F6EFFD", "containerShadow": "none"}, "isCodeManaged": false, "position": 3, "parentId": "xszjpksyo1sfdu0c", "handlers": {}, "visible": "posts"} +{"id": "o1753ot0w2n4704o", "type": "tags", "content": {"tags": "@{tags}"}, "isCodeManaged": false, "position": 0, "parentId": "4k8f6ju68i8qej2s", "handlers": {}, "visible": true} +{"id": "ywzboz2fup220b1d", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "4k8f6ju68i8qej2s", "handlers": {}, "visible": true} diff --git a/apps/text-demo/.wf/components-root.jsonl b/apps/text-demo/.wf/components-root.jsonl new file mode 100644 index 000000000..67db04996 --- /dev/null +++ b/apps/text-demo/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "Social Post Generator Demo", "cssClasses": ""}, "isCodeManaged": false, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/apps/text-demo/.wf/metadata.json b/apps/text-demo/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/apps/text-demo/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/apps/text-demo/ui.json b/apps/text-demo/ui.json deleted file mode 100644 index f5b5c5e8b..000000000 --- a/apps/text-demo/ui.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "metadata": { - "writer_version": "0.6.0rc4" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "Social Post Generator Demo", - "cssClasses": "" - }, - "isCodeManaged": false, - "position": 0, - "handlers": {}, - "visible": true - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "root", - "handlers": {}, - "visible": true - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "SOCIAL POST GENERATOR" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - }, - "q237uluwl8idg8is": { - "id": "q237uluwl8idg8is", - "type": "text", - "content": { - "text": "@{posts}", - "useMarkdown": "yes" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "4k8f6ju68i8qej2s", - "handlers": {}, - "visible": "" - }, - "xszjpksyo1sfdu0c": { - "id": "xszjpksyo1sfdu0c", - "type": "section", - "content": { - "title": "", - "containerBackgroundColor": "#EDE2FF", - "accentColor": "#721CC9" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "handlers": {}, - "visible": true - }, - "3fbhifcljb3mqnpv": { - "id": "3fbhifcljb3mqnpv", - "type": "textinput", - "content": { - "label": "Generate social posts about..." - }, - "isCodeManaged": false, - "position": 0, - "parentId": "xszjpksyo1sfdu0c", - "visible": true, - "binding": { - "eventType": "wf-change", - "stateRef": "topic" - } - }, - "v8o8h5estbx22uw7": { - "id": "v8o8h5estbx22uw7", - "type": "button", - "content": { - "text": "Generate posts", - "icon": "arrow_forward" - }, - "isCodeManaged": false, - "position": 1, - "parentId": "xszjpksyo1sfdu0c", - "handlers": { - "wf-click": "handle_button_click" - }, - "visible": true - }, - "hhmi0u8nksz57cbc": { - "id": "hhmi0u8nksz57cbc", - "type": "message", - "content": { - "message": "@{message}", - "loadingColor": "#D4FFF2" - }, - "isCodeManaged": false, - "position": 2, - "parentId": "xszjpksyo1sfdu0c", - "handlers": {}, - "visible": "message" - }, - "4k8f6ju68i8qej2s": { - "id": "4k8f6ju68i8qej2s", - "type": "section", - "content": { - "title": "", - "containerBackgroundColor": "#F6EFFD", - "containerShadow": "none" - }, - "isCodeManaged": false, - "position": 3, - "parentId": "xszjpksyo1sfdu0c", - "handlers": {}, - "visible": "posts" - }, - "o1753ot0w2n4704o": { - "id": "o1753ot0w2n4704o", - "type": "tags", - "content": { - "tags": "@{tags}" - }, - "isCodeManaged": false, - "position": 0, - "parentId": "4k8f6ju68i8qej2s", - "handlers": {}, - "visible": true - }, - "ywzboz2fup220b1d": { - "id": "ywzboz2fup220b1d", - "type": "separator", - "content": {}, - "isCodeManaged": false, - "position": 1, - "parentId": "4k8f6ju68i8qej2s", - "handlers": {}, - "visible": true - } - } -} \ No newline at end of file diff --git a/src/writer/app_runner.py b/src/writer/app_runner.py index 2ff19b8e4..c5368270f 100644 --- a/src/writer/app_runner.py +++ b/src/writer/app_runner.py @@ -24,6 +24,8 @@ MiddlewareRegistry, WriterSession, use_request_context, + wf_project_migrate_obsolete_ui_json, + wf_project_read_files, wf_project_write_files, ) from writer.core_ui import ingest_bmc_component_tree @@ -32,6 +34,7 @@ AppProcessServerRequestPacket, AppProcessServerResponse, AppProcessServerResponsePacket, + ComponentDefinition, ComponentUpdateRequest, ComponentUpdateRequestPayload, EventRequest, @@ -685,22 +688,15 @@ def _load_persisted_script(self) -> str: "Couldn't find main.py in the path provided: %s.", self.app_path) sys.exit(1) - def _load_persisted_components(self) -> Dict: - file_payload: Dict = {} - try: - with open(os.path.join(self.app_path, "ui.json"), "r") as f: - parsed_file = json.load(f) - if not isinstance(parsed_file, dict): - raise ValueError("No dictionary found in components file.") - file_payload = parsed_file - except FileNotFoundError: - logging.error( - "Couldn't find ui.json in the path provided: %s.", self.app_path) + def _load_persisted_components(self) -> Dict[str, ComponentDefinition]: + if os.path.isfile(os.path.join(self.app_path, "ui.json")): + wf_project_migrate_obsolete_ui_json(self.app_path) + + if not os.path.isdir(os.path.join(self.app_path, ".wf")): + logging.error("Couldn't find .wf in the path provided: %s.", self.app_path) sys.exit(1) - components = file_payload.get("components") - if components is None: - raise ValueError("Components not found in file.") - + + _, components = wf_project_read_files(self.app_path) components = audit_and_fix.fix_components(components) return components @@ -726,15 +722,6 @@ async def update_components(self, session_id: str, payload: ComponentUpdateReque wf_project_write_files(self.app_path, metadata={"writer_version": VERSION}, components=payload.components) - file_contents = { - "metadata": { - "writer_version": VERSION - }, - "components": payload.components - } - with open(os.path.join(self.app_path, "ui.json"), "w") as f: - json.dump(file_contents, f, indent=4) - return await self.dispatch_message(session_id, ComponentUpdateRequest( type="componentUpdate", payload=payload diff --git a/src/writer/command_line.py b/src/writer/command_line.py index 68fb35e21..db1bdd6d3 100644 --- a/src/writer/command_line.py +++ b/src/writer/command_line.py @@ -7,6 +7,11 @@ import click import writer.serve +from writer.core import ( + wf_project_migrate_obsolete_ui_json, + wf_project_read_files, + wf_project_write_files, +) from writer.deploy import cloud CONTEXT_SETTINGS = {'help_option_names': ['-h', '--help']} @@ -72,6 +77,7 @@ def hello(port, host, enable_remote_edit): port=port, host=host, enable_remote_edit=enable_remote_edit, enable_server_setup=False) + main.add_command(cloud) def create_app(app_path: str, template_name: Optional[str], overwrite=False): diff --git a/src/writer/core.py b/src/writer/core.py index 40f101280..0b45c2ec8 100644 --- a/src/writer/core.py +++ b/src/writer/core.py @@ -2437,7 +2437,7 @@ def wf_project_write_files(app_path: str, metadata: MetadataDefinition, componen if not os.path.exists(wf_directory): os.makedirs(wf_directory) - with open(os.path.join(wf_directory, "metadata.json"), "w") as f: + with io.open(os.path.join(wf_directory, "metadata.json"), "w") as f: json.dump(metadata, f, indent=4) root_component = components["root"] @@ -2450,10 +2450,10 @@ def wf_project_write_files(app_path: str, metadata: MetadataDefinition, componen list_pages.append(c["id"]) for position, page_id in enumerate(list_pages): - page_components = [components[page_id]] + page_components = [] page_components_ids = {page_id} for c in components.values(): - if c.get("parentId", None) in page_components_ids: + if _lookup_page_for_component(components, c['id']) in page_components_ids: page_components.append(c) page_components_ids.add(c["id"]) @@ -2461,10 +2461,68 @@ def wf_project_write_files(app_path: str, metadata: MetadataDefinition, componen for p in page_components: f.write(json.dumps(p) + "\n") +def wf_project_read_files(app_path: str) -> Tuple[MetadataDefinition, dict[str, ComponentDefinition]]: + """ + Reads project files in the `.wf` folder. + The components are read in page order. -def wf_project_read_files(app_path: str) -> Optional[Tuple[MetadataDefinition, dict[str, ComponentDefinition]]]: - pass + >>> metadata, components = wf_project_read_files('app/hello') + """ + components: dict[str, ComponentDefinition] = {} + + meta_data_path = os.path.join(app_path, ".wf", "metadata.json") + try: + with io.open(meta_data_path, "r") as filep: + metadata: MetadataDefinition = json.load(filep) + except Exception as e: + raise ValueError(f"Error reading metadata file {meta_data_path} : {e}") + + root_component_path = os.path.join(app_path, ".wf", "components-root.jsonl") + try: + with io.open(root_component_path, "r") as filep: + root_component: ComponentDefinition = json.loads(filep.read()) + components.update({root_component["id"]: root_component}) + except Exception as e: + raise ValueError(f"Error reading root component file {root_component_path} : {e}") + + files = os.listdir(os.path.join(app_path, ".wf")) + page_files = [file for file in files if file.startswith("components-page-")] + sorted_page_files = sorted(page_files, key=lambda x: int(x.split("-")[2])) + for page_file in sorted_page_files: + page_file_path = os.path.join(app_path, ".wf", page_file) + try: + with io.open(page_file_path, "r") as filep: + for line in filep: + component: ComponentDefinition = json.loads(line) + components.update({component["id"]: component}) + except Exception as e: + raise ValueError(f"Error reading page component file {page_file_path} : {e}") + + return metadata, components + + +def wf_project_migrate_obsolete_ui_json(app_path: str) -> None: + """ + Migrates a project that uses ui.json file to the current project format + + The ui.json file is removed after the migration. + """ + assert os.path.isfile(os.path.join(app_path, "ui.json")), f"ui.json file required for migration into {app_path}" + + logger = logging.getLogger('writer') + with io.open(os.path.join(app_path, "ui.json"), "r") as f: + parsed_file = json.load(f) + + if not isinstance(parsed_file, dict): + raise ValueError("No dictionary found in components file.") + + file_payload = parsed_file + metadata = file_payload.get("metadata", {}) + components = file_payload.get("components", {}) + wf_project_write_files(app_path, metadata, components) + os.remove(os.path.join(app_path, "ui.json")) + logger.warning('project format has changed and has been migrated with success. ui.json file has been removed.') def writer_event_handler_invoke(callable_handler: Callable, writer_args: dict) -> Any: @@ -2579,6 +2637,29 @@ def _event_handler_ui_manager(): return WriterUIManager() +def _lookup_page_for_component(components: dict[str, ComponentDefinition], component_id: str) -> Optional[str]: + """ + Retrieves the page of a component + + >>> _lookup_page_for_component(components, "6a490318-239e-4fe9-a56b-f0f33d628c87") + """ + component = components[component_id] + parent_id = component.get("parentId") + if parent_id is None: + return None + + if component['type'] == "page": + return component['id'] + + if parent_id in components: + if components[parent_id]['type'] == "page": + return parent_id + else: + return _lookup_page_for_component(components, parent_id) + + return None + + def _split_record_as_pandas_record_and_index(param: dict, index_columns: list) -> Tuple[dict, tuple]: """ Separates a record into the record part and the index part to be able to @@ -2598,6 +2679,7 @@ def _split_record_as_pandas_record_and_index(param: dict, index_columns: list) - return final_record, tuple(final_index) + state_serialiser = StateSerialiser() initial_state = WriterState() base_component_tree = core_ui.build_base_component_tree() diff --git a/tests/backend/__init__.py b/tests/backend/__init__.py index 180de2413..5ed313de6 100644 --- a/tests/backend/__init__.py +++ b/tests/backend/__init__.py @@ -3,3 +3,4 @@ test_app_dir = Path(__file__).resolve().parent / 'testapp' test_multiapp_dir = Path(__file__).resolve().parent / 'testmultiapp' test_basicauth_dir = Path(__file__).resolve().parent / 'testbasicauth' +testobsoleteapp = Path(__file__).resolve().parent / 'testobsoleteapp' diff --git a/tests/backend/test_cli.py b/tests/backend/test_cli.py index 9635e809f..83cd340d3 100644 --- a/tests/backend/test_cli.py +++ b/tests/backend/test_cli.py @@ -23,7 +23,7 @@ def test_create_default(): print(result.output) assert result.exit_code == 0 assert os.path.exists('./my_app') - assert os.path.exists('./my_app/ui.json') + assert os.path.exists('./my_app/.wf') assert os.path.exists('./my_app/main.py') with open('./my_app/pyproject.toml') as f: content = f.read() @@ -36,7 +36,7 @@ def test_create_specific_template(): print(result.output) assert result.exit_code == 0 assert os.path.exists('./my_app') - assert os.path.exists('./my_app/ui.json') + assert os.path.exists('./my_app/.wf') assert os.path.exists('./my_app/main.py') with open('./my_app/pyproject.toml') as f: content = f.read() diff --git a/tests/backend/test_core.py b/tests/backend/test_core.py index 51a462aaf..355048095 100644 --- a/tests/backend/test_core.py +++ b/tests/backend/test_core.py @@ -1,6 +1,7 @@ import json import math import os.path +import shutil import tempfile import unittest import urllib @@ -16,6 +17,7 @@ import pyarrow as pa import pytest import writer as wf +from writer import audit_and_fix from writer.core import ( BytesWrapper, Evaluator, @@ -29,12 +31,14 @@ WriterState, import_failure, parse_state_variable_expression, + wf_project_migrate_obsolete_ui_json, + wf_project_read_files, wf_project_write_files, ) from writer.core_ui import Component from writer.ss_types import ComponentDefinition, WriterEvent -from tests.backend import test_app_dir +from tests.backend import test_app_dir, testobsoleteapp from tests.backend.fixtures import ( core_ui_fixtures, file_fixtures, @@ -70,9 +74,9 @@ wf.Config.is_mail_enabled_for_log = True wf.init_state(raw_state_dict) -sc = None -with open(test_app_dir / "ui.json", "r") as f: - sc = json.load(f).get("components") +_, sc = wf_project_read_files(test_app_dir) +sc = audit_and_fix.fix_components(sc) + session = wf.session_manager.get_new_session() session.session_component_tree.ingest(sc) @@ -1790,3 +1794,25 @@ def test_wf_project_write_files_should_write_preserve_page_order_in_wf_directory assert os.path.isfile(os.path.join(test_app_dir, '.wf', 'components-page-1-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl')) page_1: List[ComponentDefinition] = file_fixtures.read(os.path.join(test_app_dir, '.wf', 'components-page-1-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl')) assert page_1[0] == components_page_1[0] + + +def test_wf_project_read_files_should_read_files_in_wf_directory(): + # When + metadata, sc = wf_project_read_files(test_app_dir) + + # Then + assert 'writer_version' in metadata + assert isinstance(sc, dict) + assert len(sc) != 0 + +def test_wf_project_migrate_obsolete_ui_json_should_migrate_ui_json_into_wf_directory(): + with tempfile.TemporaryDirectory('wf_project_migrate_obsolete_ui_json') as tmp_app_dir: + shutil.copytree(testobsoleteapp, tmp_app_dir, dirs_exist_ok=True) + + # When + wf_project_migrate_obsolete_ui_json(tmp_app_dir) + + # Then + assert not os.path.isfile(os.path.join(tmp_app_dir, 'ui.json')) + assert os.path.isfile(os.path.join(tmp_app_dir, '.wf', 'metadata.json')) + assert os.path.isfile(os.path.join(tmp_app_dir, '.wf', 'components-root.jsonl')) diff --git a/tests/backend/test_ui.py b/tests/backend/test_ui.py index 47de1870f..748881a97 100644 --- a/tests/backend/test_ui.py +++ b/tests/backend/test_ui.py @@ -2,7 +2,8 @@ import json import writer as wf -from writer import core +from writer import audit_and_fix, core +from writer.core import wf_project_read_files from writer.core_ui import ( Component, UIError, @@ -16,8 +17,8 @@ from backend.fixtures import core_ui_fixtures from tests.backend import test_app_dir -with open(test_app_dir / "ui.json", "r") as f: - sc = json.load(f).get("components") +_, sc = wf_project_read_files(test_app_dir) +sc = audit_and_fix.fix_components(sc) @contextlib.contextmanager def use_ui_manager_with_init_ui(): diff --git a/tests/backend/testapp/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl b/tests/backend/testapp/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl new file mode 100644 index 000000000..e23f880f3 --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-0-bb4d0e86-619e-4367-a180-be28ab6059f4.jsonl @@ -0,0 +1,90 @@ +{"id": "bb4d0e86-619e-4367-a180-be28ab6059f4", "type": "page", "content": {"pageMode": "", "key": "main"}, "isCodeManaged": false, "position": 0, "parentId": "root"} +{"id": "84378aea-b64c-49a3-9539-f854532279ee", "type": "header", "content": {"text": "TEST APP", "emptinessColor": "#ffffff"}, "isCodeManaged": false, "position": 0, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5", "type": "columns", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5", "type": "column", "content": {"width": "1", "isCollapsible": "", "title": "", "isSticky": "yes"}, "isCodeManaged": false, "position": 0, "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5"} +{"id": "0569937e-c72c-4fb9-820e-2ae56e17bcc0", "type": "column", "content": {"width": "1.61"}, "isCodeManaged": false, "position": 1, "parentId": "92a2c0c8-7ab4-4865-b7eb-ed437408c8f5"} +{"id": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "type": "section", "content": {"title": ""}, "isCodeManaged": false, "position": 0, "parentId": "d1e01ce1-fab1-4a6e-91a1-1f45f9e57aa5"} +{"id": "ee919cd6-8153-4f34-8c6a-bfc1153df360", "type": "tabs", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "0569937e-c72c-4fb9-820e-2ae56e17bcc0"} +{"id": "c6392876-7cfd-4680-8725-b04f43ff294f", "type": "tab", "content": {"name": "Data and Charts"}, "isCodeManaged": false, "position": 0, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "da00a61f-0ee2-434e-acd6-228d32eae5c6", "type": "tab", "content": {"name": "Repeater"}, "isCodeManaged": false, "position": 2, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "d0298b1c-7c64-4b58-a018-db97dd49675b", "type": "separator", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "f1d6bc8e-a780-4ae5-8b7c-082fe8a6867d", "type": "dataframe", "content": {"dataframe": "@{main_df}", "dataframeBackgroundColor": "#f5fdff", "dataframeHeaderRowBackgroundColor": "#d0e6eb", "showIndex": "", "enableSearch": ""}, "isCodeManaged": false, "position": 4, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "fbad9feb-5c88-4425-bb17-0d138286a875", "type": "sidebar", "content": {"startCollapsed": "yes"}, "isCodeManaged": false, "position": -2, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4"} +{"id": "7e625201-20c2-4b05-951c-d825de28b216", "type": "section", "content": {"title": "Filter data"}, "isCodeManaged": false, "position": 0, "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875"} +{"id": "385247e5-5c89-4352-a598-b8da81146a5a", "type": "sliderinput", "content": {"label": "Minimum weight", "minValue": "300", "maxValue": "600", "stepSize": "0.1"}, "isCodeManaged": false, "position": 1, "parentId": "7e625201-20c2-4b05-951c-d825de28b216", "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "filter.min_weight"}} +{"id": "10c156df-7464-4889-8b69-1b54cb1ee80a", "type": "sliderinput", "content": {"label": "Minimum length", "minValue": "25", "maxValue": "35", "stepSize": "1"}, "isCodeManaged": false, "position": 0, "parentId": "7e625201-20c2-4b05-951c-d825de28b216", "handlers": {"wf-number-change": "update"}, "binding": {"eventType": "wf-number-change", "stateRef": "filter.min_length"}} +{"id": "70d82458-a08f-4005-8f96-dc8d3ba92fad", "type": "section", "content": {"title": "About this app"}, "isCodeManaged": false, "position": 1, "parentId": "fbad9feb-5c88-4425-bb17-0d138286a875"} +{"id": "12e11005-3b5e-4bd8-9a8c-fc7b8cb757d0", "type": "text", "content": {"text": "This app is meant to serve as a lighthearted introduction to Writer Framework. It's not a comprehensive demonstration of its capabilities."}, "isCodeManaged": false, "position": 0, "parentId": "70d82458-a08f-4005-8f96-dc8d3ba92fad"} +{"id": "18f73ad0-3961-4aed-9dc1-5ed54d939fdf", "type": "tab", "content": {"name": "Download"}, "isCodeManaged": false, "position": 3, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "7b710d37-1c68-4d06-a65a-e6596ccc826a", "type": "text", "content": {"text": "In the bustling city, a hidden group of hacker pigeons works together to break into computer systems and create advanced data apps. These smart birds have different roles, like leaders, developers, security experts, and designers, and they use their skills to complete various tech challenges."}, "isCodeManaged": false, "position": 2, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "b9cb10e5-1ead-448b-afcc-909e23afb72a", "type": "columns", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f"} +{"id": "31c1b0d5-bfb6-4304-82bd-1687d492f0a2", "type": "heading", "content": {"text": "Pigeon Power: Clever Birds Tackle Data Apps", "alignment": "right", "primaryTextColor": "#2fa0c6"}, "isCodeManaged": false, "position": 0, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "804e15bf-11a7-463d-8082-f46ea3acac1b", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76"} +{"id": "3cc9c5e9-6c77-401d-ab82-7805d9df760c", "type": "tab", "content": {"name": "Layout"}, "isCodeManaged": false, "position": 1, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "3cc9c5e9-6c77-401d-ab82-7805d9df760c"} +{"id": "25dda22d-1b18-4584-aa99-aaae9f3b8edf", "type": "column", "content": {"width": "1", "contentVAlign": ""}, "isCodeManaged": false, "position": 0, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", "type": "column", "content": {"title": "HTML Element", "width": "1", "isCollapsible": "yes", "startCollapsed": ""}, "isCodeManaged": false, "position": 2, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "d1f43b6f-5b0f-4c8f-95bf-a92dd7ed723b", "type": "text", "content": {"text": "\n## Role Distribution\n\nThe hacker pigeons dataframe consists of five distinct roles:\n\n1. Leader\n2. Developer\n3. Data Expert\n4. Designer\n5. Security Expert\n\nThe role distribution among the hacker pigeons can be analyzed to understand the composition of the secret society and the proportions of various roles.\n\n## Length and Weight Statistics\n\n- The length and weight of hacker pigeons in the dataframe can be used to gain insights into their physical characteristics.\n- Examining the minimum, maximum, and average values for length and weight can provide an overview of the size variation among the hacker pigeons.\n- By grouping the data by role, we can analyze the differences in length and weight for each role and identify any patterns or trends.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 2, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "71766c0c-e1e5-4675-9dd0-3aa2627773a0", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(-3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}"}, "isCodeManaged": false, "position": 0, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "c73602a6-453d-4ccf-b8e3-b1774ab4ff17", "type": "text", "content": {"text": "Use the HTML Element component when you need additional control."}, "isCodeManaged": false, "position": 1, "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0"} +{"id": "573f095f-94a7-43e4-a94e-b2f69439a164", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "fb22acfc-cdb5-44b6-9e97-76c3a51a8fff"} +{"id": "feedc43f-a7cf-499b-962e-8170f1032b69", "type": "text", "content": {"text": "You can use Markdown, as shown below."}, "isCodeManaged": false, "position": 0, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "1ee57415-557d-4529-be99-36f4d91fdf69", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "25dda22d-1b18-4584-aa99-aaae9f3b8edf"} +{"id": "ec5bc32e-1456-4abd-8d3e-97c640e32339", "type": "section", "content": {"title": "", "containerBackgroundColor": "#ebfcff"}, "isCodeManaged": false, "position": 1, "parentId": "3cc9c5e9-6c77-401d-ab82-7805d9df760c"} +{"id": "919b0d26-ea9b-4364-b5af-865236b3fc3a", "type": "horizontalstack", "content": {"contentHAlign": "start"}, "isCodeManaged": false, "position": 0, "parentId": "ec5bc32e-1456-4abd-8d3e-97c640e32339"} +{"id": "0cf677a9-34f6-461a-a531-5578939400c7", "type": "text", "content": {"text": "Used to stack things horizontally."}, "isCodeManaged": false, "position": 2, "parentId": "919b0d26-ea9b-4364-b5af-865236b3fc3a"} +{"id": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"margin\": \"24px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"transform\": \"rotate(3deg)\",\n \"box-shadow\": \"0 4px 16px -8px black\"\n}"}, "isCodeManaged": false, "position": 1, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "5da5e007-d60a-4313-9d21-885deae7b37d", "type": "text", "content": {"text": "You can put other Writer Framework components inside HTML Elements."}, "isCodeManaged": false, "position": 1, "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d"} +{"id": "85120b55-69c6-4b50-853a-bbbf73ff8121", "type": "tab", "content": {"name": "Timer"}, "isCodeManaged": false, "position": 4, "parentId": "ee919cd6-8153-4f34-8c6a-bfc1153df360"} +{"id": "db4c66d6-1eb7-44d3-a2d4-65d0b3e5cf12", "type": "dataframe", "content": {"dataframe": "@{random_df}", "fontStyle": "monospace"}, "isCodeManaged": false, "position": 1, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", "type": "horizontalstack", "content": {"contentHAlign": "start"}, "isCodeManaged": false, "position": 0, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "50a05488-d6fe-47bf-b681-36870d04f5d7", "type": "timer", "content": {"intervalMs": "500", "isActive": "no"}, "isCodeManaged": false, "position": 0, "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d", "handlers": {"wf-tick": "handle_timer_tick"}} +{"id": "e296866a-75d2-4677-b55d-3c1456113b89", "type": "text", "content": {"text": "Refreshing automatically using a timer."}, "isCodeManaged": false, "position": 1, "parentId": "09ddb2da-6fa3-4157-8da3-4d5d44a6a58d"} +{"id": "fdf38e46-c01e-4a93-94d5-e187f9e4c823", "type": "text", "content": {"text": "_pgcf_ stands for \"Pigeon Coefficient\" and is a meaningless, randomly-generated value.", "useMarkdown": "yes", "primaryTextColor": "#8a8a8a"}, "isCodeManaged": false, "position": 2, "parentId": "85120b55-69c6-4b50-853a-bbbf73ff8121"} +{"id": "c921816d-6d45-4ce3-9c18-2c78ff850e0e", "type": "html", "content": {"element": "img", "styles": "{\n \"filter\": \"hue-rotate(calc(80deg + @{hue_rotation}deg))\"\n}", "attrs": "{ \"src\": \"static/pigeon1.jpg\"}"}, "isCodeManaged": false, "position": 0, "parentId": "71766c0c-e1e5-4675-9dd0-3aa2627773a0"} +{"id": "c684f61e-0c79-4cb1-af9f-46c9cab5dfea", "type": "html", "content": {"element": "img", "styles": "{\n \"filter\": \"hue-rotate(calc(140deg + @{hue_rotation}deg))\"\n}", "attrs": "{ \"src\": \"static/pigeon1.jpg\"}"}, "isCodeManaged": false, "position": 0, "parentId": "a36b75bc-58e6-48ba-bdef-0824e6b21e8d"} +{"id": "ee82e035-cfb2-4d00-95ce-ccbb9eb2dbb9", "type": "sliderinput", "content": {"label": "Hue rotation", "minValue": "0", "maxValue": "360", "stepSize": "1"}, "isCodeManaged": false, "position": 2, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140", "binding": {"eventType": "wf-number-change", "stateRef": "hue_rotation"}} +{"id": "c9bb4720-d07a-4fd8-bc53-5bda8dc64046", "type": "text", "content": {"text": "As shown above, you can use _HTML Element_ components together with state references.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 3, "parentId": "b1ee642e-f2e7-453b-a6ef-3d96eea37140"} +{"id": "e77448dd-4e7c-451c-8f31-4edde9bbf9f5", "type": "text", "content": {"text": "Horizontal Stack"}, "isCodeManaged": false, "position": 0, "parentId": "919b0d26-ea9b-4364-b5af-865236b3fc3a"} +{"id": "b4dc3e9c-ce01-4690-8e0e-e4357dbe70ad", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "919b0d26-ea9b-4364-b5af-865236b3fc3a"} +{"id": "6a490318-239e-4fe9-a56b-f0f33d628c87", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 2, "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a"} +{"id": "888b1eb9-609c-4205-bbda-262999d197ff", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a"} +{"id": "de70a15a-2ff6-42d2-ab12-c7fc9c3ed4e1", "type": "heading", "content": {"text": "Highlighted Members \ud83c\udfc6", "headingType": "h1", "alignment": "center"}, "isCodeManaged": false, "position": 0, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "e72f2050-3156-4fbf-9961-9a31945425fb", "type": "heading", "content": {"text": "The Story", "headingType": "h1"}, "isCodeManaged": false, "position": 0, "parentId": "18f73ad0-3961-4aed-9dc1-5ed54d939fdf"} +{"id": "2f4969e2-e248-43ed-9e63-222fc35250e2", "type": "columns", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "f46cd60d-f01e-4390-a161-4353006b72a1", "type": "repeater", "content": {"repeaterObject": "@{highlighted_members_dict}", "keyVariable": "itemId", "valueVariable": "item"}, "isCodeManaged": false, "position": 0, "parentId": "2f4969e2-e248-43ed-9e63-222fc35250e2"} +{"id": "0dd29423-3867-478a-997e-eeaafb6b811e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "f46cd60d-f01e-4390-a161-4353006b72a1"} +{"id": "2d326b15-da90-496e-86e8-7fdd4bcbe822", "type": "section", "content": {"title": "@{item.name}", "containerBackgroundColor": "#eff4f6"}, "isCodeManaged": false, "position": 0, "parentId": "0dd29423-3867-478a-997e-eeaafb6b811e"} +{"id": "7ea0d29a-5dca-4b6c-a067-322ccaee5032", "type": "text", "content": {"text": "You can use a _Repeater_ component to repeat components, based on a dictionary.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 4, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "cd611ce2-f594-4b55-9932-d48e657b2e31", "type": "text", "content": {"text": "**Role:** @{item.role}\n", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 1, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "9d6ee245-b8f7-4391-9934-89598b7fa9f8", "type": "separator", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "01c33c6e-3788-4b5d-b7aa-2addaa7b503f", "type": "text", "content": {"text": "The following Hacker Pigeons have made an impressive contribution this month.", "alignment": "center"}, "isCodeManaged": false, "position": 1, "parentId": "da00a61f-0ee2-434e-acd6-228d32eae5c6"} +{"id": "e0e2391e-7bab-4c68-ad92-841942cb12fb", "type": "text", "content": {"text": "The ability @{item.name} demonstrated in @{item.specialty} has earned them this recognition.", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 2, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "4ef4655b-45ca-495c-9f8d-fa1d7ae3565e", "type": "separator", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822"} +{"id": "f67c98aa-3a7b-4f40-ac1f-0dd4aa06e22d", "type": "plotlygraph", "content": {"spec": "@{scatter_chart}"}, "isCodeManaged": false, "position": 0, "parentId": "6a490318-239e-4fe9-a56b-f0f33d628c87", "handlers": {}, "visible": true} +{"id": "6d895924-e808-44aa-a119-f4e2d7f394f3", "type": "column", "content": {"width": "1", "not-a-real-field": "not-a-real-value", "contentHAlign": "", "contentVAlign": ""}, "isCodeManaged": false, "position": 0, "parentId": "b9cb10e5-1ead-448b-afcc-909e23afb72a"} +{"id": "70bd9ea8-baa9-4e1d-bce5-deee6a3c5440", "type": "plotlygraph", "content": {"spec": "@{role_chart}"}, "isCodeManaged": false, "position": 0, "parentId": "6d895924-e808-44aa-a119-f4e2d7f394f3", "handlers": {}} +{"id": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", "handlers": {}, "visible": true} +{"id": "feb9ca67-6670-483d-a895-22b031426a13", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "3b325899-e560-40ea-ba54-9c55967af1e3", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 1, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 2, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 3, "parentId": "1c05b2e7-3a31-40dd-b6b8-77ded7c6bc0f", "handlers": {}, "visible": true} +{"id": "6a81f847-4d1d-4110-9cc1-12c716150e66", "type": "metric", "content": {"metricValue": "@{metrics.average_length}cm", "name": "Average length", "note": "@{metrics.average_length_note}", "description": ""}, "isCodeManaged": false, "position": 0, "parentId": "3b325899-e560-40ea-ba54-9c55967af1e3", "handlers": {}, "visible": true} +{"id": "8e54e9d2-a7c8-4f74-897f-fa5791cd82da", "type": "metric", "content": {"metricValue": "@{metrics.average_bmi}", "name": "Average BMI", "note": "@{metrics.average_bmi_note}", "description": ""}, "isCodeManaged": false, "position": 0, "parentId": "a0cd99db-0cbe-40ca-b9cb-b1670ec60dd8", "handlers": {}, "visible": true} +{"id": "07f50628-4679-48a8-9a5d-07dcaf171afb", "type": "metric", "content": {"metricValue": "@{metrics.diversity}", "name": "Diversity Index", "description": "", "note": "@{metrics.diversity_note}"}, "isCodeManaged": false, "position": 0, "parentId": "5dcd137b-76bd-4a5f-ae5c-5b629035500e", "handlers": {}, "visible": true} +{"id": "4cca0893-5ad7-4152-b805-5c87babc4dee", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "c6392876-7cfd-4680-8725-b04f43ff294f", "handlers": {}, "visible": true} +{"id": "b5915be5-774d-441a-a616-9f85e8e85c8e", "type": "button", "content": {"text": "Test context"}, "isCodeManaged": false, "position": 5, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822", "handlers": {"click": "test_context"}, "visible": true} +{"id": "6014485e-2418-42bd-a111-8683a8b87de4", "type": "text", "content": {"text": "Selected info: @{highlighted_context}"}, "isCodeManaged": false, "position": 6, "parentId": "2d326b15-da90-496e-86e8-7fdd4bcbe822", "handlers": {}, "visible": true} +{"id": "d99d976a-bdf0-4fc4-8379-4998e7a58440", "type": "text", "content": {"text": "UTF-8 state: @{utf\u0800}"}, "isCodeManaged": false, "position": 3, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {}, "visible": true} +{"id": "3991ac75-1219-49e7-a70d-6b782c27b4e0", "type": "button", "content": {"text": "Go to page \"inputTest\""}, "isCodeManaged": false, "position": 4, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "$goToPage_inputTest"}, "visible": true} +{"id": "add45c35-6a73-4f9a-bade-22fecd738967", "type": "button", "content": {"text": "Go to page \"content\""}, "isCodeManaged": false, "position": 5, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "$goToPage_content"}, "visible": true} +{"id": "6e912116-4cc5-4840-96b9-84106bee795d", "type": "button", "content": {"text": "File download", "icon": "download"}, "isCodeManaged": false, "position": 6, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "handle_file_download"}, "visible": true} +{"id": "272f0871-585e-4662-8ae1-a8cd6067b60b", "type": "button", "content": {"text": "Add notifications", "icon": "notifications"}, "isCodeManaged": false, "position": 7, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "add_notification"}, "visible": true} +{"id": "5c0df6e8-4dd8-4485-a244-8e9e7f4b4675", "type": "button", "content": {"text": "Increment", "icon": "arrow_upward"}, "isCodeManaged": false, "position": 9, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"click": "increment"}, "visible": true} +{"id": "15bd7d51-1a8c-4359-a892-253294684e1d", "type": "text", "content": {"text": "@{counter}"}, "isCodeManaged": false, "position": 0, "parentId": "84378aea-b64c-49a3-9539-f854532279ee", "handlers": {}, "visible": true} +{"id": "b3df6ccd-20d4-4761-b8ed-8eabcf95f4be", "type": "webcamcapture", "content": {"refreshRate": "200"}, "isCodeManaged": false, "position": 2, "parentId": "bb4d0e86-619e-4367-a180-be28ab6059f4", "handlers": {}, "visible": true} +{"id": "2e46c38b-6405-42ad-ad9c-d237a53a7d30", "type": "dropdowninput", "content": {"label": "Input Label", "options": "{\n \"ar\": \"Argentina\",\n \"uk\": \"United Kingdom\"\n}"}, "isCodeManaged": false, "position": 11, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"wf-option-change": "update_cities"}, "visible": true} +{"id": "20a4329c-4b14-4743-adaa-698ff0629aed", "type": "dropdowninput", "content": {"label": "Input Label", "options": "@{cities}"}, "isCodeManaged": false, "position": 12, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {}, "visible": true} +{"id": "242a8268-10d1-4e2c-96bd-f17ffe9e9b28", "type": "textinput", "content": {"label": "Input Label", "passwordMode": "yes"}, "isCodeManaged": false, "position": 13, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {}, "visible": true} +{"id": "nyo5vc79sb031yz8", "type": "button", "content": {"text": "Increment asynchronically"}, "isCodeManaged": false, "position": 10, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {"wf-click": "test_async_handler"}, "visible": true} +{"id": "3apnnxxg7pubdeqp", "type": "text", "content": {"text": "@{counter}"}, "isCodeManaged": false, "position": 8, "parentId": "9c30af6d-4ee5-4782-9169-0f361d67fa76", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-1-03796247-dec4-4671-85c9-16559789e013.jsonl b/tests/backend/testapp/.wf/components-page-1-03796247-dec4-4671-85c9-16559789e013.jsonl new file mode 100644 index 000000000..c0c03064f --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-1-03796247-dec4-4671-85c9-16559789e013.jsonl @@ -0,0 +1 @@ +{"id": "03796247-dec4-4671-85c9-16559789e013", "type": "page", "content": {"key": "emptyPage@{notaref}"}, "isCodeManaged": false, "position": 1, "parentId": "root", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-2-7730df5b-8731-4123-bacc-898e7347b124.jsonl b/tests/backend/testapp/.wf/components-page-2-7730df5b-8731-4123-bacc-898e7347b124.jsonl new file mode 100644 index 000000000..e550b639a --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-2-7730df5b-8731-4123-bacc-898e7347b124.jsonl @@ -0,0 +1,24 @@ +{"id": "7730df5b-8731-4123-bacc-898e7347b124", "type": "page", "content": {"key": "inputTest"}, "isCodeManaged": false, "position": 2, "parentId": "root", "handlers": {}, "visible": true} +{"id": "6010765e-9ac3-4570-84bf-913ae404e03a", "type": "section", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "visible": true} +{"id": "9bd98acc-b429-42da-afc0-5798089d5d59", "type": "textinput", "content": {"label": "Name"}, "isCodeManaged": false, "position": 0, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "b.name"}} +{"id": "d00db022-c880-46d7-9c14-4b62012ab747", "type": "textareainput", "content": {"label": "Summary", "rows": "5"}, "isCodeManaged": false, "position": 1, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "b.summary"}} +{"id": "c282ad31-2487-4296-a944-508c167c43be", "type": "numberinput", "content": {"label": "Number of pets"}, "isCodeManaged": false, "position": 2, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-number-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-number-change", "stateRef": "b.pet_count"}} +{"id": "362f4557-4643-4e93-b3ae-28607fceb2df", "type": "sliderinput", "content": {"label": "Review score", "minValue": "0", "maxValue": "100", "stepSize": "1"}, "isCodeManaged": false, "position": 7, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-number-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-number-change", "stateRef": "b.review_score"}} +{"id": "05f71732-4161-42d5-93f7-d49f66d82082", "type": "dateinput", "content": {"label": "Join date"}, "isCodeManaged": false, "position": 8, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-date-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-date-change", "stateRef": "b.join_date"}} +{"id": "d2269aeb-c84e-4075-8679-c6f168fecfac", "type": "radioinput", "content": {"label": "Default radio"}, "isCodeManaged": false, "position": 9, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-option-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-option-change", "stateRef": "b.default_radio"}} +{"id": "784288ff-80ec-4170-a3de-53e461ca1640", "type": "checkboxinput", "content": {"label": "Default checkbox"}, "isCodeManaged": false, "position": 5, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-options-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-options-change", "stateRef": "b.default_checkbox"}} +{"id": "b48bfd8f-4db7-400c-8bfc-d575ae164a5a", "type": "dropdowninput", "content": {"label": "Default dropdown"}, "isCodeManaged": false, "position": 10, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-option-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-option-change", "stateRef": "b.default_dropdown"}} +{"id": "e4cc004d-8183-4482-8159-1c8ac0318b26", "type": "fileinput", "content": {"label": "Files", "allowMultipleFiles": "yes"}, "isCodeManaged": false, "position": 11, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-file-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-file-change", "stateRef": "b.files"}} +{"id": "9b09d964-da68-4d47-851a-31f070ae1f2f", "type": "radioinput", "content": {"label": "Language", "options": "{\n \"en\": \"English\",\n \"sp\": \"Spanish\",\n \"pl\": \"Polish\"\n}"}, "isCodeManaged": false, "position": 3, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {"wf-option-change": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-option-change", "stateRef": "b.language"}} +{"id": "2ab19af7-1efa-4012-af35-f01c3d39a409", "type": "section", "content": {"title": "Payload"}, "isCodeManaged": false, "position": 3, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true} +{"id": "69e40d75-af2f-4015-9bce-6311587d796f", "type": "text", "content": {"text": "@{inspected_payload}"}, "isCodeManaged": false, "position": 0, "parentId": "2ab19af7-1efa-4012-af35-f01c3d39a409", "handlers": {}, "visible": true} +{"id": "c76ac5ff-8459-4421-9be2-faead4a17458", "type": "heading", "content": {"text": "DO NOT CHANGE FORM BELOW"}, "isCodeManaged": false, "position": 0, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true} +{"id": "2e10d41b-83b6-422b-a2c2-7e19b1834d45", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true} +{"id": "3eb28922-ef5c-47de-88aa-d100c503a2f5", "type": "section", "content": {"title": "Bindings"}, "isCodeManaged": false, "position": 5, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true} +{"id": "2893e4ee-2ce4-4357-8fa9-9eba8eb2f3f5", "type": "text", "content": {"text": "@{b}"}, "isCodeManaged": false, "position": 0, "parentId": "3eb28922-ef5c-47de-88aa-d100c503a2f5", "handlers": {}, "visible": true} +{"id": "5ee24c0d-e09e-4789-a9f9-111d5d581f11", "type": "textinput", "content": {"label": "Just Binding"}, "isCodeManaged": false, "position": 4, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true, "binding": {"eventType": "wf-change", "stateRef": "b.just_binding"}} +{"id": "21a9ec0b-708d-4f22-a52f-00b92fbc8f2a", "type": "message", "content": {"message": "@{b.message}"}, "isCodeManaged": false, "position": 7, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {}, "visible": true} +{"id": "fb2ff612-35d8-4b08-af75-0b895e19ed81", "type": "button", "content": {"text": "Submit form"}, "isCodeManaged": false, "position": 6, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {"click": "handle_form_submit"}, "visible": true} +{"id": "b92be113-3059-4fc9-b152-b6b2c1f0c969", "type": "fileinput", "content": {"label": "Input Label", "allowMultipleFiles": "yes"}, "isCodeManaged": false, "position": 8, "parentId": "7730df5b-8731-4123-bacc-898e7347b124", "handlers": {"wf-file-change": "file_change_handler"}, "visible": true} +{"id": "c9e4e0d9-771e-47c2-863a-55ce8a98bfa5", "type": "multiselectinput", "content": {"label": "Default checkbox mirrored in multiselect"}, "isCodeManaged": false, "position": 6, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {}, "visible": true, "binding": {"eventType": "wf-options-change", "stateRef": "b.default_checkbox"}} +{"id": "c1d1f478-3dbb-4009-94a0-9b92404348cd", "type": "selectinput", "content": {"label": "Language", "options": "{\n \"en\": \"English\",\n \"sp\": \"Spanish\",\n \"pl\": \"Polish\"\n}"}, "isCodeManaged": false, "position": 4, "parentId": "6010765e-9ac3-4570-84bf-913ae404e03a", "handlers": {}, "visible": true, "binding": {"eventType": "wf-option-change", "stateRef": "b.language"}} diff --git a/tests/backend/testapp/.wf/components-page-3-35986d56-3a1a-4ded-bb5c-b60c2046756f.jsonl b/tests/backend/testapp/.wf/components-page-3-35986d56-3a1a-4ded-bb5c-b60c2046756f.jsonl new file mode 100644 index 000000000..ed7c755d4 --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-3-35986d56-3a1a-4ded-bb5c-b60c2046756f.jsonl @@ -0,0 +1,19 @@ +{"id": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "type": "page", "content": {"key": "content"}, "isCodeManaged": false, "position": 3, "parentId": "root", "handlers": {}, "visible": true} +{"id": "d18393c5-08ee-4fe6-ab4c-cb1de961a905", "type": "text", "content": {"text": "Text"}, "isCodeManaged": false, "position": 0, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {"click": "payload_inspector"}, "visible": true} +{"id": "d1cbbd60-6f27-4fe9-af89-8f0493e5dcea", "type": "heading", "content": {"text": "Heading Text"}, "isCodeManaged": false, "position": 2, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "b87338f7-1879-4060-8c6b-7f813a94736e", "type": "dataframe", "content": {}, "isCodeManaged": false, "position": 5, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "42cce1fb-8bba-4175-a6e2-c8caf920f148", "type": "image", "content": {"caption": "Image Caption"}, "isCodeManaged": false, "position": 6, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {"click": "payload_inspector"}, "visible": true, "binding": {"eventType": "wf-click", "stateRef": "not-a-bindable-event"}} +{"id": "40ab3f09-37fb-4150-9196-5540044ef92a", "type": "vegalitechart", "content": {"spec": "@{altair_chart}"}, "isCodeManaged": false, "position": 8, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "92f59f46-e2ac-47a4-8b78-da20a24299bf", "type": "plotlygraph", "content": {}, "isCodeManaged": false, "position": 9, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "04927b91-a0c4-4555-9874-1f65542ffb9f", "type": "metric", "content": {"name": "My Metric", "metricValue": "1", "note": "-Low"}, "isCodeManaged": false, "position": 10, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "1a928b2a-4f6b-4a79-95a4-b93a6c2aaef2", "type": "message", "content": {"message": "+Hello"}, "isCodeManaged": false, "position": 13, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "d1628b64-28be-46a3-a9ab-3f232c0e9775", "type": "videoplayer", "content": {"src": "https://www.learningcontainer.com/download/sample-mp4-video-file-download-for-testing/?wpdmdl=2727&refresh=642fee645899d1680862820"}, "isCodeManaged": false, "position": 17, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "8d280fda-2b63-4830-85bb-836feff2faae", "type": "message", "content": {"message": "-Hello"}, "isCodeManaged": false, "position": 16, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "b6c2d765-1460-407a-8833-850cd9f2a9a0", "type": "message", "content": {"message": "!Hello"}, "isCodeManaged": false, "position": 15, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "0eda1376-932c-4a1e-a575-2fe66520e4ca", "type": "message", "content": {"message": "Hello"}, "isCodeManaged": false, "position": 14, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "919ce03d-bb5f-4adc-a93d-da66159ac977", "type": "metric", "content": {"name": "My Metric", "metricValue": "2", "note": ""}, "isCodeManaged": false, "position": 11, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "82a893ae-6328-44c4-9669-87797caedf7e", "type": "metric", "content": {"name": "My Metric", "metricValue": "3", "description": "The description of the metric.", "note": "+Great"}, "isCodeManaged": false, "position": 12, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "5cc43590-aed8-4a78-8ca9-9841ab1e11c2", "type": "heading", "content": {"text": "Heading Text", "headingType": "h1"}, "isCodeManaged": false, "position": 1, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "4a7a5121-da30-4c6b-8977-91a5848e3702", "type": "heading", "content": {"text": "Heading Text", "headingType": "h3"}, "isCodeManaged": false, "position": 3, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "6739dcac-5078-4acb-885b-2721e2efd994", "type": "heading", "content": {"text": "Heading Text", "headingType": "h4"}, "isCodeManaged": false, "position": 4, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} +{"id": "575542f1-bb18-429c-9d6a-706edc7512be", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 7, "parentId": "35986d56-3a1a-4ded-bb5c-b60c2046756f", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-4-88ea37a5-eb07-4740-ae42-a3eeeacca310.jsonl b/tests/backend/testapp/.wf/components-page-4-88ea37a5-eb07-4740-ae42-a3eeeacca310.jsonl new file mode 100644 index 000000000..3e7cd6b5b --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-4-88ea37a5-eb07-4740-ae42-a3eeeacca310.jsonl @@ -0,0 +1,20 @@ +{"id": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "type": "page", "content": {"key": "layoutTest"}, "isCodeManaged": false, "position": 4, "parentId": "root", "handlers": {}, "visible": true} +{"id": "c55caf0b-39c1-4fe5-8756-7506b3e3a19a", "type": "sidebar", "content": {}, "isCodeManaged": false, "position": -2, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} +{"id": "ca8f9355-c26b-44a6-85c1-46d2182a576e", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "c55caf0b-39c1-4fe5-8756-7506b3e3a19a", "handlers": {}, "visible": true} +{"id": "4d686ee6-ab59-41f0-8537-e91fed85af50", "type": "header", "content": {"text": "Header Text"}, "isCodeManaged": false, "position": 0, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} +{"id": "5190d792-4e80-40a9-b168-051018b12f3d", "type": "columns", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} +{"id": "d4d9fd0d-b347-42d9-9786-a9873cdd0912", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 0, "parentId": "5190d792-4e80-40a9-b168-051018b12f3d", "handlers": {}, "visible": true} +{"id": "c937bbfd-a510-432c-8e58-c50eecd5c67a", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 1, "parentId": "5190d792-4e80-40a9-b168-051018b12f3d", "handlers": {}, "visible": true} +{"id": "04acdbfb-2e72-45b3-9fad-367cda5164b5", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "c937bbfd-a510-432c-8e58-c50eecd5c67a", "handlers": {}, "visible": true} +{"id": "56074976-153a-4af3-ad65-fbd49da61f32", "type": "tabs", "content": {}, "isCodeManaged": false, "position": 3, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} +{"id": "c2b20427-0e95-4086-94f7-56df84fd4912", "type": "tab", "content": {"name": "Tab Name"}, "isCodeManaged": false, "position": 0, "parentId": "56074976-153a-4af3-ad65-fbd49da61f32", "handlers": {}, "visible": true} +{"id": "ad8bd11b-3f89-4839-b2d3-4c7f52c267bd", "type": "tab", "content": {"name": "Tab Name"}, "isCodeManaged": false, "position": 1, "parentId": "56074976-153a-4af3-ad65-fbd49da61f32", "handlers": {}, "visible": true} +{"id": "e702f506-8ec1-495e-9d8e-e488120b9a7b", "type": "tab", "content": {"name": "Tab Name"}, "isCodeManaged": false, "position": 2, "parentId": "56074976-153a-4af3-ad65-fbd49da61f32", "handlers": {}, "visible": true} +{"id": "c72a3364-03d9-4fb1-ac1f-13a1785e18c0", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "ad8bd11b-3f89-4839-b2d3-4c7f52c267bd", "handlers": {}, "visible": true} +{"id": "065e4f07-c707-4cc7-8cbe-143be5ab2486", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "e702f506-8ec1-495e-9d8e-e488120b9a7b", "handlers": {}, "visible": true} +{"id": "511bedb8-f856-451f-8ee4-a123d934b744", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "065e4f07-c707-4cc7-8cbe-143be5ab2486", "handlers": {}, "visible": true} +{"id": "5ab397b2-4283-44ab-ba9f-4cde3b422641", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 1, "parentId": "e702f506-8ec1-495e-9d8e-e488120b9a7b", "handlers": {}, "visible": true} +{"id": "ba15571d-4baa-4c65-b600-45af1c32ca75", "type": "horizontalstack", "content": {"contentHAlign": "start"}, "isCodeManaged": false, "position": 4, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} +{"id": "5a098fd8-1b39-41d9-881e-6cf8e47c4088", "type": "text", "content": {"text": "Text"}, "isCodeManaged": false, "position": 0, "parentId": "ba15571d-4baa-4c65-b600-45af1c32ca75", "handlers": {}, "visible": true} +{"id": "bf8db13c-c4b4-4a6d-bb98-247ed6d1da21", "type": "text", "content": {"text": "Text"}, "isCodeManaged": false, "position": 1, "parentId": "ba15571d-4baa-4c65-b600-45af1c32ca75", "handlers": {}, "visible": true} +{"id": "e4e5c10f-f5f3-44cb-bd3a-34e4f771829e", "type": "separator", "content": {}, "isCodeManaged": false, "position": 2, "parentId": "88ea37a5-eb07-4740-ae42-a3eeeacca310", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-5-28a2212b-bc58-4398-8a72-2554e5296490.jsonl b/tests/backend/testapp/.wf/components-page-5-28a2212b-bc58-4398-8a72-2554e5296490.jsonl new file mode 100644 index 000000000..75526c4da --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-5-28a2212b-bc58-4398-8a72-2554e5296490.jsonl @@ -0,0 +1,17 @@ +{"id": "28a2212b-bc58-4398-8a72-2554e5296490", "type": "page", "content": {"key": "otherTest"}, "isCodeManaged": false, "position": 5, "parentId": "root", "handlers": {}, "visible": true} +{"id": "b8b10d7e-932f-4a23-baf5-a7a944a4c4a4", "type": "button", "content": {"text": "Button Text"}, "isCodeManaged": false, "position": 0, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {"click": "payload_inspector"}, "visible": true} +{"id": "04915674-0afd-4f53-9dfd-301887e7e005", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"background\": \"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)\"\n}"}, "isCodeManaged": false, "position": 1, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {}, "visible": true} +{"id": "f2c445a4-9d3c-4c38-9fe3-cda02126d5d0", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"background\": \"linear-gradient(10deg, rgba(91,197,190,1) 0%, rgba(145,231,78,1) 100%)\"\n}"}, "isCodeManaged": false, "position": 0, "parentId": "04915674-0afd-4f53-9dfd-301887e7e005", "handlers": {}, "visible": true} +{"id": "1b3c8d83-36c1-4c74-9dcd-110160c16081", "type": "section", "content": {"title": "iframe"}, "isCodeManaged": false, "position": 0, "parentId": "f2c445a4-9d3c-4c38-9fe3-cda02126d5d0", "handlers": {}, "visible": true} +{"id": "7aa7e13b-31c4-4a60-be09-502da875eeda", "type": "html", "content": {"element": "iframe", "styles": "{\n \"outline\": \"none\",\n \"border\": \"none\",\n \"padding\": \"16px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"background\": \"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)\"\n}", "attrs": "{ \"src\": \"static/favicon.png\" }"}, "isCodeManaged": false, "position": 0, "parentId": "1b3c8d83-36c1-4c74-9dcd-110160c16081", "handlers": {}, "visible": true} +{"id": "056faae6-fc09-4482-b046-9818e62714c0", "type": "repeater", "content": {"keyVariable": "itemId", "valueVariable": "item"}, "isCodeManaged": false, "position": 2, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {}, "visible": true} +{"id": "f39b508d-6fec-465c-856c-c064179a46d0", "type": "html", "content": {"styles": "{\n \"padding\": \"16px\",\n \"min-height\": \"64px\",\n \"min-width\": \"64px\",\n \"border-radius\": \"8px\",\n \"background\": \"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)\"\n}"}, "isCodeManaged": false, "position": 0, "parentId": "056faae6-fc09-4482-b046-9818e62714c0", "handlers": {}, "visible": true} +{"id": "c2086d6c-22d7-4fc9-bb53-bd346c6ce711", "type": "text", "content": {"text": "@{item}"}, "isCodeManaged": false, "position": 0, "parentId": "f39b508d-6fec-465c-856c-c064179a46d0", "handlers": {}, "visible": true} +{"id": "b97d32ca-49f5-47b2-ae2a-a61e757f395a", "type": "timer", "content": {"intervalMs": "5000"}, "isCodeManaged": false, "position": 3, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {"wf-tick": "handle_timer_tick", "wf-not-a-real-event": "handle_not_a_real_function"}, "visible": true} +{"id": "f4076626-ccb1-46d9-baf8-265fd5bd11bf", "type": "text", "content": {"text": "@{counter}"}, "isCodeManaged": false, "position": 5, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {}, "visible": true} +{"id": "30f4990c-256c-4527-b6ea-65033126bfa9", "type": "text", "content": {"text": "Webcam supports multiple channels"}, "isCodeManaged": false, "position": 6, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {}, "visible": true} +{"id": "5862cc96-b231-4da5-8226-9814dd0bfd62", "type": "button", "content": {"text": "Inspect Payload and Context"}, "isCodeManaged": false, "position": 1, "parentId": "f39b508d-6fec-465c-856c-c064179a46d0", "handlers": {"click": "payload_inspector"}, "visible": true} +{"id": "0f68ff82-a59a-41fc-9f8a-cad8ef51dce0", "type": "timer", "content": {"intervalMs": "4000"}, "isCodeManaged": false, "position": 4, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {"wf-tick": "handle_timer_tick"}, "visible": true} +{"id": "b5a11459-735d-463f-ad7a-cafb2de7c8ae", "type": "image", "content": {"src": "@{webcam_image}", "caption": "Image Caption"}, "isCodeManaged": false, "position": 7, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {}, "visible": true} +{"id": "9090bad3-2584-46e7-a937-a0afc81f2c81", "type": "webcamcapture", "content": {"refreshRate": "200"}, "isCodeManaged": false, "position": 8, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {"wf-webcam": "handle_webcam"}, "visible": true} +{"id": "232d749a-5e0c-4802-bbe1-f8cae06db112", "type": "button", "content": {"text": "Bad event handler"}, "isCodeManaged": false, "position": 9, "parentId": "28a2212b-bc58-4398-8a72-2554e5296490", "handlers": {"click": "bad_event_handler"}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-6-4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83.jsonl b/tests/backend/testapp/.wf/components-page-6-4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83.jsonl new file mode 100644 index 000000000..13b0a18da --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-6-4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83.jsonl @@ -0,0 +1,4 @@ +{"id": "4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83", "type": "page", "content": {}, "isCodeManaged": false, "position": 6, "parentId": "root", "handlers": {}, "visible": true} +{"id": "0cd59329-29c8-4887-beee-39794065221e", "type": "text", "content": {"text": "The counter is @{counter}"}, "isCodeManaged": false, "position": 0, "parentId": "4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83", "handlers": {}, "visible": true} +{"id": "f811ca14-8915-443d-8dd3-77ae69fb80f4", "type": "repeater", "content": {"repeaterObject": "@{prog_languages}", "keyVariable": "itemId", "valueVariable": "item"}, "isCodeManaged": false, "position": 1, "parentId": "4b6f14b0-b2d9-43e7-8aba-8d3e939c1f83", "handlers": {}, "visible": true} +{"id": "2e688107-f865-419b-a07b-95103197e3fd", "type": "text", "content": {"text": "The id is @{itemId} and the name is @{item.name}"}, "isCodeManaged": false, "position": 0, "parentId": "f811ca14-8915-443d-8dd3-77ae69fb80f4", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-page-7-06c660f8-e3d6-4bdd-92be-64cb080ee933.jsonl b/tests/backend/testapp/.wf/components-page-7-06c660f8-e3d6-4bdd-92be-64cb080ee933.jsonl new file mode 100644 index 000000000..9e95bb4a6 --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-7-06c660f8-e3d6-4bdd-92be-64cb080ee933.jsonl @@ -0,0 +1,14 @@ +{"id": "06c660f8-e3d6-4bdd-92be-64cb080ee933", "type": "page", "content": {"key": "repeater2", "emptinessColor": "#f1ece9"}, "isCodeManaged": false, "position": 7, "parentId": "root", "handlers": {}, "visible": true} +{"id": "d15b9cf1-7e79-4ee5-9f0d-7c38c6b6c070", "type": "repeater", "content": {"repeaterObject": "@{articles}", "keyVariable": "", "valueVariable": ""}, "isCodeManaged": false, "position": 1, "parentId": "06c660f8-e3d6-4bdd-92be-64cb080ee933", "handlers": {}, "visible": true} +{"id": "9f589947-0ea9-4a70-9d57-4ae52543be42", "type": "section", "content": {"title": ""}, "isCodeManaged": false, "position": 0, "parentId": "d15b9cf1-7e79-4ee5-9f0d-7c38c6b6c070", "handlers": {}, "visible": true} +{"id": "2b3a1237-8884-4fc7-a7a7-fdc51511e6f2", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "9f589947-0ea9-4a70-9d57-4ae52543be42", "handlers": {}, "visible": true} +{"id": "faf077b6-c62f-4a5a-b24e-4590efcae11f", "type": "column", "content": {"width": "0.25"}, "isCodeManaged": false, "position": 0, "parentId": "2b3a1237-8884-4fc7-a7a7-fdc51511e6f2", "handlers": {}, "visible": true} +{"id": "b36b1692-0358-4594-b641-fe6addbf91b5", "type": "image", "content": {"caption": "", "src": "static/@{itemId}.jpg"}, "isCodeManaged": false, "position": 0, "parentId": "faf077b6-c62f-4a5a-b24e-4590efcae11f", "handlers": {}, "visible": true} +{"id": "b87ff7c9-9849-401a-a89b-85d8e9e6f628", "type": "column", "content": {"width": "1"}, "isCodeManaged": false, "position": 2, "parentId": "2b3a1237-8884-4fc7-a7a7-fdc51511e6f2", "handlers": {}, "visible": true} +{"id": "ff144a8c-42df-426b-8eb8-928eacb311f4", "type": "text", "content": {"text": "**Type**: @{item.type}\n**Colour**: @{item.colour}\n", "useMarkdown": "yes"}, "isCodeManaged": false, "position": 1, "parentId": "b87ff7c9-9849-401a-a89b-85d8e9e6f628", "handlers": {}, "visible": true} +{"id": "ee336cd4-8127-40ff-a6e7-0689950655a0", "type": "button", "content": {"text": "Add to my list", "buttonShadow": "0px 3px 16px -9px #000000", "buttonColor": "#5fcd37", "buttonTextColor": "#ffffff"}, "isCodeManaged": false, "position": 2, "parentId": "b87ff7c9-9849-401a-a89b-85d8e9e6f628", "handlers": {"click": "handle_add_to_list"}, "visible": true} +{"id": "3332d2f4-f70e-4354-981b-dfda3a76ae34", "type": "heading", "content": {"text": "@{itemId}"}, "isCodeManaged": false, "position": 0, "parentId": "b87ff7c9-9849-401a-a89b-85d8e9e6f628", "handlers": {}, "visible": true} +{"id": "dd335761-033a-47eb-9ddf-c3e3d25ba8a8", "type": "separator", "content": {}, "isCodeManaged": false, "position": 1, "parentId": "2b3a1237-8884-4fc7-a7a7-fdc51511e6f2", "handlers": {}, "visible": true} +{"id": "cd02f864-b72a-44fe-bd52-1929c0fd6c7f", "type": "text", "content": {"text": "You've added the following items to your list: @{order_list}"}, "isCodeManaged": false, "position": 2, "parentId": "06c660f8-e3d6-4bdd-92be-64cb080ee933", "handlers": {}, "visible": true} +{"id": "abaa1903-e58e-4a67-92ef-d7065f1a7fcf", "type": "header", "content": {"text": "FOOD SELECTOR"}, "isCodeManaged": false, "position": 0, "parentId": "06c660f8-e3d6-4bdd-92be-64cb080ee933", "handlers": {}, "visible": true} +{"id": "af23e21b-b8ff-47d3-a72f-83eb53f5f452", "type": "textinput", "content": {"label": "Input Label"}, "isCodeManaged": false, "position": 3, "parentId": "06c660f8-e3d6-4bdd-92be-64cb080ee933", "handlers": {}, "visible": "", "binding": {"eventType": "wf-change", "stateRef": "name"}} diff --git a/tests/backend/testapp/.wf/components-page-8-aade8074-13be-4e11-a405-a71b8138e6ae.jsonl b/tests/backend/testapp/.wf/components-page-8-aade8074-13be-4e11-a405-a71b8138e6ae.jsonl new file mode 100644 index 000000000..1295b4560 --- /dev/null +++ b/tests/backend/testapp/.wf/components-page-8-aade8074-13be-4e11-a405-a71b8138e6ae.jsonl @@ -0,0 +1,63 @@ +{"id": "aade8074-13be-4e11-a405-a71b8138e6ae", "type": "page", "content": {}, "isCodeManaged": false, "position": 8, "parentId": "root", "handlers": {}, "visible": true} +{"id": "35f579dd-4205-413a-9c4f-1caf015a598a", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 1, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "4c65268c-b536-4671-8081-c69be3e84161", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 2, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "436ba1be-1194-4da9-9eb3-a10e9ec019f1", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 5, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "7a89f965-8c1d-473c-a565-947be62faa43", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 45, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "e2d3c1be-c43e-4b8a-84a8-90649da0b55e", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 6, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "ddbedb50-5fbe-43a3-b221-8f7d59c617da", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 7, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "21dda1e9-a972-4f74-972d-d13f5e2941de", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 8, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "6ee3de2e-7333-469f-9ced-1e08d9231117", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 9, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "f0659dad-aa37-457e-80fe-02b900f38694", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 10, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "380f8a0b-38f3-414a-ab9f-7034629f5e8e", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 11, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "e43471a7-2e58-437f-8daf-489b221b464a", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 12, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "a16cf781-114f-4e74-a09a-578a3e2a3fcd", "type": "header", "content": {"text": "Header Text"}, "isCodeManaged": false, "position": 13, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "71500567-d3db-4d67-89aa-86ea8fecc4ed", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 14, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "0e8d0885-954a-4b95-9cfd-0a8ed2ed8683", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 15, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "a039b488-a523-42bc-84d0-f9b3f5185052", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 16, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "8582c124-474c-4da5-80c5-16bca90f4d98", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 17, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "d88e0ff3-4acb-474c-b37c-9cd7ea51fd26", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 18, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "de7a750f-6c88-4fbb-8962-93714b6be485", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 19, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "110625bc-bad4-4b44-b20f-51339554d77b", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 20, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "eb568d28-e6de-4deb-978b-a10d6cb3c454", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 21, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "4a94898f-01b2-4424-8db9-9ed75e788611", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 22, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "f8136c45-f868-4858-928a-f007f9a7dfbe", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 23, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "1a8ca9b4-afc5-4055-9709-bd27cd7fd7aa", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 24, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "6a308e3d-c5a0-400e-9036-6183aecac714", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 25, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "a71a65fc-8710-40fb-8410-6c676072dab5", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 26, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "ff213e0d-4e33-494d-8765-6738010ea932", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 27, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "25f8e06e-5a86-4e5c-afbc-6191c4146bd8", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 28, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "48cb52fa-bb6a-43e7-aa7a-cbc0b30156b1", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 29, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "7d914a22-e7aa-4340-9b88-36423a5566a3", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 30, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "bcbae34f-72fd-40b3-8678-d4b986b47cd5", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 31, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "574ec17c-ed69-49a6-b991-29354b8a8a76", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 32, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "27a21b92-0ed0-4044-8eb4-69979a285e2a", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 33, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "c759135c-72ed-43b8-ab91-8bce748dcd58", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 35, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "210f45a4-c8da-48b2-a2ff-bca06ca7f8a3", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 36, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "0bdf78ac-2824-4116-8e14-af2c363c3b45", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 37, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "a4a6316d-5fb1-47e2-976b-97265533fc97", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 38, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "aa8ab024-25a5-4d33-82cf-f20146e9cf28", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 0, "parentId": "4c65268c-b536-4671-8081-c69be3e84161", "handlers": {}, "visible": true} +{"id": "1c5b7db1-f8fa-4c7b-9daf-db60045fd16e", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 39, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "95690cbc-8d71-4079-936e-c625250fa337", "type": "header", "content": {"text": "Header Text"}, "isCodeManaged": false, "position": 41, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "857dc6fc-d6f7-4dd1-bbc3-6f0dea011d54", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 42, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "aac79665-3341-4784-a105-433baf45dde3", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 43, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "d0f010ac-2048-49f3-91ff-e17e145298ed", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 44, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "b3aa5f2f-d952-4021-a506-7a4515388580", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 46, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "d07b8382-dca7-4061-b0ca-22edd43e06b1", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 47, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "9005a1fc-c560-4ca4-9626-b660031c9c8e", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 48, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "440de4a5-b901-4626-a282-3aee83a007c5", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 49, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "2e8069dd-0017-42f3-a13b-44e19f132c4f", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 50, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "cab6894d-98e1-426f-876c-ca1c81bb7a30", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 51, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "8a937df7-c974-455e-b2bc-40445621ef40", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 52, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "16d1a673-48f3-47de-a875-1053ffb58e65", "type": "videoplayer", "content": {}, "isCodeManaged": false, "position": 58, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "58807828-af04-434d-9a0a-6419ced716d7", "type": "message", "content": {}, "isCodeManaged": false, "position": 53, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "23e7a993-1344-4c3a-a65f-87b72b9d72a3", "type": "vegalitechart", "content": {}, "isCodeManaged": false, "position": 54, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "47dd20f8-4477-4a7d-935a-c2615aaa684d", "type": "image", "content": {"caption": "Image Caption"}, "isCodeManaged": false, "position": 55, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "f0e45dc7-a752-49cd-8315-79cce246f8db", "type": "dataframe", "content": {}, "isCodeManaged": false, "position": 56, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "2ca1282f-df91-42cd-bb95-9ece65df27ae", "type": "metric", "content": {"note": "+Pass"}, "isCodeManaged": false, "position": 57, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "04da32e4-11c9-400f-ba44-3be79c760ca7", "type": "tabs", "content": {}, "isCodeManaged": false, "position": 59, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "10e93acf-3b13-40a8-ac8d-8222bfb4d7ca", "type": "columns", "content": {}, "isCodeManaged": false, "position": 0, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "6f0e9441-217c-4b1d-a6cb-2201eeaee406", "type": "header", "content": {"text": "Header Text"}, "isCodeManaged": false, "position": 34, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "1faaa29d-96d3-404a-b8f5-7d392cd55177", "type": "section", "content": {"title": "Section Title"}, "isCodeManaged": false, "position": 40, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "a34cba3c-0eb6-4bc8-bd69-67ee80ee6005", "type": "sidebar", "content": {}, "isCodeManaged": false, "position": -2, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "00f02bed-2113-4449-8af3-0f2c76a6bca4", "type": "checkboxinput", "content": {"label": "Input Label", "orientation": "horizontal"}, "isCodeManaged": false, "position": 4, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} +{"id": "2a413447-4d40-4ade-8cf0-639f292ff353", "type": "radioinput", "content": {"label": "Input Label", "orientation": "horizontal"}, "isCodeManaged": false, "position": 3, "parentId": "aade8074-13be-4e11-a405-a71b8138e6ae", "handlers": {}, "visible": true} diff --git a/tests/backend/testapp/.wf/components-root.jsonl b/tests/backend/testapp/.wf/components-root.jsonl new file mode 100644 index 000000000..25add7335 --- /dev/null +++ b/tests/backend/testapp/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0} \ No newline at end of file diff --git a/tests/backend/testapp/.wf/metadata.json b/tests/backend/testapp/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/tests/backend/testapp/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/tests/backend/testbasicauth/.wf/components-root.jsonl b/tests/backend/testbasicauth/.wf/components-root.jsonl new file mode 100644 index 000000000..25add7335 --- /dev/null +++ b/tests/backend/testbasicauth/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App"}, "isCodeManaged": false, "position": 0} \ No newline at end of file diff --git a/tests/backend/testbasicauth/.wf/metadata.json b/tests/backend/testbasicauth/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/tests/backend/testbasicauth/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/tests/backend/testbasicauth/ui.json b/tests/backend/testbasicauth/ui.json deleted file mode 100644 index 25b939367..000000000 --- a/tests/backend/testbasicauth/ui.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "metadata": { - "writer_version": "0.5.0" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App" - }, - "isCodeManaged": false, - "position": 0 - } - } -} diff --git a/tests/backend/testmultiapp/app1/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/tests/backend/testmultiapp/app1/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..a85b22b31 --- /dev/null +++ b/tests/backend/testmultiapp/app1/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,7 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact", "emptinessColor": "#e9eef1"}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "position": 0, "handlers": {}, "visible": true} +{"id": "28d3885b-0fb8-4d41-97c6-978540015431", "type": "section", "content": {"title": "", "snapMode": "no", "containerShadow": "0px 4px 11px -12px #000000"}, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "position": 1, "handlers": {}, "visible": true} +{"id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "type": "columns", "content": {}, "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", "position": 0, "handlers": {}, "visible": true} +{"id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "type": "column", "content": {"title": "", "width": "1", "verticalAlignment": "center", "horizontalAlignment": "center"}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 2, "handlers": {}, "visible": true} +{"id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "type": "column", "content": {"width": "1"}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 0, "handlers": {}, "visible": true} +{"id": "d4a71819-7444-4083-a1c7-7995452a7abf", "type": "separator", "content": {}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 1, "handlers": {}, "visible": true} diff --git a/tests/backend/testmultiapp/app1/.wf/components-root.jsonl b/tests/backend/testmultiapp/app1/.wf/components-root.jsonl new file mode 100644 index 000000000..07e181bac --- /dev/null +++ b/tests/backend/testmultiapp/app1/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App 1"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/backend/testmultiapp/app1/.wf/metadata.json b/tests/backend/testmultiapp/app1/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/tests/backend/testmultiapp/app1/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/tests/backend/testmultiapp/app1/ui.json b/tests/backend/testmultiapp/app1/ui.json deleted file mode 100644 index 915fec574..000000000 --- a/tests/backend/testmultiapp/app1/ui.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "metadata": { - "writer_version": "0.1.4" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App 1" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact", - "emptinessColor": "#e9eef1" - }, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "@{my_app.title}" - }, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "position": 0, - "handlers": {}, - "visible": true - }, - "28d3885b-0fb8-4d41-97c6-978540015431": { - "id": "28d3885b-0fb8-4d41-97c6-978540015431", - "type": "section", - "content": { - "title": "", - "snapMode": "no", - "containerShadow": "0px 4px 11px -12px #000000" - }, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "position": 1, - "handlers": {}, - "visible": true - }, - "9556c0e3-8584-4ac9-903f-908a775a33ec": { - "id": "9556c0e3-8584-4ac9-903f-908a775a33ec", - "type": "button", - "content": { - "text": " Increment", - "icon": "arrow-up" - }, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "position": 1, - "handlers": { - "click": "increment" - }, - "visible": true - }, - "51d1554e-1b88-461c-9353-1419cba0053a": { - "id": "51d1554e-1b88-461c-9353-1419cba0053a", - "type": "button", - "content": { - "text": "Decrement", - "icon": "arrow-down" - }, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "position": 0, - "handlers": { - "click": "decrement" - }, - "visible": true - }, - "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117": { - "id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "type": "horizontalstack", - "content": { - "alignment": "left" - }, - "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "position": 0, - "handlers": {}, - "visible": true - }, - "172a14df-f73a-44fa-8fb1-e8648e7d32d2": { - "id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", - "type": "metric", - "content": { - "metricValue": "@{counter}", - "note": "@{message}", - "name": "Counter" - }, - "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "position": 0, - "handlers": {}, - "visible": true - }, - "d4a5e62c-c6fe-49c4-80d4-33862af8727d": { - "id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "type": "columns", - "content": {}, - "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", - "position": 0, - "handlers": {}, - "visible": true - }, - "f3777e75-3659-4d44-8ef7-aeec0d06855b": { - "id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "type": "column", - "content": { - "title": "", - "width": "1", - "verticalAlignment": "center", - "horizontalAlignment": "center" - }, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 2, - "handlers": {}, - "visible": true - }, - "c2519671-9ce7-44e7-ba4e-b0efda9cb20e": { - "id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "type": "column", - "content": { - "width": "1" - }, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 0, - "handlers": {}, - "visible": true - }, - "d4a71819-7444-4083-a1c7-7995452a7abf": { - "id": "d4a71819-7444-4083-a1c7-7995452a7abf", - "type": "separator", - "content": {}, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 1, - "handlers": {}, - "visible": true - } - } -} \ No newline at end of file diff --git a/tests/backend/testmultiapp/app2/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl b/tests/backend/testmultiapp/app2/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl new file mode 100644 index 000000000..a85b22b31 --- /dev/null +++ b/tests/backend/testmultiapp/app2/.wf/components-page-0-c0f99a9e-5004-4e75-a6c6-36f17490b134.jsonl @@ -0,0 +1,7 @@ +{"id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "type": "page", "content": {"pageMode": "compact", "emptinessColor": "#e9eef1"}, "parentId": "root", "position": 0, "handlers": {}, "visible": true} +{"id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", "type": "header", "content": {"text": "@{my_app.title}"}, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "position": 0, "handlers": {}, "visible": true} +{"id": "28d3885b-0fb8-4d41-97c6-978540015431", "type": "section", "content": {"title": "", "snapMode": "no", "containerShadow": "0px 4px 11px -12px #000000"}, "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", "position": 1, "handlers": {}, "visible": true} +{"id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "type": "columns", "content": {}, "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", "position": 0, "handlers": {}, "visible": true} +{"id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", "type": "column", "content": {"title": "", "width": "1", "verticalAlignment": "center", "horizontalAlignment": "center"}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 2, "handlers": {}, "visible": true} +{"id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", "type": "column", "content": {"width": "1"}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 0, "handlers": {}, "visible": true} +{"id": "d4a71819-7444-4083-a1c7-7995452a7abf", "type": "separator", "content": {}, "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", "position": 1, "handlers": {}, "visible": true} diff --git a/tests/backend/testmultiapp/app2/.wf/components-root.jsonl b/tests/backend/testmultiapp/app2/.wf/components-root.jsonl new file mode 100644 index 000000000..b62641e27 --- /dev/null +++ b/tests/backend/testmultiapp/app2/.wf/components-root.jsonl @@ -0,0 +1 @@ +{"id": "root", "type": "root", "content": {"appName": "My App 2"}, "parentId": null, "position": 0, "handlers": {}, "visible": true} \ No newline at end of file diff --git a/tests/backend/testmultiapp/app2/.wf/metadata.json b/tests/backend/testmultiapp/app2/.wf/metadata.json new file mode 100644 index 000000000..1f76abe5a --- /dev/null +++ b/tests/backend/testmultiapp/app2/.wf/metadata.json @@ -0,0 +1,3 @@ +{ + "writer_version": "0.7.0rc2" +} \ No newline at end of file diff --git a/tests/backend/testmultiapp/app2/ui.json b/tests/backend/testmultiapp/app2/ui.json deleted file mode 100644 index ef7c69ea0..000000000 --- a/tests/backend/testmultiapp/app2/ui.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "metadata": { - "writer_version": "0.1.4" - }, - "components": { - "root": { - "id": "root", - "type": "root", - "content": { - "appName": "My App 2" - }, - "parentId": null, - "position": 0, - "handlers": {}, - "visible": true - }, - "c0f99a9e-5004-4e75-a6c6-36f17490b134": { - "id": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "type": "page", - "content": { - "pageMode": "compact", - "emptinessColor": "#e9eef1" - }, - "parentId": "root", - "position": 0, - "handlers": {}, - "visible": true - }, - "bebc5fe9-63a7-46a7-b0fa-62303555cfaf": { - "id": "bebc5fe9-63a7-46a7-b0fa-62303555cfaf", - "type": "header", - "content": { - "text": "@{my_app.title}" - }, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "position": 0, - "handlers": {}, - "visible": true - }, - "28d3885b-0fb8-4d41-97c6-978540015431": { - "id": "28d3885b-0fb8-4d41-97c6-978540015431", - "type": "section", - "content": { - "title": "", - "snapMode": "no", - "containerShadow": "0px 4px 11px -12px #000000" - }, - "parentId": "c0f99a9e-5004-4e75-a6c6-36f17490b134", - "position": 1, - "handlers": {}, - "visible": true - }, - "9556c0e3-8584-4ac9-903f-908a775a33ec": { - "id": "9556c0e3-8584-4ac9-903f-908a775a33ec", - "type": "button", - "content": { - "text": " Increment", - "icon": "arrow-up" - }, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "position": 1, - "handlers": { - "click": "increment" - }, - "visible": true - }, - "51d1554e-1b88-461c-9353-1419cba0053a": { - "id": "51d1554e-1b88-461c-9353-1419cba0053a", - "type": "button", - "content": { - "text": "Decrement", - "icon": "arrow-down" - }, - "parentId": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "position": 0, - "handlers": { - "click": "decrement" - }, - "visible": true - }, - "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117": { - "id": "0d05bc9f-1655-4d0b-bc9b-c2f4c71a5117", - "type": "horizontalstack", - "content": { - "alignment": "left" - }, - "parentId": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "position": 0, - "handlers": {}, - "visible": true - }, - "172a14df-f73a-44fa-8fb1-e8648e7d32d2": { - "id": "172a14df-f73a-44fa-8fb1-e8648e7d32d2", - "type": "metric", - "content": { - "metricValue": "@{counter}", - "note": "@{message}", - "name": "Counter" - }, - "parentId": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "position": 0, - "handlers": {}, - "visible": true - }, - "d4a5e62c-c6fe-49c4-80d4-33862af8727d": { - "id": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "type": "columns", - "content": {}, - "parentId": "28d3885b-0fb8-4d41-97c6-978540015431", - "position": 0, - "handlers": {}, - "visible": true - }, - "f3777e75-3659-4d44-8ef7-aeec0d06855b": { - "id": "f3777e75-3659-4d44-8ef7-aeec0d06855b", - "type": "column", - "content": { - "title": "", - "width": "1", - "verticalAlignment": "center", - "horizontalAlignment": "center" - }, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 2, - "handlers": {}, - "visible": true - }, - "c2519671-9ce7-44e7-ba4e-b0efda9cb20e": { - "id": "c2519671-9ce7-44e7-ba4e-b0efda9cb20e", - "type": "column", - "content": { - "width": "1" - }, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 0, - "handlers": {}, - "visible": true - }, - "d4a71819-7444-4083-a1c7-7995452a7abf": { - "id": "d4a71819-7444-4083-a1c7-7995452a7abf", - "type": "separator", - "content": {}, - "parentId": "d4a5e62c-c6fe-49c4-80d4-33862af8727d", - "position": 1, - "handlers": {}, - "visible": true - } - } -} \ No newline at end of file diff --git a/tests/backend/testobsoleteapp/main.py b/tests/backend/testobsoleteapp/main.py new file mode 100644 index 000000000..f880abb72 --- /dev/null +++ b/tests/backend/testobsoleteapp/main.py @@ -0,0 +1,8 @@ +import writer as wf + +# STATE INIT + + +initial_state = wf.init_state({ + "counter": 0, +}) diff --git a/tests/backend/testapp/ui.json b/tests/backend/testobsoleteapp/ui.json similarity index 100% rename from tests/backend/testapp/ui.json rename to tests/backend/testobsoleteapp/ui.json