Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add a browser/PWA version

オープン
#894 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, wasm

調査の方向性

まず、提案されている2つのアプローチである 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:

Screenshot of Workbench running in Chrome

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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

workbenchdev/Workbench のほかの issue

workbenchdev/Workbench の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。