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

@PWA cannot be used because of constant popups #5530

Closed
Artur- opened this issue Apr 23, 2019 · 8 comments
Closed

@PWA cannot be used because of constant popups #5530

Artur- opened this issue Apr 23, 2019 · 8 comments

Comments

@Artur-
Copy link
Member

Artur- commented Apr 23, 2019

  1. Go to https://labs.vaadin.com/business/, maybe refresh or navigate a bit.
  2. You get a popup asking to install the app
  3. Dismiss the popup
  4. Refresh the page
  5. You get a popup asking to install the app
  6. Dismiss the popup
  7. Go to step 4

There is no way this app could be shipped to users

@heruan
Copy link
Member

heruan commented Apr 23, 2019

Agreed. We are using @PWA and it's great for users who install the app, but those who don't get constantly bugged by the popup which also prevents pointer events in the lower part of the browser window (at least in Chrome).

@Artur-
Copy link
Member Author

Artur- commented Apr 24, 2019

Maybe two options would be enough:

  • Time before showing the popup the first time (after the browser decides it is ok to show it). Default 0 - show immediately
  • Time before showing the popup a second time if it was dismissed. Default 1 week

It would never be shown more than twice.

The first time would be to inform users that it can be installed and also to allow old users who are on a new device to install it. Most new users would presumably dismiss it if they are just exploring the app.

The second popup later on would inform new users that they can also use it as an app, at a time when they have become real users.

The timing info would be stored in the browser so clearing caches would reset it.

Thoughts?

@jouni
Copy link
Member

jouni commented Apr 24, 2019

The best practice would be to not show the banner immediately but only after repeated visits to the site/app. In addition to the banner, there could be a separate button in the UI (in some “About/Settings/Preferences/Admin” type of view) that could trigger the install.

But I agree with Artur, that if the user dismisses the banner more than twice, we should not show it again.

@Peppe
Copy link

Peppe commented Apr 30, 2019

Having it open programmatically has also been talked about. E.g. in Full stack App, delay opening the popup until the end user has successfully logged in.

@pleku pleku added this to the Candidates milestone May 8, 2019
@heruan
Copy link
Member

heruan commented May 16, 2019

Workaround to always hide it:

#pwa-ip.visible {
  display: none !important;
}

@jouni
Copy link
Member

jouni commented Jan 20, 2020

As a quick solution, here’s my proposal:

  • Wait one day after the app was opened the first time, or after when the banner was last closed, before showing the banner
  • If the banner is closed twice, do not show it again, ever

As a possible better alternative (from the end user’s POV):

  • Wait one day after the app was opened the first time, or after when the banner was last closed, before showing the banner
  • Add a “Never ask again” option to the popup, in addition to the “Install” and “Close” options (needs visual design)

The second option doesn’t seem it would have that big of a ROI at the moment, so it is okay to move forward with the first option.

@Artur-
Copy link
Member Author

Artur- commented Apr 12, 2020

As beforeinstallprompt is no longer in the standard, I think we should not do this at all and instead remove the whole feature: #8038. Having a popup only for Chrome does not make much sense.

If you still want to use beforeinstallprompt, you can implement it in the app. In a better way than our current implementation.

@pleku
Copy link
Contributor

pleku commented Apr 29, 2020

As described in #8038, the install prompt is removed in Flow 3.2 (V17) and the enableInstallPrompt parameter for @PWA is deprecated since 3.1.0.beta1 (V16). So starting from Flow 3.2 / v17

  • behavior changes showing install prompt by default only in Chrome -> not showing it at all
  • code breaks for any app that has disabled the install prompt explicitly -> easy fix by just removing the parameter

@pleku pleku closed this as completed Apr 29, 2020
@pleku pleku modified the milestones: Candidates, Abandoned Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants