etesync-notes icon indicating copy to clipboard operation
etesync-notes copied to clipboard

Feature request for Web: Save position between preview and editor and vice versa

Open andreas1107 opened this issue 4 years ago • 11 comments

  • Open a note and write more than fits on your screen
  • Scroll down to the bottom and click Preview

==> Previous starts at the top of the note

Would be nice if Previous shows me where I was writing.

Similar:

  • Scroll down in preview mode and press Edit

==> Editor starts at the top of the document

Would be nice if editor shows me the part of the note I was looking at in preview.

It would make it much easier when writing longer notes and needing to, for example, check formatting of markdown, or wanting to make sure it is regularly saved.

Thanks!

andreas1107 avatar Jan 16 '21 13:01 andreas1107

Thanks for opening the ticket, it's actually not trivial (because of different sizing), but it's something we plan on taking a look at at some point.

tasn avatar Jan 17 '21 11:01 tasn

Ok, I'm not sure how this would work technically, but I wouldn't mind if it's not exact - like a rough placement would be good IMO.

andreas1107 avatar Jan 17 '21 12:01 andreas1107

I think @zecakeh spent quite a bit of time thinking about this, so maybe he can provide some input.

tasn avatar Jan 17 '21 12:01 tasn

I haven't really looked at it in native mode. At the time it was inside a webview.

However, it should be trivial if we store the scroll position from the scrollview in state as a relative position and use it when we switch view.

zecakeh avatar Jan 17 '21 13:01 zecakeh

It's not as simple as storing the scroll position. A better bet would probably be to store the proportional scroll position (e.g. 30%), though even that will be massively skewed due to titles and images.

tasn avatar Jan 17 '21 14:01 tasn

I know it'll probably be skewed, but it's better than nothing. I think overall it should be a better experience than without that.

zecakeh avatar Jan 17 '21 14:01 zecakeh

Probably.

tasn avatar Jan 17 '21 14:01 tasn

I'd like something similar, but instead of scrolling to where you were in the other mode, I'd like it to scroll back to where it was before I switched out of the mode. This functionality partially overlaps with the one described above.

E.g., say I am looking at the third paragraph of my text in view mode and I notice a typo. I switch to edit mode, fix the typo, and then switch back to view mode, where instead of showing me the top of the text, it shows me where I left off (which is paragraph 3).

I think most people have a similar style of working, where they edit something and then switch back. Or where they add a new paragraph 4, and then check view mode to see what it looks like. The proposed functionality would then show paragraph 3 (because that's what we last looked at in view mode), which is right above our new paragraph.

Salt-Factory avatar Feb 09 '21 15:02 Salt-Factory

Another, related, request that may need its own ticket(?): Can also the scroll position be saved between notes list and note content?

  1. See notes list
  2. Scroll down to select a note
  3. Open the note
  4. Maybe switch into note, edit something small, then preview, then go back to notes list

==> currently I'm at the top of the notes list

It would be ideal if the scroll position of notes list could be saved, so I don't need to scroll down and find where I was.

NOTE: This already works after using Search. Scroll position is saved if I searched for something previous and open note after a search and then go back.

andreas1107 avatar Mar 16 '21 08:03 andreas1107

I believe it's better if it's in its own ticket since those will be implemented separately

zecakeh avatar Mar 16 '21 08:03 zecakeh

OK thanks, created a new one for that one

https://github.com/etesync/etesync-notes/issues/172

andreas1107 avatar Mar 16 '21 14:03 andreas1107