Add a browser/PWA version
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, wasm
- 领域
- desktop-dev, web-dev
调研方向
首先比较两种提议的方案 Broadway 和 Greenfield,并阅读 Greenfield SDK 的相关资料及其在 example-applications.json 中的条目。确定基于浏览器的 Workbench playground 的范围和托管要求;只有在就实施路径达成一致,而不只是完成一次服务端实验时,才算完成。
由索引模型根据 Issue 内容生成。
描述
Many other prototyping tools for UI frameworks have the option to run in the browser to make it easier to share examples or work without setting up a local development environment, even if the target primarily native platforms:
It would be great if it were possible to create a similar web-based playground for Workbench, whether for docs or examples, or just for experimental. There are two ways of achieving this with different complexities:
- Using Broadway. This way, an instance of Workbench can run on a server somewhere, and be exposed via the HTML/Canvas GTK renderer. This works well for simple examples, but more advanced usecases (OpenGL, embedding, Webviews, Videos etc.) don't work.
- Using Greenfield. This is a full Wayland compositor that runs in your browser, and can already run the Flatpak version of Workbench out of the box. It can either run apps with Wayland clients attaching natively on the browser site (through WebAssembly), or on the server side (with the raw Flatpak version). From my testing, this works extremely well; even the GTK inspector, video playback, webviews, and OpenGL all work. Also runs in Chrome, Firefox and Safari/GNOME Web without problems.
Here is Workbench, rendering a WebKit webview, running in the browser with the second method:
Which was as simple as setting up a new app in Greenfield's example-applications.json:
"/workbench": {
"name": "Workbench",
"executable": "flatpak",
"args": ["run", "re.sonny.Workbench"],
"env": {}
},
Ofc, this would require a server (not just a CDN) to actually host the app similarly to how Broadway would require a server. A better way would be to compile Workbench using the Greenfield SDK, which would mean that it could run natively in the browser using Wasm, but I'm fairly certain that this would require some porting work. The Greenfield talk from FOSDEM 2024 contains a lot of interesting info on how this works internally.
- 主要语言
- JavaScript
- 星标
- 846
- 派生
- 91
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
workbenchdev/Workbench 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
workbenchdev/Workbench#1028 · 11 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
workbenchdev/Workbench#1019 ·
-
难度 4/5 3-5 天 新手友好度 30/100
workbenchdev/Workbench#1014 ·
-
难度 4/5 3-5 天 新手友好度 35/100
workbenchdev/Workbench#1007 · 1 条评论 ·
-
How could I work with multiple user interfaces (e.g. multiple .ui files, or multiple blueprints)?未关闭
难度 5/5 一周以上 新手友好度 25/100
workbenchdev/Workbench#1006 · 1 条评论 · 1 个 reaction ·
查看 workbenchdev/Workbench 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
factory-active factory-automatic harness/claude-code task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 1/5 1-3 小时 新手友好度 85/100
zmo2s/agent-toolbox#23 ·