Experimental Desktop PWA works with Discourse!

Hmm :thinking: we will investigate this cc @Falco @featheredtoast

I wonder if this is related to your site requiring login

1 Like

Worked for me on our require-logon site, FWIW


This is pretty interesting stuff. What are the advantages / disadvantages of using Discourse this way? I’d love to hear folks thoughts on this.

I know very little about this, so I’m just speaking based on what I saw in 2 min.

Wired: It’s really easy now to open the app now with Spotlight on Mac
Tired: I can only have one tab open

Wired: I can brag about how we have an app now (kinda)
Tired: I can only have one tab open

… you get the idea. :slight_smile:

3 Likes

Yeah IMO this is kind of pointless. It’s like a web browser… but worse!

4 Likes

Yeah I get that, I would find this more useful if there was only 1 discourse site I visited and if the icon on the desktop taskbar updated with notifications. But, I float between lots of sites so for me there is more limited use unless I had an app to bind all my sites, and even then lack of tabs is a big pain.

For chat (eg slack, mattermost) I find this very useful which is why I actually started this research. If my job was to moderate a single Discourse site I would also find this useful.

So yeah, I do not think this will be for everyone, but for some it may be handy, especially if there was some value add in the taskbar.

12 Likes

I think it could work well, but it would take some additional work on the design of the UI. For instance, in Slack, you don’t need browser tabs because the navigation between channels is built into the app as a first class citizen. Maybe similar things could be done with theme components, where the UI could be designed within these new constraints.

That might work very well for many of our users who do fit into this mode for the most part:

5 Likes

How does this relate to the instructions at

2 Likes

Same old wine in a brand new bottle.

2 Likes

Oh this topic was focusing on the ability to install Discourse in Desktops (which is no longer experimental).

The other one was mostly about the experimental Badging API. To use the Badging API you need to install to desktop, so this one here is a pre-requirement.

2 Likes

First post looks quite wrong though? If it is not “experimental” where is that chrome menu item??

Yeah this is totally out of date, no point carrying this topic anymore.

Is a very big killer here usability wise. Now that his is official we should write a proper theme component to make PWA work as expected.

3 Likes

There is one here:

Looks like it’s aimed at mobile iOS.

To get the menu entry in Chrome we must enable the service worker in desktop.

Yes but the tradeoff is that service worker adds a ton of support emails to our work… did you want to whitelist the service worker for Chrome and Firefox or something like that @sam in addition to Android?

I think we should whitelist Chrome now … hold off on whitelisting Firefox till this is done:

3 Likes

Ok @falco can you do the needful on whitelist? We already whitelist Chrome / Android as I recall.

2 Likes

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

6 Likes

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

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

11 Likes

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

4 Likes

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 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)

Technical Details

The changes are pending in this branch: Comparing master...offline · discourse/discourse · GitHub

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

20 Likes

Here is a demo of Discourse offline browsing on iPad

12 Likes

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