nextcloud / notes

āœŽ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
606 stars 134 forks source link

Make this app a PWA #306

Open tnyeanderson opened 5 years ago

tnyeanderson commented 5 years ago

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!](https://www.bountysource.com/issues/73240766-make-this-app-a-pwa?utm_campaign=plugin&utm_content=tracker%2F46751022&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F46751022&utm_medium=issues&utm_source=github).
stefan-niedermann commented 5 years ago

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 :)

jakobroehrl commented 5 years ago

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?

tnyeanderson commented 5 years ago

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).

stefan-niedermann commented 5 years ago

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.

tnyeanderson commented 5 years ago

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

beerisgood commented 4 years ago

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

Edit: ups. Wrong thread

stefan-niedermann commented 4 years ago

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.