[DigitalPoint] PWA

[DigitalPoint] PWA 1.2.5

No permission to download

digitalpoint

Well-known member
digitalpoint submitted a new resource:

[DigitalPoint] PWA - Add some missing things to XenForo's progressive web app

This addon adds a few things that I felt were missing from XenForo's PWA app:
  • If the user that is installing the PWA app is logged in, auto-log them into the PWA app (don't need to force users to log-in from scratch when they first load the installed app).
  • Use Sec-Fetch-Site header as replacement for CSRF with a fallback to CSRF if browser doesn't support Sec-Fetch-Site (prevent stale sessions from causing security error message)
  • Automatic refresh of badge...

Read more about this resource...
 
It would be nice if there was also an option that invites users who view the forum from mobile to "install the app"
 
It would be nice if there was also an option that invites users who view the forum from mobile to "install the app"
The problem is you can't trigger the app installation procedure with JavaScript or any other sort of click, so you would be limited to just telling them that it exists, similar to how the option to install shows in the off canvas ("hamburger") menu. The option to install it only shows at the bottom there if they are on mobile and not in PWA app.

So when you think about it, what could you actually do differently here? Show them an annoying notice front and center that they see once (and probably ignore)? The default setup where the option (and instructions) to install on every page view in the menu I think is probably a better place for it. It's there 100% of the pages, can't be dismissed and users on mobile are surely using that menu for normal navigation. I think that if someone wants to install it they will, so putting an annoying dialog up in their face about it isn't going to change that (in fact some users might NOT install it in that case because it would look more like spam [vs. just an option they have]).
 
Last edited:
yes please! it would be nice if this addon can offer customization of the manifest file that xenforo does not offer out of the box!
 
No, it doesn't do anything there. From the looks of it, it looks to me like that's a bug in the phone operating system possibly (orientation lock at the operating system shouldn't let an app rotate since that's the whole point). I tested it on my phone and using orientation lock locks the PWA as expected (it's an iPhone though, not Android). I did a little digging, and others (unrelated to XenForo) have said it's a known issue with Chrome on Android (Firefox PWA seems to work on Android). Either way, to answer your question, no... this addon does not try to address that any specific Chrome on Android issues.

Hi @digitalpoint

I am wonder if you can add few new features like

feature 1: is any possible you can add support with Shortcuts , Categories, Protocol Handlers, Web Share API, Badging, iarc_rating_id, related_applications, edge_side_panel, orientation, scope and PWA Widget in the PWA setup page in xenforo 2.x

Feature 2: can you please add support for Window Controls Overlay!
Probably none of those things directly, but I could see some options that let people free-form add-to/edit the manifest file however they see fit. But honestly, I don't see any of those things being individually built within the addon (because honestly, I don't have a use for any of it myself). So anything would be something generic where people can knock themselves out and do whatever they want.

Feature 3: Can you please add option for choose styles only for PWA for xenforo 2 for default
Probably not to be honest, I don't even have a site with more than one style (I'm a believer in consistency), so I wouldn't even have something to test it on anyway. Seems weird if you visit a site with the browser on your phone and have that look different than visiting the site with PWA.
 
Probably not to be honest, I don't even have a site with more than one style (I'm a believer in consistency), so I wouldn't even have something to test it on anyway. Seems weird if you visit a site with the browser on your phone and have that look different than visiting the site with PWA.
the reason I am asking for this feature is because of app store restriction from Apple and I needed to turned off some features for apple devices
 
@digitalpoint the notice to install the application should refer to a personalized url that explains to users how to install the site's icon on their home.
Hardly anyone knows how to do it so it needs to be explained to them exactly how to do it.
If users who view the site from mobile see the warning and then end up in a discussion where they are well explained what to do, even the most inexperienced will discover this option and will do it.
 
Probably out-of-scope for this add-on, but as other suggestions in this thread I would also love to see more control over the manifest file.
For example, I use PWABuilder to convert PWA to an app for the different app stores. This could possibly give more exposure to your site.
However, the manifest needs some tweaks to fully comply:
 
Feature request....
An option to upload my own version of the "How to install this app on IOS video".
One that is not XenForo but my actual website as not to confuse people why the instruction shows a completely different forum.
 
