notes icon indicating copy to clipboard operation
notes copied to clipboard

Make this app a PWA

Open tnyeanderson opened this issue 5 years ago • 7 comments

I mentioned in #122 that implementing a service worker could help alleviate bugs due to connection issues and extended sessions. If this is done, we wouldn't be too far away from having this app be installable as a PWA. To see what this would look like, see my project nextcloud-notes-webview. We could just pull the CSS from there to get the mobile UI working nicely (haven't seen any bugs yet!)

I am not too well-versed in PWAs, but is this possible? With the file manipulation involved in this app, I assume we would have to have some type of "sync" between the cached files on an offline device and the stored notes. This is where my knowledge breaks down (and this may be where it gets way too complicated and not worth it at all).

Why do it in the first place? I think a consistent experience across devices is important when choosing a note-taking app. It has its limits this way (long notes >400 lines are very slow on mobile) but if we can do it, I think it will make new user's transitions easier and help any other current users out there that feel the same way I do.

If that's not in the cards, I would love to get my chunk of scss into this repo. It would only affect apps with the custom useragent suffix I set for the webview (notes-android), so it wouldn't change anything for anyone, but then I could package my app and have it work instantly for anyone who wants to use it :)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

tnyeanderson avatar Apr 23 '19 22:04 tnyeanderson

It's technically possible and we should definitely aim to go there in the long term.

We would have to implement a proper merge dialoge (unlike the android app) as soon as we have offline capabilities of course, but starting from there, the way should not be huge :)

stefan-niedermann avatar Apr 24 '19 06:04 stefan-niedermann

Is it possible with the PWA functionality to edit notes directly within the nextcloud android/iOS App? Or behaves the notes browser page more like an app?

jakobroehrl avatar Apr 26 '19 05:04 jakobroehrl

Check out my project that I linked above if you want a webview-based app. It works fully as far as I can see (can view and edit notes, checkbox functionality works) and is pretty smooth (though there are a few quirks during loading/long sessions).

I'll reference nextcloud-notes#552 to answer your other question. Due to performance issues when loading long notes (over 400-500 lines), Stefan's app will not be supporting a webview editor (at least for the time being).

tnyeanderson avatar Apr 26 '19 12:04 tnyeanderson

Is it possible with the PWA functionality to edit notes directly within the nextcloud android/iOS App? Or behaves the notes browser page more like an app?

to answer the question directly: The website will behave more like an app :) This issue has nothing to do with the android app.

stefan-niedermann avatar Apr 26 '19 13:04 stefan-niedermann

After using my app for a while, I see one critical bug: autocorrect on my Android phone screws up CodeMirror during editing (because the word changes but a keydown event is not sent). This will need to be remedied before the app can be a PWA. This will also be something to keep in mind for #204

tnyeanderson avatar Apr 29 '19 16:04 tnyeanderson

Any updates? PWA is realy nice and reduce maintaince the news app while increase device secure because of less Apps.

Edit: ups. Wrong thread

beerisgood avatar Jul 23 '20 07:07 beerisgood

This is the Notes app. Please use GitHub reactions 👍 if you are interested in a feature. Those comments provide no new information and make it hard to read the issue.

stefan-niedermann avatar Jul 23 '20 09:07 stefan-niedermann