Skip to content

feat: Guide users to install PWA#1077

Open
Misofist wants to merge 5 commits intostoatchat:mainfrom
Misofist:pwainstallation
Open

feat: Guide users to install PWA#1077
Misofist wants to merge 5 commits intostoatchat:mainfrom
Misofist:pwainstallation

Conversation

@Misofist
Copy link
Copy Markdown

@Misofist Misofist commented Mar 29, 2026

This builds on the work done by Pecacheu in #1024, but completely reworks the UX.

NOTE: A lot of the screenshots below look ugly, that's because this is designed to work alongside #835. It looks good when that PR is also included, I just didn't want to misrepresent what's included within this PR in my screenshots.

No modal window is shown. Instead, a new "Install" option has been added to the Settings menu.

On browsers that support the beforeinstallprompt event, this page contains a button to install the PWA.

Screenshot_20260330-054113

Clicking this button starts the PWA install experience:

Screenshot_20260330-054119

This also gracefully handles the case where the user declines the installation:

Screenshot_20260330-055635

For browsers which do not support the beforeinstallprompt event, manual installation instructions are shown:

image

The install button is hidden within the PWA itself:

image

The install button also only appears on mobile browsers, since currently on desktop I think there is little point in installing the PWA.

I also updated the way we use Vite PWA to follow their best practices for SW updates: https://vite-pwa-org.netlify.app/guide/periodic-sw-updates.html#handling-edge-cases

Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
@Misofist Misofist requested review from a team as code owners March 29, 2026 19:04
This also aligns the way we use vite-pwa-plugin with modern best practices

Signed-off-by: Misofist <misofist@heavendivided.net>
Signed-off-by: Misofist <misofist@heavendivided.net>
@DeclanChidlow
Copy link
Copy Markdown
Member

For the 'refresh to try again', a refresh button could be made present on the page for ease of use.

Also, I wrote a full article on detecting and styling based on if the app is installed as a PWA which could well be of use: https://www.smashingmagazine.com/2025/08/optimizing-pwas-different-display-modes/

@DeclanChidlow DeclanChidlow added enhancement New feature or request ux review This needs UX review labels Mar 30, 2026
@Misofist
Copy link
Copy Markdown
Author

For the 'refresh to try again', a refresh button could be made present on the page for ease of use.

Good idea! I'll add that in when I'm at my computer.

Also, I wrote a full article on detecting and styling based on if the app is installed as a PWA which could well be of use: https://www.smashingmagazine.com/2025/08/optimizing-pwas-different-display-modes/

Great article. I don't think this changes anything, since Stoat's formatting is handled via JS and not via stylesheets. This is also intended to pair with #835 or similar, so I expect that the PWA manifest will only specify standalone mode.

But let me know if I've missed anything. :)

Signed-off-by: Misofist <misofist@heavendivided.net>
@DeclanChidlow
Copy link
Copy Markdown
Member

Ah, GitHub had a fart and didn't show me the full file, only the setting for iOS bit so I thought it'd been missed. Disregard.

@Pecacheu
Copy link
Copy Markdown
Contributor

Pecacheu commented Apr 3, 2026

This does seem like a better way of doing it yea, I'll test it out soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ux review This needs UX review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants