[DigitalPoint] PWA

[DigitalPoint] PWA 1.2.3

No permission to download
I guess some browsers/operating systems know if you already installed the app. I was more talking about iOS where apps are sandboxed from each other.
 
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.
Looks likes that’s going to be built into the next version of XenForo, so won’t be needed in this addon, just FYI.

 
digitalpoint updated [DigitalPoint] PWA with a new update entry:

Allow editing of webmanifest

This adds an option to specify JSON you want to merge into the web application manifest. This allows you to edit existing properties as well as add new properties (what you specify to merge into the manifest file takes precedent over what XenForo generates by default). Note: the option is an "advanced" option, so you need to show advanced options to see it.

As an example, say you had an older version of XenForo (<2.2.13) where the display property wasn't set to...

Read the rest of this update entry...
 
very helpful. though i would need to read through the available options to make use of it. i have no idea what screenshot does for instance. i did originally want to have a different homepage for pwa which i suppose should be doable with this addon (start_url). thanks for this update!
 
very helpful. though i would need to read through the available options to make use of it. i have no idea what screenshot does for instance. i did originally want to have a different homepage for pwa which i suppose should be doable with this addon. thanks for this update!
This is a pretty good reference:


That being said, if you don’t know what you want to change or why, you don’t need to change anything. 😀
 
true. another thing this addon is going to be helpful for... i am just confused why this forum rotates to landscape if my orientation is locked. if this is what current version is shipped with, this addon should help folks on this version who want to revert the behavior!
 
that's weird coz my own forum pwa does not do that on chrome android. it's on an older version of xenforo so i just assumed xenforo devs changed manifest file in later versions. hopefully google devs fixes this bug 😶
 
Easy enough to look what xenforo.com is using as their manifest. It looks the same as my XenForo based sites, so it doesn't look like they updated anything vs. what released versions are already using:


I don't use Android (and I also don't try to orientation lock my device and then turn it sideways to use a site sideways), so I haven't experienced it myself. I only know that when Googling it, others have said it's a Chrome on Android issue. That's the extent of my knowledge about it. :)
 
xenforo manifest is using "orientation": "any", which specs defines as The screen can be rotated by the user to any orientation allowed by the device's operating system or by the end-user.. This parameter is completely missing from my own manifest file so I guess that explains why it follows the device's setting! Default might be more suitable option I suppose. I suppose I can test the different options on my own site and see how they change the behavior. 👍
 
Well "orientation": "any" is what's used in shipping versions of XenForo. I'm not sure about older versions, but if you are using the latest version of XenForo and you don't have that, you have something altering it. If you look in the XF\WebManifestRenderer.php file, it's a static property (there's no logic to use it only sometimes or change the value based on anything... it's always there).

PHP:
$manifest['orientation'] = 'any';
 
Well "orientation": "any" is what's used in shipping versions of XenForo. I'm not sure about older versions, but if you are using the latest version of XenForo and you don't have that, you have something altering it. If you look in the XF\WebManifestRenderer.php file, it's a static property (there's no logic to use it only sometimes or change the value based on anything... it's always there).

PHP:
$manifest['orientation'] = 'any';
This is exactly the line that's causing the issue, it was added in 2.2.13.

I released a tiny add on that just removes that from the manifest and it fixes the orientation issue, might be worth merging that into this?
 
digitalpoint updated [DigitalPoint] PWA with a new update entry:

New thingies...

  • Added ability to send push notices to users (Admin -> Communications -> Push users)
  • New PWA option: Enable debugging (you are welcome to enable this, but it was intended for me. It spews stuff to your server error log... but feel free)
    • Logs changes to user push subscriptions
    • Logs web push server errors
  • Delete push_subscription_updated session cookie when a new session is created (causes push subscription endpoint to be updated if old one...

Read the rest of this update entry...
 
How do you guys apply this add-on patch to remove this code "orientation": "any" by just using this add-on?
You can't remove an option, it lets you add any option as well as change the value of any option.

So if you are trying to change it to something, you can do that. You could even change it to "orientation": null, but I don't know what that would actually do.
 
  • Like
Reactions: rdn
How do you guys apply this add-on patch to remove this code "orientation": "any" by just using this add-on?
I haven't tested it, but according to the spec, setting "orientation" to any value that isn't explicitly allowed is the same as setting it to nothing at all. Maybe I'm reading it wrong, but that's how I read it, so you could set it to null and see what happens.

To process the orientation member, given ordered map json and ordered map manifest:
  1. If json["orientation"] doesn't exist or json["orientation"] is not a string, return.
  2. If json["orientation"] doesn't contain any of the orientation values, return.
  3. Set manifest["orientation"] to json["orientation"].
 
  • Like
Reactions: rdn
So this might do it?
JSON:
{
  "orientation": null
}

Thank you.
Maybe... like I said, I haven't tried it (I don't have any issues with orientation and don't have an Android device to test if it fixes whatever is broken). But according to the spec that might be the same as not having it. 🤷🏻‍♂️
 
  • Like
Reactions: rdn
Top Bottom