Post drafting #282

Merged
floatingghost merged 2 commits from solidsanek/pleroma-fe:drafts into develop 2023-03-10 18:55:03 +00:00
Contributor

If I ever write another lengthy reply and accidentally close the reply button only to lose what I wrote I will go insane. It works similarly to Misskey's draft feature that I also explained a bit here #281

What it does:

  • On every post/reply/quote change, it saves the whole content in a draft in a "drafts" item in the browser's local storage
  • Each reply and quote is saved separately by having ID specific keys
  • If the body/subject is empty, there are no files and the poll is empty (has no options) the draft is deleted
  • If the post/reply/quote is sent, the draft is deleted

What could be improved:

  • Use the server-side profile feature to synchronize drafts among all devices
  • The way draft keys are built. It kinda sucks

What doesn't work:

  • Poll options are saved and restored correctly, however I cannot manage to display the poll form. Using the toggle doesn't seem to work.
If I ever write another lengthy reply and accidentally close the reply button only to lose what I wrote I will go insane. It works similarly to Misskey's draft feature that I also explained a bit here #281 What it does: - On every post/reply/quote change, it saves the whole content in a draft in a "drafts" item in the browser's local storage - Each reply and quote is saved separately by having ID specific keys - If the body/subject is empty, there are no files and the poll is empty (has no options) the draft is deleted - If the post/reply/quote is sent, the draft is deleted What could be improved: - Use the server-side profile feature to synchronize drafts among all devices - The way draft keys are built. It kinda sucks What doesn't work: - Poll options are saved and restored correctly, however I cannot manage to display the poll form. Using the toggle doesn't seem to work.
solidsanek added 1 commit 2023-02-17 13:26:30 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
00704bd88c
Post: Add drafting feature
solidsanek added 1 commit 2023-02-19 17:59:19 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
2c007f06e3
Post: remove debug logs

heyyyy that's pretty cool - we can figure out the poll stuff later

for an initial pass this is good, thanks a lot!

i'll add to "future improvements", maybe a time-to-delete? otherwise we might end up slowly eating up localstorage 🙃 but hey not like posts are big

heyyyy that's pretty cool - we can figure out the poll stuff later for an initial pass this is good, thanks a lot! i'll add to "future improvements", maybe a time-to-delete? otherwise we might end up slowly eating up localstorage 🙃 but hey not like posts are big
floatingghost merged commit 0f33b1cd79 into develop 2023-03-10 18:55:03 +00:00
floatingghost deleted branch drafts 2023-03-10 18:55:03 +00:00
Sign in to join this conversation.
No description provided.