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 + offline #325

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

geekgonecrazy
Copy link

@geekgonecrazy geekgonecrazy commented Jan 30, 2022

I know this project seems to be abandoned. But contributing on the off chance that you pick it up. Based on #296 but this makes it work fully disconnected and caches some bookmarks for offline viewing making it more pocket like and useful

@symgryph
Copy link

symgryph commented Feb 6, 2022

Looks like we are back in business. You might want to take a look again. New maintainer!

@geekgonecrazy
Copy link
Author

Ah fantastic! Hopefully things pick back up. So far just this change has made it very useful to. Just pin to Home Screen on mobile and can read even with no internet connection :)

Copy link
Member

@fmartingr fmartingr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @geekgonecrazy, thanks for the PR! This seems amazing. I'm not currently using Shori on my mobile/tablet but this will make it very useful when traveling around.

I'm not very proficent in the front-side of things, so my not-very-expert eyes say it's almost good to go. The only thing I didn't like quite much is that we are serving static assets from the service and also fetching them from the outside. It would be good if we serve those all ourselves.

I know there's a lot of room to improve here, but we need to take it one step at a time.

CC: @m-bers as the original contributor for the PWA

}
</script>
<script type="module">
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this living with our other static assets? It seems weird to me that we serve everything bundled withing the binary but this is fetched from an outside service.

@@ -0,0 +1,102 @@
//This is the service worker with the Advanced caching

importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as before, can we bundle this within shiori?

@@ -49,6 +49,9 @@ func ServeApp(cfg Config) error {
return path.Join(cfg.RootPath, route)
}

router.GET(jp("/pwabuilder-sw.js"), hdl.serveFile)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be served from /js/... as with the other javascript files.

@m-bers
Copy link

m-bers commented Feb 23, 2022

I am just seeing this now--@geekgonecrazy evidently knows more about PWA caching than I do, but I will try to work on the web share target component which was my original aim (offline was just a bonus) and submit that as a separate PR

@karlprieb
Copy link

Hey @geekgonecrazy 👋 are you still working on this PR? If not I can take a look and make the updates suggested by @fmartingr

@geekgonecrazy
Copy link
Author

geekgonecrazy commented May 20, 2022

@karlprieb hey my friend! Fancy seeing you here :) I haven't had time to mess with this for a while. I'll add you as contributor on my fork if you want to make more changes.

@fmartingr
Copy link
Member

Hey @geekgonecrazy, @karlprieb, is this something you are still interested on working on?

@stale
Copy link

stale bot commented Oct 17, 2022

This issue has been automatically marked as stale because it has not had any activity for quite some time.
It will be closed if no further activity occurs.
Thank you for your contributions.

@stale stale bot added the tag:stale label Oct 17, 2022
@stale stale bot closed this Oct 27, 2022
@karlprieb
Copy link

Hey @fmartingr I’m still interested in working on this feature, sadly I’m not having the necessary time to do so :(

@fmartingr
Copy link
Member

Hey @karlprieb, no problem, I will just keep this open then. We all have our things in life :)

@ilkersigirci
Copy link

Any updates about the progress? I think this feature is a game changer for the project.

@wolfhechel
Copy link

I started working on PWA separate from this pull request and have a working PWA profile and share target but not offline caching. I would be open to reworking my patches with this PR and finish this feature.

@geekgonecrazy
Copy link
Author

I started working on PWA separate from this pull request and have a working PWA profile and share target but not offline caching. I would be open to reworking my patches with this PR and finish this feature.

Please feel free to take what is done here and wrap into own PR 🙏

pythoninthegrass added a commit to pythoninthegrass/shiori that referenced this pull request Jul 3, 2023
Incorporate go-shiori#325 changes, copy assets to static res dir, add json mime type for manifest.json
@pythoninthegrass
Copy link

No ETA, but I have an MVP working locally in the iOS simulator. Up to the publishing bit now.

@fmartingr
Copy link
Member

No ETA, but I have an MVP working locally in the iOS simulator. Up to the publishing bit now.

Could it also be used directly from the browser by adding it to home screen/applications without the need of installing an app from the store?

@pythoninthegrass
Copy link

pythoninthegrass commented Jul 4, 2023 via email

pythoninthegrass added a commit to pythoninthegrass/shiori that referenced this pull request Jul 11, 2023
Incorporate go-shiori#325 changes, copy assets to static res dir, add json mime type for manifest.json
@jt-wang
Copy link

jt-wang commented Sep 9, 2023

@fmartingr @pythoninthegrass Hi there, thanks for all the contribution and discussion! PWA would bring Shiori to next level to fully replace other bookmark managers (especially the default bookmark managers from Chrome and Safari). May I know if this PR is still active? If so, any context of the current blocker preventing it from being merged? Thanks.

@fmartingr
Copy link
Member

@fmartingr @pythoninthegrass Hi there, thanks for all the contribution and discussion! PWA would bring Shiori to next level to fully replace other bookmark managers (especially the default bookmark managers from Chrome and Safari). May I know if this PR is still active? If so, any context of the current blocker preventing it from being merged? Thanks.

I can't say myself, there are some people interested in moving this forward but sadly since we do this in our free time I guess is difficult to just sit down and go on with it. I also think this would be a game changer but I'm not that into frontend development (if I were, I would refactor all of it 😂 )

@pythoninthegrass
Copy link

@fmartingr hit the nail on the head. I made some progress but with the latest API changes, it became too much of a lift.

I'm pretty green at go and frontend isn't my strong suit. My fork is still available and the manifest.json (manifest.webmanifest) is about 2/3 complete according to pwabuilder.

Ended up migrating to Omnivore and while it doesn't quite check all the boxes, it suits my needs and has very responsive devs who are actively implementing features I'm interested in.

@fmartingr
Copy link
Member

@fmartingr hit the nail on the head. I made some progress but with the latest API changes, it became too much of a lift.

I'm pretty green at go and frontend isn't my strong suit. My fork is still available and the manifest.json (manifest.webmanifest) is about 2/3 complete according to pwabuilder.

Ended up migrating to Omnivore and while it doesn't quite check all the boxes, it suits my needs and has very responsive devs who are actively implementing features I'm interested in.

That's sad to hear, but understandable :)

I may hop on to the task then, while I make the changes to the API. Thanks for putting your time into it anyway, really appreciated.

@pythoninthegrass
Copy link

pythoninthegrass commented Sep 10, 2023 via email

@ragekit
Copy link

ragekit commented May 4, 2024

Any helper needed ? I wanted to make a simple pwa of shiori just to be able to share links to it, but apparently some work was done here ?
I can checkout this branch and try to fix

@fmartingr
Copy link
Member

Any helper needed ? I wanted to make a simple pwa of shiori just to be able to share links to it, but apparently some work was done here ? I can checkout this branch and try to fix

Absolutely! The frontend side needs a hand, but if you could bring the PWA to an usable state it would be awesome tbh :)

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

Successfully merging this pull request may close these issues.

None yet

10 participants