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

Add a title to a sticky note #40

Open
Nokse22 opened this issue Mar 22, 2023 · 13 comments
Open

Add a title to a sticky note #40

Nokse22 opened this issue Mar 22, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@Nokse22
Copy link
Contributor

Nokse22 commented Mar 22, 2023

The top left of the note when closed fells a little empty.
I would suggest adding the possibility to add a title to every note. Maybe with a dedicated text box when a note is opened or using markdown, like if there is a # in the first line the text after it becomes the title

Screenshot from 2023-03-22 11-36-56
This above is a concept

@vixalien
Copy link
Owner

this is very interesting.

I was planning to add an edit button at the start of where the title would be (see #34 ) and I'm not sure how they would work together

if you have an idea if how those features would work, please lmk

or we can just leave as-is. to make a note look like it has a title, I usually just bolden the first paragraph

@Nokse22
Copy link
Contributor Author

Nokse22 commented Mar 23, 2023

Maybe like this? I don't know how the title feature could work tho.

For sure I you put the edit button on the left it would feel less empty.
Screenshot from 2023-03-22 11-36-56

@JamesL813
Copy link
Contributor

I think this is a good idea and could help make the header bars in the note window look less empty. Especially when unfocused.

title_focused
title_unfocused

Not sure the best way to implement this intuitively, though. I don't love the idea of the title bar being clicked on to edit, like in gnome-notes. I found it kind of annoying seeing a text box with "Untitled" on every new note. What I like about Sticky Notes is how clean it looks and how easy it is to quickly make new notes.

Screenshot from 2023-03-23 12-21-26

If you choose to implement something like this, I think it should be optional and non-intrusive. A few possible ideas:

  • If the first line is bold or has a "#" before it, it becomes the title as mentioned above
  • In the note window there's a "✏️" button on the header bar, or an "edit title" button in the hamburger menu
  • Title can be edited in the main window
    (Something like this?)

menu-titles

Although this does kind of conflict with the previous comment. I personally think a single or double-click on the main text is intuitive enough that an "edit note" button is unnecessary, but that's just me.

Anyway, sorry for the long comment, lol. LMK your thoughts!

@vixalien
Copy link
Owner

hey there James. here's my notes:

  1. in the first mockup, note that the title will be CENTERED, not aligned to the left. hence the title will be truncated much more often (long titles are a no-go)
  2. if I make it so that the first text that starts with a "#" is a title, does that mean that it is automatically removed from the body of the note, then put into the title? Or does it stay there?
  3. The "edit" button in the all notes window is kinda ambigous because at first look it seems that it's to open the NOTE, and not the TITLE

@JamesL813
Copy link
Contributor

So it might look more like this:
long-title
And yeah, those two ideas are not ideal. Maybe just a text box on each note in the main window? I can't think of a good, intuitive way to add/edit a title in a note window, though. Other than possibly an option in the hamburger menu or a button on the lower menu separate from bold italic etc.

There might be a good way to have a text box within the header bar, I just don't love the idea of seeing "Untitled" or a glowing blue text box in the header bar of each new note window.

Screenshot from 2023-03-24 13-25-07 Screenshot from 2023-03-24 13-24-47

If the text box was empty and unfocused for each new note (like on the left), it could work. I think it should turn into a title on hitting enter to avoid looking like the picture on the right. However, people might want to immediately change a mistake in the title after hitting enter. I don't know if there's a creative way to make a title turn into a text box on clicking it, and then turn back into a title on hitting enter (I'm not super familiar with GTK or JavaScript development). If there is, I think that'd be the most intuitive way to do it.

@vixalien
Copy link
Owner

conveniently enough, there is a Gtk.EditableLabel widget that can handle this for us quite gracefully...

however, there are some caveats right now:

1.when the title content is too long, the note window expands (can be solved either by allowing this if it's the desired behavior, or ellipsing the text)
2. the app won't be draggable using the headerbar, since the editablelabel will handle the drag events (can be solved by requiring a double tap to edit the label, but this is not something easy to do, and might break mobile support)
3. this still doesn't solve how it might appear in the "all notes" view

also note that the note will STILL be ellipsised even when it's not focus (i.e when the window decorations (close, menu, new note) are not visible)

here's a video of how it would look like if implemented

Screencast.from.2023-03-24.22-47-28.webm

@vixalien
Copy link
Owner

also forgot to note that for users with multiple window decorations (close, minimise, maximise) the label will have very little space (don't know if it's really a problem though)

@JamesL813
Copy link
Contributor

Yeah, dragging the app should definitely be a priority.

To me, an "Edit Note Title" option in the main menu button for individual notes, and regular text boxes for notes in the main window seem like the next best solutions.

@vixalien
Copy link
Owner

to be honest I'm not really sure right now if we really need to have a title for notes.

this is because 1. there's no intuitive way to do it and 2. the size constraints

for example, in the all notes view, there will be an edit note button (see #34 ) and in the notes window there could be a pin button (see #39 )

and you can have functioning titles by effectively boldening your first line and it will appear in the all notes window, so I think this is pretty unnecessary and hard to implement

@fwinkl
Copy link

fwinkl commented Jan 9, 2024

I came across this feature request while migrating from xpad to this app. xpad handles this very similar to this suggestion:

If the first line is bold or has a "#" before it, it becomes the title as mentioned above

(it doesn't require any special formatting though). The first line then simply becomes the gnome window title. And yes, if window decorations are used, the text appears both in the window title and as part of the body:

Screenshot from 2024-01-09 11-18-27

But I don't think that's an issue. It makes finding notes via the window list much easier though as you can see in the following screenshot comparison (xpad also doesn't have a main overview window):

| Screenshot from 2024-01-09 11-07-23 | Screenshot from 2024-01-09 11-07-07 |

Maybe this minimal option that doesn't require any new UI elements could still be considered.

@vixalien
Copy link
Owner

vixalien commented Jan 9, 2024

@fwinkl I like your proposal. I'll definitely start looking into the implementation

@vixalien vixalien removed the wontfix This will not be worked on label Jan 9, 2024
@TriVoxel
Copy link

I actually came here to propose this feature... So glad to see it's already planned!

@TriVoxel
Copy link

TriVoxel commented Feb 17, 2024

to be honest I'm not really sure right now if we really need to have a title for notes.

this is because 1. there's no intuitive way to do it and 2. the size constraints

for example, in the all notes view, there will be an edit note button (see #34 ) and in the notes window there could be a pin button (see #39 )

and you can have functioning titles by effectively boldening your first line and it will appear in the all notes window, so I think this is pretty unnecessary and hard to implement

What about instead of a label that can be renamed with an icon, or by clicking the text, new notes could have a basic, centered button with some text like "Name note", which can popup a little modal to set the name. Once created, the button goes away, and the standard LibAdwaita window title is used? There could be a "Rename" button in the "Main Menu" of the note, and something like this context menu I mocked up could be used to rename it in the main app: #115?

also forgot to note that for users with multiple window decorations (close, minimise, maximise) the label will have very little space (don't know if it's really a problem though)

IMO, not really a problem. People will just resize it to read the title, or choose short titles. I think consistency with LibAdwaita would be worth it. Currently, feels odd not having a window title at all, yet having the wasted space cover the content of the document anyways... Could be coded to (if elipsized) print the full title in a popover when the mouse is hovered over the title, like this implementation in Epiphany:

Screenshot from 2024-02-16 21-10-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants