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

Notes structure (Title line handling) #6

Closed
caco3 opened this issue Mar 22, 2013 · 14 comments
Closed

Notes structure (Title line handling) #6

caco3 opened this issue Mar 22, 2013 · 14 comments

Comments

@caco3
Copy link
Contributor

caco3 commented Mar 22, 2013

The structure of the notes should be in a way that most client can handle it correctly.
I.e. what is representing the title?
Is it the first non empty line of the note? Or is it the file name (excluding the file extension?)
"khtNotes" currently uses the file name as title. Same on my original notes app.
"Papyrus Ex" has support for both (not sure what was default).

How is it handled in other notes apps working with WebDAV?
What apps are available?

@jancborchardt
Copy link
Member

The title line handling done now is very intentional: first non-empty line of note == title == file name (+.txt). Very simple and quick to change.

iOS Notes does the same for example. So does Litewrite. iA Writer has a separate title (which is easy to change though) but it’s a slightly different use case (less notes, more writing longer stuff).

@jancborchardt
Copy link
Member

What do you think @caco3?

@caco3
Copy link
Contributor Author

caco3 commented Apr 1, 2013

@jancborchardt: I am not sure what you mean by your "note == title == file name (+.txt)" expression.

As a site note:
In case we use the file name for the title, there are some open questions/issues:

  1. When the title gets changes, does the file name change as well?
  2. Which characters would be allowed? Certain file systems only support certain characters.

@jancborchardt
Copy link
Member

I mean that »first non empty line of note« equals the »title« (shown in the list to the left) equals the »file name« (plus the .txt).

As for the questions:

  1. Yes, both change.
  2. UTF-8 I guess? Just like what ownCloud supports.

@pyluyten
Copy link

"1. Yes, both change"

'first empty line == title' is the user xp.
but why file name? to access through files directly?

@jancborchardt
Copy link
Member

@pyluyten yeah, since we use the filesystem for storing the notes, we have to have some file name. And the title/firstline makes most sense. Or what do you mean?

Also, I misspoke: I meant »first non-empty line« not »first empty line«.

@pyluyten
Copy link

more precisely : we need some file name, but to me keeping file name = title only makes sense if the user directly access the note trough the files system. Otherwise, if the user only access notes via Notes application, the file name might as well be anything, especially something not changing.

For example Tomboy generates a random unique string (but also has title=first row). As the first row is edited, the title change, but note the file name, since notes are only accessed with the app, not directly as files.

To me a constant file name is not a disadvantage but is a potential helper for the future ( = on the worst case it would be the same)

@caco3
Copy link
Contributor Author

caco3 commented Apr 21, 2013

The great advantage of using the title as file name is that I can use the notes on any WebDAV client without requiring a notes app.
I.e: I sync my notes also to my local machines. Now, If required, I can edit the notes with a normal text editor instead having to install a notes client.

@jancborchardt
Copy link
Member

»if the user directly access the note trough the files system« – and exactly that happens. ;) When you sync down your ownCloud with the desktop client, you can use any notes app or editor you wish (like @caco3 said). Also because it’s exposed in the Files app it should not be a random string.

So »title == file name« is definitely a requirement. The title / first line should probably not change if the file name is changed, but the other way around always (and that always takes precedence, because it comes from the document content..

@butonic
Copy link
Member

butonic commented Apr 22, 2013

I agree with @caco3 and @jancborchardt that "title == file name" is a requirement. Keep in mind to deduplicate file names when the title is the same as another note title. there already is some magic for this in the sharing app to automagically append a " (2)" or " (n)" to an already existing file name.

@pyluyten
Copy link

ah ok if notes are read or even edited directly, of course this explains the constraint for file name.

@butonic it could make sense to deduplicate note title as well, to keep the "title / file_name" rule and more importantly to let the user know there already was some note with such title.

@nodiscc
Copy link

nodiscc commented Jun 22, 2013

I don't know if I did understand this discussion correctly. From my point of view, the app should behave as:

  • File already exists: do not alter the filename when it's loaded/saved in the Notes app
  • Creating a new file from the notes app: name it whatever you like (date,hash,first line of text...)

See this issue owncloud/android#183 which is about storing other app's notes in the owncloud directory, and the related spacecowboy/NotePad#120 issue. As long as we don't have a proper notes management solution in the Owncloud Android app, I think it's safer to not alter filenames when it's possible (to maintain compatibility with android note-taking apps)

Thanks

@BernhardPosselt
Copy link
Contributor

This is implemented, what now? Can I close the issue?

@jancborchardt
Copy link
Member

@Raydiation can you contact the authors of the 3rdparty apps which @caco3 mentioned. Or does the new Notes app work with these already? we should make sure that syncing is possible and working for many existing mobile and desktop apps so people can just sync it up with what they use now.

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

No branches or pull requests

6 participants