Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Add environment variable to set manifest variable "display": "standalone" #264

Closed
schlagmichdoch opened this issue Feb 5, 2024 · 8 comments · Fixed by #374 · May be fixed by #267
Closed

[enhancement] Add environment variable to set manifest variable "display": "standalone" #264

schlagmichdoch opened this issue Feb 5, 2024 · 8 comments · Fixed by #374 · May be fixed by #267
Labels
enhancement New feature or request

Comments

@schlagmichdoch
Copy link
Owner

schlagmichdoch commented Feb 5, 2024

As discussed in #254 there should be a possibility for admins to set the display mode.

As iOS cannot use PWAs in share menus and QR codes are always opening in the browser, the current default is 'display': 'minimal-ui'.

Maybe set 'display': 'standalone' as default anyway, as it would be an enhancement for UI clarity (hides the address bar).

@schlagmichdoch schlagmichdoch changed the title Make the manifest variable "display": "standalone" editable via an environment variable and stand Add environment variable to set manifest variable "display": "standalone" Feb 5, 2024
@schlagmichdoch schlagmichdoch added enhancement New feature or request to be decided labels Feb 5, 2024
@schlagmichdoch schlagmichdoch changed the title Add environment variable to set manifest variable "display": "standalone" [enhancement] Add environment variable to set manifest variable "display": "standalone" Feb 5, 2024
@MrPropre
Copy link

Hello @schlagmichdoch, it would be interesting to implement display_override in the manifest file so PairDrop on Safari could still benefit of the PWA look. Here is a deeper explanation.

It works like this:

{
  "display_override": ["minimal-ui"],
  "display": "standalone"
}

Since Safari doesn't support this property, it will just use standalone as the display mode. On supported browsers (Chrome, Edge, etc.) il will use minimal-ui.

Thank you in advance!

@schlagmichdoch
Copy link
Owner Author

Interesting manifest property! I don't think minimal-ui offers any advantages over standalone though as we don't have any page history in the app that would benefit from back and forward buttons, does it? I have just set it to standalone for all clients for v2.0

@MrPropre
Copy link

MrPropre commented Dec 27, 2024

I think the only benefit of keeping minimal-ui is the refresh button. Sometimes the app gets borked or something and it's easier to just refresh it to fix it. Since the "pull to refresh" feature is disabled in PairDrop (with overscroll-behavior in the body), minimal-ui provides a workaround on mobile in this situation. On desktop, there is a refresh button on right click even in standalone mode, that should do the trick.

See more here about overscroll-behavior.

@schlagmichdoch
Copy link
Owner Author

I guess we'll just switch over completely to "display": "standalone" without env var. If users really want to, they can adjust their manifest.json manually

@MrPropre
Copy link

Okay I agree with you, I just thought you still wanted to keep minimal-ui because of commit c040515

If it does not create any unwanted side effects, standalone mode would be so much better. Right now on iphone it just opens in the browser and there are dozens of pairdrop tabs.

@schlagmichdoch
Copy link
Owner Author

Good catch but I have somehow changed my mind. In the end you only have to pair your own devices once anyway and are good to go after that so it's not a big pain to do that on the browser and on the pwa separately. I think the improvement in user experience through a stand-alone pwa is greater than the benefit of having only one db. On desktop browsers that's already the case anyway.

@schlagmichdoch
Copy link
Owner Author

@MrPropre Are you open to test this on this instance: https://pairdrop.onrender.com
I'm especially interested in whether the footer is shown correctly after it is installed or whether it is overlayed by the iOS UI.

@MrPropre
Copy link

@schlagmichdoch I think it looks good. Here are some screenshots on iOS after installing the PWA.

imageimageimage

schlagmichdoch added a commit that referenced this issue Feb 17, 2025
## Enhancements
- Make PWA standalone (#264)
- Bring back background animation after performance optimization (#285)
- Add support for Safari 11-15 (#358)
- Update Twitter icon and URL to (X) (Thanks @realchrislovett)
- Update node dependencies

## Fixes
- Fix pasting of files on background to invoke share-mode and make it available on Firefox (#370)
- Fix padding issue on EditPairedDevicesDialog and Base64Dialog
- Fix hydration of URLs into links in received messages that have exclamation marks in path

## Languages
- Translations updates from Hosted Weblate (Basque, Norwegian Bokmål)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants