hzrd149 / nostrudel

A sandbox for exploring nostr
https://nostrudel.ninja/
MIT License
126 stars 38 forks source link

Reply gets wiped if you scroll too far #125

Open Giszmo opened 7 months ago

Giszmo commented 7 months ago

Screencast from 2024-01-30 19-55-55.webm

hzrd149 commented 7 months ago

oh... this is a side effect of the timeline optimizations. when a post scrolls too far off the screen it will disappear. then when you scroll up again it reappears. This is necessary because otherwise the app would try to render a timeline of 400+ notes :grin:

There's no easy solution to this, but I've been thinking it would be cool to save all drafts locally and show you which notes you have pending drafts on :thinking:

Giszmo commented 7 months ago

The gap where my reply was is clearly a bug. If a stored draft was found, it could re-populate it. Doesn't sound too hard. Otherwise when hitting reply again, the draft should be found and populate.

hzrd149 commented 7 months ago

It shouldn't be difficult to restore a draft. although IMO the difficult part about drafts is making the user aware they have a draft. If I start saving drafts then I have to show users somehow through the UI that they have an unsend reply or note and where to go to finish sending it. probably not difficult though

Giszmo commented 7 months ago

Drafts can hang around and wait for empty forms to fill in or they can have their own section where you can carefully craft several multi-post threads to be published on certain due dates. I would go for the low hanging fruit and fix the random data loss by not having a dedicated drafts section but just keeping the drafts around in case the user opens the same form again: