Closed
Description
There are many issues about the issue editing problems. Including:
- The EasyMDE/CodeMirror is not as fluent as a native textarea.
- Mobile experience (especially for Android by EasyMDE/CodeMirror).
- Failed request causes content lost (CSRF token expires after 24h, account switch, network problem).
- Page load would lead to content lost (Close browser, improper in-page reload, etc).
- Old content would be overwritten without any feedback when editing existing comments.
- The attachments (drop-in upload, pasting upload) are difficult to manage, code was messy.
Proposal:
- Replace the EasyMDE/CodeMirror with a native textarea editor like GitHub
- The EasyMDE doesn't improve user experience too much, it's not a real wysiwyg editor.
- If there is no objection from most users and big communities (ps: @brechtvl @drsybren I guess you are using Gitea for Blender, could you help to confirm do your users prefer EasyMDE or native textarea like GitHub?)
- Always use AJAX to submit comments
- Then there is a chance to show errors/feedbacks to users if anything wrong happens or the old content had been
changed before this edit. - The first step Change form actions to fetch for submit review box #25219
- Use fetch to send requests to create issues/comments #25258
- Then there is a chance to show errors/feedbacks to users if anything wrong happens or the old content had been
- Use LocalStorage to save drafts
- No server-side storage because many people care about "privacy", they do not want to send drafts to server.
- The details are complex, and there is no perfect solution yet. So we can just do our best to avoid losing contents, and maybe it's fine to leave some "already submitted contents" in draft for a short time (rare case)
- Refactor the legacy dropzone code and uploading code.
(there are a lot of related issues, I may link them here later)