NickColley / semaphore

Accessible, simple and fast web client for Mastodon
https://semaphore.social
GNU Affero General Public License v3.0
173 stars 27 forks source link

When using 'delete and redraft', clicking outside the pop-up #77

Open strypey opened 1 year ago

strypey commented 1 year ago

Description of the issue

When using 'delete and redraft', clicking outside the pop-up causes me to completely lose my draft.

How you found the issue

Steps to reproduce the behavior:

  1. Go to an existing post
  2. Click on the 3 dots menu at the bottom
  3. Select 'delete and redraft'
  4. Click anywhere outside the popup
  5. The popup disappears and the contents on the post with it.

What you expected to happen

easrng commented 1 year ago

Reopen the compose dialog by scrolling down on the timeline and clicking the new post button.

strypey commented 1 year ago

@easrng:

Reopen the compose dialog by scrolling down on the timeline and clicking the new post button

That works, but that "new post" button is extremely non-obvious, and there's no obvious reason to expect it would bring back the pop-up. It would be more obvious, and require fewer clicks, if clicking delete-and-redraft on a;

a) Reply; turned the post back into the kind of draft it was before being posted

b) Post; dropped the draft back into the compose window at the top of the timeline, where it was before being posted

I'm not sure why that pop-up modal exists. The only feature that uses it AFAICT is delete-and-redraft, possibly because it was a bolted-on proof-of-concept, that Nolan never got around to replacing. If you modified the UI to work as I describe above, I think you could completely remove the code for that pop-up window.

Bonus; an edit function could be added to the UI by doing the delete-and-redraft without the delete, and plugging the posting logic into the post editing part of the API, instead of the new post one.

easrng commented 1 year ago

Bonus; an edit function could be added to the UI by doing the delete-and-redraft without the delete, and plugging the posting logic into the post editing part of the API, instead of the new post one.

I already implemented that in my fork :3 (easrng/enafore, enafore.social)