Probably out-of-scope for this add-on, but as other suggestions in this thread I would also love to see more control over the manifest file.
For example, I use PWABuilder to convert PWA to an app for the different app stores. This could possibly give more exposure to your site.
However, the manifest needs some tweaks to fully comply:
This is already done for the next version. It's not super fancy, but since it doesn't try to build a UI to handle all the possible things, it's very flexible. It lets you simply specify JSON you want to merge into the manifest file (allows you to overwrite anything there or add whatever you want). For example if you wanted to change the orientation member (a string) and add a categories member (an array), you can plop this into it:

1690142952767.png

Again, there's not a UI built around it... but since there isn't, it gives you the flexibility to literally add whatever you want to the web app manifest (I'm not trying to be the judge and jury on what should and shouldn't go in there... add whatever you want, I don't care.. haha).


Feature request....
An option to upload my own version of the "How to install this app on IOS video".
One that is not XenForo but my actual website as not to confuse people why the instruction shows a completely different forum.
Probably won't go so far as to handle the uploading process, but something that allows you to specify the video, yeah. Was already planning on that, but was wiating until the next version of XenForo first since they are changing how they do it (doing it as a video instead of an animated GIF). Don't want to spend the time when I know that how it's done is being changed in the next version of XenForo.
 
It would be nice if there was also an option that invites users who view the forum from mobile to "install the app"
There's actually nothing preventing you from doing it with the same mechanism that the side menu shows it on. It's always there (but hidden) and shows it if the user is on a mobile device and not already in an installed app... but underneath it all, the link and instructions are there on every page view.

There's already a XF JavaScript "class" that handles it that's available on every page view. So you literally could just plop some HTML into a normal XenForo notice and it would work. It would also give you some more granularity that comes with the notice system (top, bottom, floating, etc.), ability to auto-hide, based on user group, ability for users to dismiss permanently if you allow it, etc.) Using the notice system to display it is a better route imo since all you are really trying to do is have some HTML on the page... XenForo's JavaScript system already handles the rest. I put the HTML you could use (obviously you can change it as you see fit) on the FAQ page of this addon (but that will at least give you something to start with as far as how you ant to style it).
 
There's actually nothing preventing you from doing it with the same mechanism that the side menu shows it on. It's always there (but hidden) and shows it if the user is on a mobile device and not already in an installed app... but underneath it all, the link and instructions are there on every page view.

There's already a XF JavaScript "class" that handles it that's available on every page view. So you literally could just plop some HTML into a normal XenForo notice and it would work. It would also give you some more granularity that comes with the notice system (top, bottom, floating, etc.), ability to auto-hide, based on user group, ability for users to dismiss permanently if you allow it, etc.) Using the notice system to display it is a better route imo since all you are really trying to do is have some HTML on the page... XenForo's JavaScript system already handles the rest. I put the HTML you could use (obviously you can change it as you see fit) on the FAQ page of this addon (but that will at least give you something to start with as far as how you ant to style it).
I have no idea how to do this...
Would you like to make me a tutorial :)
 
@James i created an alert but I don't understand one thing...
Is there a way to show it only to those who haven't installed the app? (I think not)
I saw that on iphone it shows me the xenforo video (it's actually a gif) and it's fine.
On windows 11 it doesn't let me see any video so everything is correct right? But when I install it, it puts the icon on my desktop but then I keep seeing the notice above the forum but without writing.
Does it have to show me some videos on android? No?
 
@James i created an alert but I don't understand one thing...
Is there a way to show it only to those who haven't installed the app? (I think not)
I saw that on iphone it shows me the xenforo video (it's actually a gif) and it's fine.
On windows 11 it doesn't let me see any video so everything is correct right?
Does it have to show me some videos on android? No?
The video is intended to only be showing to iOS users. That should be the same behavior as the install option in the side menu. It should also shouldn’t show if you aren’t in the app (also same as the default behavior). If you are in a browser, but an app is already installed on the phone, it will still show because there isn’t a way to know the app is installed unless you are in the app.
 
on windows 11 i installed the app but now i get the empty warning if i see the forum from the browser.
How come?
 
Back
Top Bottom