MaxLap / standard-notes-indent-editor

A simple text editor that makes it easy to write and read nested notes in https://standardnotes.org/
GNU Affero General Public License v3.0
48 stars 2 forks source link

Bug: Line wrapping not working on big screens #16

Closed ghost closed 4 years ago

ghost commented 4 years ago

Thank you for this wonderful sn editor!

As I understand the auto line wrapping function correctly, then all chars that passes the ~50 chars mark, should wrap into a paragraph.

So i think this is a bug.

MaxLap commented 4 years ago

Hello, glad you like the editor!

Line wrapping always happens when there would be a natural wrapping. However when it does, the width of the paragraphs is limited. That's the way i intended it, as i use the editor mostly for list of things. I prefer a list of long lines with occasional paragraphs instead of having lots of paragraphs.

So I can't call it a bug, but it is not optimal if you often write lots of paragraph on wide screens. You end up with occasional long lines in your series of paragraphs.

Ideally, I would have a configuration per note to choose between some different wrapping behaviors. But I don't know how to do this in SN, and haven't found the time to figure it out and implement it.

ghost commented 4 years ago

Line wrapping always happens when there would be a natural wrapping. However when it does, the width of the paragraphs is limited. That's the way i intended it

Thats the way i expected it. (Edit:) or when reached the ~50 char. But if i have 3 diverent devices, and all 3 devices have a screensize to fit more than 100+ chars, why 2 of them wrap at 50 chars correctly, and one of them at 200+ chars? That was not my expectation.

MaxLap commented 4 years ago

On my laptop, the wrapping happens around 100 characters. On my mobile phone, it is not wide enough, so wrapping is just the normal one and takes the whole width of the screen. I don't have an iPad or a Surface, so I can't compare.

All i do is set a max-width of 50em on the line when it is naturally wrapping. Then, it will depend on font, font-size, browser, possibly on screen DPI, probably other things i'm not aware of.

Without being able to reproduce the problem, I can't help you.

ghost commented 4 years ago

Ok, I get it. So forcing a wrap with e.g. shift+enter shortcut could be a solution?

As a workaround, I playing with the resize margin function that SN provides. I set it to ~85 chars, so the wrap accours pretty on the same width on all devices.

And again, thanks for this editor!

MaxLap commented 4 years ago

Yeah, i guess if it doesn't happen too often, manually changing the line may be good enough of a work around.

And glad the margin resizer can make it more manageable. Good luck!

ghost commented 4 years ago

Thanks for providing an option for this in the latest release!