Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add a browser/PWA version

Aperta
#894 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, wasm

Direzione di ricerca

Inizia confrontando i due approcci proposti, Broadway e Greenfield, e leggi il materiale relativo a Greenfield SDK e la relativa voce in example-applications.json. Determina l’ambito e i requisiti di hosting per un playground Workbench basato sul browser; il lavoro sarà considerato completato quando sarà stato concordato un percorso di implementazione, non quando sarà stato realizzato soltanto un esperimento lato server.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
846
Fork
91
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di workbenchdev/Workbench

Tutte le issue di workbenchdev/Workbench

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.