Making it easier to install Discourse as a PWA

Wow, no matter what I do, this file which I’ve converted to PNG shows up as JPEG. At first I thought Preview had done a bad conversion job, but then I used Affinity Photo which should be trustworthy.

I don’t believe I changed that setting since it doesn’t have the ‘reset’ option by it.
image

When I upload a different image which is a PNG I see the type sticking. There’s something about this file which Discourse really wants to convert. Ideas?

3 Likes

You’ve encountered a known (if obscure!) bug, which was fixed by the above commit. That commit is not yet in a stable release of Discourse, however.

Temporarily setting recompress original jpg quality to 100 should prevent the conversion from happening.

(…and/or you could try dropping the quality of the png you’re exporting to be less than the value of the recompress original jpg quality setting.)

Just make sure you return that setting back to the previous value after your logo has been uploaded!

3 Likes

I think I should get a badge for stumbling onto two Discourse bugs in one week. :slight_smile:

However, that I took both of those steps and yet the file is still being converted to jpeg. I set the setting to 100%, and I saved my image as jpg with 92% and then exported it as PNG (I couldn’t change the quality on the PNG directly?). Any other workaround ideas, or something I might have done wrong?

1 Like

After switching to the stable branch, I can recreate the (known) problem:

But I can’t recreate the problem with the suggested workaround:

I’m a bit flummoxed, I’m afraid!

It doesn’t appear in Mozilla Firefox either.

Is there a reason as to why that install banner doesn’t appear on iOS devices (especially now that they support PWAs)?

Yeah, it works amazingly on my Pixelbook Go. PWAs are a must-have on Chrome OS.

Because the iOS browser doesn’t have this feature and have no plans on adding it.

1 Like

What I was suggesting earlier, is why shouldn’t there be a button or link somewhere on the website, for installing the PWA, as explained in this article.

We already have it for years:

Sorry, I’m talking about a less highly visible persistent button/link, perhaps in a menu, for users without the PWA.

The reason I see this as useful is for when we have a user who wants to install the app, we don’t know what state they are in and it takes a lot of energy to do a Q&A. It would be great if there was rock solid 2 step process we could give them: i.e., go to the hamburger menu → Install App. Then we don’t have to worry about their TL or how many visits or if they dismissed a banner or uninstalled in the past or what browser they’re using and how it words the install option.

3 Likes

That is literally the existing workflow :joy:

Probably a lot of the confusion here (including confusion for me) is that there is a different PWA install option depending on the browser:

  1. Android Chrome (ie, default browser): I assume that is where you got the screenshots you posted. So it looks like here, you have an “Install App” in the hamburger menu. Would be great if that was available on all browsers, but sounds like that is not possible right now.

  2. iPhone Safari (default browser): There is no button to install from the hamburger menu. To install, have to go to share icon (square with up arrow), and scroll down to “Add to Home Screen”. I assume from the discussion here that it is not possible to add the button to the hamburger menu. This does save the app to the home screen, though I’m not sure if that alone gives it the PWA functionality, like saving the prior state.

  3. Desktop Chrome: I do not have the install button in the hamburger menu on my Mac Chrome browser. Is it supposed to be there? Could it be added there?

  4. Desktop Safari: I do not have the install button in the hamburger menu on my Mac Safari browser either. Is it supposed to be there? Could it be added there?

1 Like

Yes what @JQ331 is saying.

Falco’s solution is the Chrome menu. By hamburger menu I mean the discourse one not the browser. Since some people above pointed out that it doesn’t work in Safari or Firefox, this option is browser dependent. Assuming it CAN be installed there, the option just isn’t given, a Discourse menu option seems best. Plus it reminds the user that this option exists, when they may never look into their Chrome menu.

You can’t add install buttons on anything Apple controls, and Apple said multiple times they don’t want to allow developers to create those buttons ever.

It is there for me:

It’s also in the address bar on desktop.

You don’t see it on your website because of the whole JPG logo thing. PWA is a fast moving target, and the criteria changes all the time. I’d suggest using our default release channel if you want maximum PWA compatibility.

2 Likes

I was referring to the Discourse hamburger menu (not the chrome menu). Actually, now I see the android screen shots were also from the chrome menu, not the discourse hamburger menu.

It would be nice to have the button in the discourse hamburger menu–the user would see it more often, and it would be a little clearer in terms of how to instruct users to install as a PWA. Probably not worth a huge developer effort, but would be a helpful touch.

Chromium browsers seem to be the only ones with the install prompt. Mozilla Firefox and Safari are based on different rendering engines.

1 Like