notes
notes copied to clipboard
Share a single note / publish
It would be shown in »read only« mode of course (see also https://github.com/nextcloud/notes/issues/23). Basically the page like for share links with the blue header, in the content only the note text, formatted properly (no Markdown highlight stuff) and on the top right a download function.
The share icon could be in a 3-dot menu in the left navigation, where also »Delete« should be placed now that we get more stuff. We could layout it like in the Spreed app, where quick sharing by link is possible:
Clicking on »Share link« shows the link in an input field below and also shows a copy button. We could also use the clipboard API to directly copy the share link to the clipboard.
We don’t need full-blown sharing with others on the same instance yet I’d say since there’s no realtime collab anyway. This is about publishing mainly. :)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Note that you can share a not by sharing the file (in the Notes folder) with the File app.
But the note will be stored in the root folder of the user, not in Notes folder.
@roipoussiere yep, of course. That requires you to switch the app, find the note, share it, and go back to the Notes app. ;) Hence the direct integration is needed.
With the markdown app there is currently also no option to share the rendered markdown (as it was requested here), but there is a related request for such feature https://github.com/icewind1991/files_markdown/issues/29
It needs to be shared in the notes folder not the files folder. This is not sharing a note - it is sharing a file.
I'd like the shared note to be available in the notes app on the phone.
You should be able to make it visible in the notes app by moving the shared file to the Notes folder manually. However this is really annoying.
I looked into the file sharing code and unfortunately the target folder is always set to the system default folder for sharing, usually the user's root folder, so there's no easy way to solve sharing a note directly using the file sharing API unless something changes in the files_sharing app.
As I'm still fairly new to the whole code-base I'm still unsure how/if dependencies between apps would be handled.
@nextcloud/sharing @schiessle any help regarding sharing here is appreciated. :)
The last comment is from 2018 ... any update? Did / will it make it on the roadmap?
I really agree that this is a kind of essential feature: IMO sharing is one of the key core concepts of nextcloud!
I noticed that the notes app saves the notes as files with .txt extension. This way, however, you need to rename the note via files app first to .md in order to be able to share it as rendered HTML.
At least it seems to work that the notes app can handles md-files as well.
I noticed that the notes app saves the notes as files with
.txtextension. This way, however, you need to rename the note via files app first to.mdin order to be able to share it as rendered HTML.At least it seems to work that the notes app can handles
md-files as well.
You can change the file extension for new notes to .md using the app settings (it's in the lower left corner). But that's totally off-topic here.
Sharing notes is still on the agenda. Any Pull Requests are very welcome!
As mentioned in the original post, the "Share" action should be in the menu of the note. :)
Then we can open a modal just like for Calendar, which content-wise looks like we do sharing anywhere like in Files, Forms, Calendar etc.:
@jancborchardt There are a few things not very clear to me, so maybe you can clarify the full user flow especially in terms of file shares.
- We would be using regular file sharing and just share to the user?
- In this case it might be more sensible to just reuse the sharing sidebar to not require double implementation effort for the same logic
- A note is just a file that is shared, so we would need to make sure it gets added to the recipients notes folder when sharing through the notes app?
- Receiving users may still be able to manually move the file out again, there is no relation then to know that it was related to the notes app after that
We would be using regular file sharing and just share to the user?
Share to accounts, but yeah the original issue also includes "publishing", so sharing by link.
In this case it might be more sensible to just reuse the sharing sidebar to not require double implementation effort for the same logic
Yeah sounds good, however we need to keep in mind that Notes already uses the 3 column layout, which is why I suggested the modal. But yes the content could be the same as in the Files sidebar. If you think sidebar works we can try that as well, maybe it’s not an issue with the space.
A note is just a file that is shared, so we would need to make sure it gets added to the recipients notes folder when sharing through the notes app?
Yeah would probably be good, and we then probably also need an indicator in the list for sharer and sharee.
Receiving users may still be able to manually move the file out again, there is no relation then to know that it was related to the notes app after that
Yeah and that is fine, right? It would still be in the Notes folder for the sender, and the receiver can move it wherever they like. It will not be in their Notes app but that’s cause they moved it out.
All right, let me summarize the implementation idea then a bit:
- Backend
- When sharing a note from the notes app it should be added to the recipients notes folder
- We can use the BeforeShareCreated event for that, just would need to check if the source file is actually located in the owners notes folder
- When sharing a note from the notes app it should be added to the recipients notes folder
- Frontend
- We introduce the files sidebar for notes (
window.OCA.Files.Sidebar.open)- We want to avoid to rewrite the frontend share logic and rather reuse existing parts
- This will account for sharing internally or public links and
- This will also give access to activity, versions
- Versions might need special handling, but not sure if version preview with the viewer isn't already working out of the box
- Add an indicator to the note list that a note is an incoming/outgoing share
- Having the sidebar might be tricky with the 3 column layout, we may want to collapse the left panel if the sidebar is open by default
- The already existing sidebar should be dropped (already ongoing in https://github.com/nextcloud/notes/pull/1004)
- We introduce the files sidebar for notes (
My suggestion would be to try with the sidebar as a first step. We can later on still see if we can isolate the sharing tab and have it also available in a modal, but I think we should not implement our own logic for file sharing as there are just too many edge cases to consider.
Sounds good @juliushaertl!