I unchecked those two boxes just to test. Loaded in firefox on mobile. I’m not seeing a banner so far… You’re saying a PWA banner should display when those boxes are not checked?
It looks like PWA should be supported in browsers besides Chrome. I know I installed the PWA from Brave, so my browser certainly supports it.
beforeinstallprompt only triggers once - if the user dismisses it it’s gone. Apparently to avoid hassling the user?
There doesn’t appear to be any manual way to activate the “install as app” API.
Does the Discourse code check specifically for Chrome or does it respond to beforeinstallprompt in any browser? (seems non-browser specific, see code link below)
This looks like the original announcement of the feature in Chrome. It seems like the intention was to allow developers to hang onto the event object, and be subtle about the way they are displaying it to the user. If the user ignores it, it should pop up again next time. Only if the user initiates the prompt and then cancels out should it disable the event for a time (e.g. 3 months).
The Discourse code responsible for this, however, adds an additional check to see whether the Discourse banner has ever been dismissed. Am I understanding that correctly? It seems like a missed opportunity, we could be presenting the banner again but are choosing not to. What if we left this up to the admin, whether they want to prompt in this circumstance?