shaarli / Shaarli

The personal, minimalist, super-fast, database free, bookmarking service - community repo
https://shaarli.readthedocs.io/
Other
3.38k stars 287 forks source link

[Feature request] Shaarli as a PWA (service workers) #1544

Open immanuelfodor opened 3 years ago

immanuelfodor commented 3 years ago

This issue was originally posted at https://github.com/kalvn/Shaarli-Material/issues/112 but it seems to be a core Shaarli issue that can't be solved within a theme. So I repost this issue here, maybe you have time once to make Shaarli "installable" :)

I originally bumped into Unmark (https://github.com/cdevroe/unmark) and it sounds like an awesome feature to be able to install it as an "app" through service workers. Not only you can use it like an app for browsing content, but also you can share content "into the installed app". There is a demo in the middle of this page: https://www.notion.so/Unmark-Help-How-to-add-bookmarks-cd5893f118ed40cd8400275e49f40d51

Checking the source, it seems you only need to have a manifest JSON and there you need to have a share target declaration, and some JS code to declare the necessary service workers.

From this guide, it looks it can be implemented by only minor frontend changes: https://web.dev/progressive-web-apps/

From the follow-up comment by @kalvn:

Unfortunately, the manifest.webmanifest file must be at the root of your web server. It makes it impossible to handle the PWA thing in Shaarli Material.

ArthurHoaro commented 3 years ago

I tried it and it looks awesome. Note that it worked with Chrome but note Firefox mobile (the share part).

From the follow-up comment by @kalvn: Unfortunately, the manifest.webmanifest file must be at the root of your web server. It makes it impossible to handle the PWA thing in Shaarli Material.

It means that it also won't work with instances hosted in a subfolder.

Are you willing to work on it and submit a PR?

ArthurHoaro commented 3 years ago

Pushing milestone.

immanuelfodor commented 3 years ago

OMG, 1.0.0?! Shaarli graduates from version zero?

ArthurHoaro commented 3 years ago

Well... not yet :grimacing: But most of internal refactoring has been done, currently working on pending features, so 1.0.0 will happen at some point.

uraza commented 3 years ago

Very good idea, I like it! +1