Desktop-PWA funktioniert mit Discourse!

Per Hands-On with Microsoft's New Edge Browser Built on Chromium - Thurrott.com

When it comes to features, Edge has the one critical item that always kept me crawling back to Chrome. If you are on a webpage, you can easily turn it into an app, by clicking the three dots in the top right and clicking install app. This is huge, as it allows me to turn Google Calendar, Tweetdeck, and a few other pages into applications on my desktop that makes my workflow, a lot easier.

:thinking: we should definitely whitelist all Chrome based browsers @falco

8 „Gefällt mir“

Looks like Chrome Canary is experimenting with a more in your face install button:

https://twitter.com/henrylim96/status/1110916077519699970

Here is it in Meta when the service worker is working:

13 „Gefällt mir“

Niiiice. We should definitely get this working on Chrome. I like it.

6 „Gefällt mir“

We want to get this working, but the last time we tried with the “You are offline” page wasn’t a great experience. Also we had a lot of suggestions about making reading Discourse possible when you are offline.

Using some libraries from GitHub - GoogleChrome/workbox: 📦 Workbox: JavaScript libraries for Progressive Web Apps · GitHub I was able to:

  • Remove the “You are offline” page

  • Make Discourse fallback to cache when a network request fail aka Discourse will allow offline browsing of every previously visited page.

  • Get a perfect score in the PWA Lighthouse audit:

  • Get the “Install Site” on the Desktop working (availiable in Chrome canary for now, will land in stable around August)

    image

Technical Details

The changes are pending in this branch: https://github.com/discourse/discourse/compare/offline

A demo site is running at https://discourse-workbox.muito.ninja/

27 „Gefällt mir“

Here is a demo of Discourse offline browsing on iPad

https://giant.gfycat.com/BlushingGreedyGiantschnauzer.mp4

14 „Gefällt mir“

Can you create topics offline that get synced with the server when the device is back online?

The current changes only affect GET requests, so it will make you able to use the composer, if you ever did it while online.

Discourse already keeps submitting a topic in a persistent “Saving” blue bar, and this doesn’t touch that request, so it should keep the current behavior.

However, getting Discourse to work totally in write mode while offline would require a lot more work and be a long term project involving multiple people. That is not the scope here, which is just enabling installs in Desktop.

9 „Gefällt mir“

cc @falco

In Chrome 76, we’re making it easier for users to install Progressive Web Apps on the desktop by adding an install button to the omnibox.

16 „Gefällt mir“

Okay, this is live in Meta for testing now. Please report any crazyness.

Here is Meta install:

6 „Gefällt mir“

Is there a flag we can set to tinker with this on our own installations?

4 „Gefällt mir“

It’s in the same branch as always here. You could deploy from that branch but it is a lot behind master currently. I can rebase it to master, but I don’t recommend messing with this until it’s proven stable here.

Another cool thing, if you try to use the pwa with a cold cache:

13 „Gefällt mir“

Dies ist live auf dem neuesten Discourse tests-passed.

Bitte meldet jeden bug in neuen Themen.

12 „Gefällt mir“

Chrome 76 wurde gestern mit dem Aufruf zur Installation (Install) in der Adressleiste veröffentlicht, und die neueste Discourse-Version funktioniert damit sofort ohne weitere Einrichtung.

15 „Gefällt mir“

In Chrome 76, das heute veröffentlicht wurde, funktioniert es bestätigt. Es gibt sogar eine recht komplexe Animation in der Adressleiste :exclamation:, die die Aufmerksamkeit darauf lenkt.

Es sieht so aus, als ob die Animation nur einmal pro Domain stattfindet.

Technisch ist dies zwar bereits ausgeliefert, aber ich betrachte es immer noch als eher experimentell, daher öffne ich das Thema erneut.

11 „Gefällt mir“

Gibt es eine Möglichkeit, das Symbol in der Adressleiste auszublenden, entweder von Discourse oder von Chrome? Ich bevorzuge es, einfach den Browser zu nutzen, daher sehe ich keinen Sinn darin, dass dieses Symbol für immer sichtbar bleibt.

Wahrscheinlich eine Frage, die besser an die Entwickler des Chrome-Browsers und nicht an uns gerichtet ist.

7 „Gefällt mir“

Ich habe im Chrome-Bereich bereits etwas recherchiert, aber nichts gefunden. Also werde ich sie wohl einfach fragen.

Ist das etwas, das theoretisch abgelehnt werden könnte (z. B. über LocalStorage) oder dauerhaft basierend auf einer Discourse-Einstellung ausgeblendet werden kann? Ich frage, weil ich nicht weiß, ob Chrome automatisch erkennt, ob die Website als PWA kompatibel ist, oder ob es auf Ihrer Seite Spielraum gibt, die Option nur bedingt anzubieten.

Für alle anderen Interessierten gibt es in chrome://flags eine Einstellung namens App Banners, die Sie auf Deaktiviert setzen können, um das Symbol in der Adressleiste zu entfernen.

EDIT: Tatsächlich scheint die relevante Einstellung Desktop-PWAs, die über die Adressleiste installiert werden können zu sein.

7 „Gefällt mir“

Nur zur Information: Heute hatte ich unter Chrome auf Linux (Ubuntu) sogar einen Popup-Hinweis, der mir vorschlug, Discourse als App zu „installieren

Ein Popup auf dem Desktop!?

Hast du einen Screenshot?

4 „Gefällt mir“