Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the "town hall" (meta-discussion site) for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Add a "Discard draft" button

+1
−0

If I want to discard a draft question/edit and start anew, I have to click Cancel then find my way back to the ask/edit page, or navigate back and refresh. I'd like to have a Discard draft button to do it directly.

Additionally, it's not super obvious that "Cancel" will discard a draft, so this would be good to add an explicit method.

More info

For reference, for a new question or answer, discarding means blanking all the fields. For an edit, it means reverting the fields to before starting the edit.

One pitfall I can imagine is that discarding an edit would require pulling the saved state, and if you naively pulled the current state of a post, it may have been edited in the meantime. Instead, it would be better to remember the state of the post from before starting the edit, which might be accomplished by tracking the revision number and pulling that, or saving the whole post content in the browser cache and repopulating it.

As a sort of alternative, "Cancel" could be changed to "Cancel and discard draft" where appropriate. This would at least make it explicit. Even hovertext would help, like "Cancel writing this post and discard any saved draft".

What I have in mind would not require refreshing the page, in which case it would be good to add the button to the answer box too, so that an answer draft can be discarded without having to refresh the page. But this is only a minor annoyance.

Previous feature requests:

History

0 comment threads

1 answer

+0
−0

This won't help with your concern that the post may have been edited by someone else while you were drafting, but you can discard your draft without leaving the page using the red bin button at the right hand side of the editing toolbar above a post being edited:

The editing toolbar showing a bold button, an italic button, various others, and finally the red bin button

Its hover text says "Delete saved draft". Ideally there would also be a way to see this text on touch screen devices which do not have the ability to hover.

This does not currently return the text you are editing to how it was before you started editing. It just deletes the saved draft from the server. Unless you switch off draft saving in your user preferences another draft will be saved once you continue typing.

It sounds like what you would like is either a separate button that restores the initial state of the post (which would be empty for a new post), or for this red bin button to do that also. If you want this to happen without a page reload, then perhaps the page should keep a copy of the initial state as you suggest.

It would be useful to hear from anyone who would object to the red bin button having this additional behaviour. Is there anyone who wants the red bin to only delete the draft from the server, and not revert the text to its initial state?

History

3 comment threads

Terminology (2 comments)
"your concern that the post may have been edited by someone else while you were drafting" (2 comments)
What does this button do exactly? (2 comments)

Sign up to answer this question »