BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.16k stars 1.89k forks source link

Progressive Web Application #1253

Closed Nebucatnetzer closed 1 year ago

Nebucatnetzer commented 5 years ago

Describe the feature you'd like Adding support for PWA to the website.

Describe the benefits this feature would bring to BookStack users Running the website as a PWA would help with using it on the phone a bit since it would feel a bit more like an app.

ssddanbrown commented 5 years ago

Thanks for the suggestion @Nebucatnetzer.

It would be ideal if you could expand on the benefits a little better. The current benefit listed:

PWA would help with using it on the phone a bit since it would feel a bit more like an app

That's not really a benefit by itself. If you could specify which PWA features you'd desire, and how they'd generally help BookStack users, it would help to confirm the requirements of the feature you're requesting here.

Nebucatnetzer commented 5 years ago

On since the site would appear in its own window in the "recents" overview it would be easier to access/find than when it is one of many tabs in a browser. AFAIK PWAs even would allow for some offline functionality but I haven't seen any of those in a real life example yet.

DeftNerd commented 5 years ago

I personally like how BookstackApp works at the moment, but one argument I've heard before for refactoring a Laravel app to a PWA is that it decouples the backend API from the frontend display.

This process forces maintainers to put the API first.

When this happens, the actual server-side generation of the HTML can be segregated to a "Theme" package that just internally consumes the API, allowing other people to make alternate themes that are easily installed. The theme could also be a PWA that uses Javascript on the client-side to consume the API.

Additionally, it opens up easier routes for mobile applications using the same API, as well as API wrapper packages to allow developers to create apps that interface with Bookstack easily.

I see that building an API is on your roadmap. When that time comes, it might be worth building the API with that in mind.

ssddanbrown commented 5 years ago

Thanks for the input @DeftNerd.

I think what you're effectively describing is an SPA (Single Page Application) which is not a necessity in a PWA but it does help in meeting some of the PWA features.

I did think about BookStack as a PWA, my thoughts can be seen here, but ultimately decided against it.

Nebucatnetzer commented 5 years ago

It would just be a great improvement if we could open Bookstack in its own window. I have other websites which work that way and I find it much nicer to work with them than in the normal browser window. AFAIK there isn't much needed to support this "minimal" feature of a PWA.

dannyhanes commented 3 years ago

Not sure if this belongs here, but I would also love the following features which are synonymous with an "app"

ashleycawley commented 2 years ago

I agree I would very much love to see BookStack as a PWA, I think it would help it better replace applications for many users who were previously using desktop Apps like OneNote etc. for note keeping. PWA also helps integrate better into Linux desktops, offering nice desktop shortcuts, separate panel buttons and just a different experience without the auxiliary chrome/UI elements of the browser that might not be needed, it looks/feels as good as a native desktop app in a way and that has merit to the end-user in numerous ways.

Some people (myself included) might like to keep their note keeping separate from their maze of many chrome windows and tabs, if you're like me and have countless dozens open for different areas of research. Currently I pin my bookstack tab but I would love to have a PWA option. I use to use OneNote for many years but moved away after they were taking it in a direction I didn't like and it became less effective for me, BookStack is my personal and professional replacement for OneNote, however I did prefer that fact that OneNote was a desktop app, I preferred that overs its web-based counter-part and I think a PWA for BookStack would be a nice compromise between the two.

ssddanbrown commented 2 years ago

I guess I can see the value of a PWA so that the site opens in it's own context/app. I swear chrome on Android used to provide an easy option to do that for any site but can't find that now on my device without a site being a PWA.

I've had some hesitance with the PWA idea with due to the possible expectations of off-line functionality, which would have to be optional due to the multitude of security scenarios it would introduce, and then it'd be a large feature to maintain for a lesser portion of the audience; But from the responses here it mainly appears to be the "separate-window" ability of a PWA that's really desired, and maybe my possible expectations should not be a blocker to that.

If we're just targeting PWA for the "separate-window" feature then this should be fairly straightforward. The main challenge will likely be the logo, since we allow user uploading (Or removal) of the application logo in settings. I don't want to lead things to a mess of various app logo settings for difference sizes and formats. Maybe we do the following:

Relates to #301.

I can see the utility of PWA notifications but that increases the scope considerably at this stage. Maybe once we have an email-based notification system in place that can be thought about as an alternative channel, but I think that's a bit longer term.

ssddanbrown commented 1 year ago

Basic PWA functionality is now included in the core thanks to @GamerClassN7's work in #4430. This will be part of next release. This generally appears to meet the above, although with less icon manipulation, which works well enough from my testing, especially as since my 2021 comment we now have a separate setting to define an app icon.

I'll therefore close this off, additionally PWA functionality could be requested via new focused issues. Although, if for the larger features (offline functionality), they may be more likely to eventually be closed as out-of-scope.

damomato commented 1 year ago

Very excited for this 😁