notes icon indicating copy to clipboard operation
notes copied to clipboard

Share a single note / publish

Open jancborchardt opened this issue 8 years ago • 9 comments

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: capture du 2016-12-15 16-22-04 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.

jancborchardt avatar Dec 16 '16 15:12 jancborchardt

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.

njourdane avatar Feb 22 '17 17:02 njourdane

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

jancborchardt avatar Apr 30 '17 15:04 jancborchardt

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

palto42 avatar Oct 01 '17 09:10 palto42

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.

dcrobertson01 avatar Feb 01 '18 22:02 dcrobertson01

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.

trurli avatar Apr 14 '18 13:04 trurli

@nextcloud/sharing @schiessle any help regarding sharing here is appreciated. :)

jancborchardt avatar Jun 04 '18 21:06 jancborchardt

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!

ptandler avatar Dec 27 '21 12:12 ptandler

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.

ptandler avatar Dec 27 '21 12:12 ptandler

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.

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!

korelstar avatar Feb 06 '22 20:02 korelstar

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.: image

jancborchardt avatar Jul 14 '23 13:07 jancborchardt

@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

juliusknorr avatar Sep 05 '23 15:09 juliusknorr

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.

jancborchardt avatar Sep 11 '23 12:09 jancborchardt

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

juliusknorr avatar Sep 12 '23 12:09 juliusknorr

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.

juliusknorr avatar Sep 12 '23 12:09 juliusknorr

Sounds good @juliushaertl!

jancborchardt avatar Sep 18 '23 09:09 jancborchardt