ARK-Builders / ARK-Memo

ARK Memo is one app for all of your notes: it's aiming to combine plain text, voice and hand-written notes
MIT License
2 stars 3 forks source link

Dedicated title/description input fields #22

Closed kirillt closed 9 months ago

kirillt commented 1 year ago

If user edits the content with empty title, title should reflect first 20 characters of the content.

When the user overwrites the title, it stops reflecting the content.

User should be able to create a description, too. But it should be hidden by default.

shubertm commented 10 months ago

Partially solved in #19 Title field added Description field not added There was a change in the default title implementation. We no longer get it from the content. Default title is created as Note $timestamp

tuancoltech commented 10 months ago

Partially solved in #19 Title field added Description field not added There was a change in the default title implementation. We no longer get it from the content. Default title is created as Note $timestamp

@ShubertMunthali Thank you ~

shubertm commented 10 months ago

Title and description should be persisted separate from content when save is clicked, this is to allow editing title and description independently. Right now they are not independent even though they are stored in separate storage. And @kirillt could you please describe the new design of this feature

kirillt commented 10 months ago

@ShubertMunthali I don't think title and description really myst be stored in separate storages. Single json storage for any extra data should be fine. What do you mean by dependency between title and description? It doesn't seem to be an issue

kirillt commented 10 months ago

This issue is mostly about logic of the UI. When a user creates a note, we wait until we have 20+ characters of the content and take it as the title. More sophisticated logic could be applied, too.

No need to implement continuous tracking of the content to update the title, it seems to be over-engineering to me.

shubertm commented 10 months ago

@ShubertMunthali I don't think title and description really myst be stored in separate storages. Single json storage for any extra data should be fine. What do you mean by dependency between title and description? It doesn't seem to be an issue

@kirillt What I mean is, right now saving title and description is tied to save content. (title and description) are dependent on content in terms of saving logic. But they are stored in separate storage from content, not from each other :)

shubertm commented 10 months ago

This issue is mostly about logic of the UI. When a user creates a note, we wait until we have 20+ characters of the content and take it as the title. More sophisticated logic could be applied, too.

No need to implement continuous tracking of the content to update the title, it seems to be over-engineering to me.

Remember, when I added title field in #19. We discussed that instead of extracting title from content, we should provide default title and allow user to change it if they decide. And we have that implementation of the title now. What remains is the description field and to fix the saving logic. User should be able to save title only or description only or both whenever they are edited

tuancoltech commented 10 months ago

This issue is mostly about logic of the UI. When a user creates a note, we wait until we have 20+ characters of the content and take it as the title. More sophisticated logic could be applied, too. No need to implement continuous tracking of the content to update the title, it seems to be over-engineering to me.

Remember, when I added title field in #19. We discussed that instead of extracting title from content, we should provide default title and allow user to change it if they decide. And we have that implementation of the title now. What remains is the description field and to fix the saving logic. User should be able to save title only or description only or both whenever they are edited

@kirillt What's your thought on this? What should be the logic for the title now?

Also, I'd like to make it more clear for below point:

User should be able to create a description, too. But it should be hidden by default.

-> This means we should provide user with a description field when creating a new note, but hide it from the note list UI?

kirillt commented 10 months ago

@tuancoltech the description field should be empty by default, UI should have an input for filling it. We could hide the description inpit with chevron or something else.

The automatic title is an advanced version of plain default value (right now some text + date).

tuancoltech commented 10 months ago

@tuancoltech the description field should be empty by default, UI should have an input for filling it. We could hide the description inpit with chevron or something else.

The automatic title is an advanced version of plain default value (right now some text + date).

@kirillt So, regarding note title, every newly created note will have a default title as text + date at the moment. I'm not sure in which case it should reflect the first 20 characters of the note content then?

kirillt commented 10 months ago

I'm not sure in which case it should reflect the first 20 characters of the note content then?

As I see it, before the user typed 20 characters we have the default title. The default title is replaced by first 20 characters when the note becomes long enough.

kirillt commented 10 months ago

@tuancoltech Sorry for the change. After thinking through the flow I suggested before, I've realized we can throw "default title" away completely and implement simple "automatic title".

Automatic title

Tangential thoughts We don't care about empty notes because we don't save them. We don't save duplicate notes, too. So we don't need to distinguish duplicates, so we can always take the content as the title, if it's short. We can have similar titles for long notes. I think, we can just display dates and/or timestamps next to note titles, in the notes list. We allow duplicate titles.

tuancoltech commented 10 months ago

@tuancoltech Sorry for the change. After thinking through the flow I suggested before, I've realized we can throw "default title" away completely and implement simple "automatic title".

Automatic title

  • If user has explicitly set the title, we store it in the properties and display it always.
  • If user hasn't set the title, we store empty title in the properties and display first 20 characters of the content. Or the whole note if it's shorter than 20 characters.

Tangential thoughts We don't care about empty notes because we don't save them. We don't save duplicate notes, too. So we don't need to distinguish duplicates, so we can always take the content as the title, if it's short. We can have similar titles for long notes. I think, we can just display dates and/or timestamps next to note titles, in the notes list. We allow duplicate titles.

@kirillt Thanks for making it clear. I'll implement it base on this idea.