Should "Yes, delete it" be red, or green?
ux.stackexchange.com
ux.stackexchange.com
I can think of two ways to implement undo.
1. Use flags in the database, this method has its own drawback since the entry is not really deleted but flagged as one.
2. Client side. Delay the actual delete request to the server.
And if the user clicks UNDO, do a ROLLBACK?
Edit: Of course, if anything goes wrong before the COMMIT, you loose the transaction.
Database transaction are like try/except blocks - designed to clean up unexpected situations instantly, not as a state mechanism.
Alternatively you could also have a very primitive form of version control : recycle-bin (edit: actually this is the same as point 1 =) )
- user X modified article Z
- user Y deleted article Z (revert?)
Note that I've only studied this in passing, and have never applied this in practice, so I can't answer just how effective this could be. Also not really sure how this works when other actions have already taken place, or how you can detect if an event cannot be recovered from (if there is such a thing)."Similarly, Joseph Gentle who is an ex Google Wave engineer and an author of the Share.JS library wrote: Unfortunately, implementing OT sucks. There's a million algorithms with different tradeoffs, mostly trapped in academic papers. The algorithms are really hard and time consuming to implement correctly. ... Wave took 2 years to write and if we rewrote it today, it would take almost as long to write a second time."
See this SO question for further detail and links: http://stackoverflow.com/questions/701131/data-structure-use...
Removing credit cards, as well.
I dunno, do you really think it's rare for startups to be deleting data?
For example, someone on HN probably deletes a comment every few seconds. The site is therefore deleting data constantly. But all that only counts as one single situation.
Is there any other situation where an HN non-admin ever deletes data?
(1) Sally deletes an employee record
(2) Bob deletes that employee's department
(3) Sally tries to undo the deletion of the employee - will the employee be restored without a department?
Under complete presumption: Bob is an HR member while Sally is a Manager. Why? The ability to manage entire groups should be left to people higher up in the administration chain where individual users should be delegated to HR or other staff.
Bob should have permissions to manage users but not groups. Sally should have permissions to manage both. If Bob deletes a user, then Sally deletes the group, there should be no reason that Bob should be able to anything outside his domain. The group should not be restored and Bob should be given a clear, 'plain English' reason why he can't do such an action.
If both Sally and Bob are managers of a group and said situation occurs, no group should be restored when Bob restores a user. Only a readable error message should occur. In fact no data to be restored should be there in the first place unless it has been backed up or cached.
What is a possible solution to this logic?
1.) You could implement an optional backup system. All deletes are final in the context of the action. Think of a common tree structure: if no main branch is there to support a twig then no twig can hang. No restores via users can be performed until the group has been restored. The deleted data could be stored in a cache until certain parameters are met; once these are met the data is deleted (IE: Recycle Bin)
2.) Users could be restored belonging to a default group. If a recently deleted member of a recently deleted group needs to be restored, they could be assigned to a default 'holding' group or other similar group with restricted permissions. This retains all specific user data which is not lost and by default the user will not be given extraneous or extra permissions. They can then be assigned to an appropriate group.
3.) Removing a group does not affect users within it. This is the opposite of a tree structure. This is analogous to Linux group and user permissions. A group can be assigned to users so they can access a resource. They are not interconnected in any way other than their usage to control permissions. Users can be removed and restored at will and so can groups. No conflicts of hierarchy are incurred.
In summary, restoring an individual resource should never restore the controlling body without given consent. This would create a lot of problems if it did.
- git-style 3-way-merge
- Google Wave -style operational transform
If somebody is experienced on the topic, I'd love to learn more about different approaches. Also, it would be awesome to have these as an open source DB projects (well, we have git) or even offered as IaaS.
I would argue that a good design would actually prevent you from deleting important records like these. i.e. when Bob clicks delete, it just marks the object as deleted and it stops showing up in reports/interfaces. Then maybe you have something clean it up 90 days later or something.
Similairly you don't make table ARTICLES with column AMOUNT and KIND. You make table CHANGES with DIFFERENCE and KIND, and only ever add rows to that table (possibly with negative DIFFERENCE).
Scenario: Laptop's price is initially $800 and then increases to $850 before dropping to $825
Design 1: with columns Amount and Kind will just have a single row which will get modified with the latest value
Design 2: Will have 3 rows in the above case
Difference | Kind | Time stamp
800 | 'Laptop' | ts 1
+50 | 'Laptop' | ts 2
-25 | 'Laptop' | ts 3
So this latter design has 'undo' builtin
edit: formating
User confirmation dialogues are a UI smell, in the same way that a module of code stuffed with if statements and flags is a code smell. It's telling you that your design has a fundamental flaw that needs to be fixed in a non-trivial way. Just t hink about the basic question - should red be "delete" or "no". Either way, the question implicitly recognises that this situation is confusing, and that Sally has a good chance of making a mistake. Knowing that her problem has arisen because she clicked on the wrong button ("when it was clearly coloured red!") is not going to make Sally like your software. Make it so that she can fix her error, not so that she doesn't make the error in the first place.
Anyone have experience with doing something like this in Rails?
We also implement ability to find deleted documents by id, by searching the archive if the record is not found in the original collection.
API looks like this:
// delete something
delete("/products/123")
// see it in the archive
get("/archive/products/123")
// undelete it
put("/products/123", {$restore: true})Every time I've added the feature, it's bordered on trivial (start a timer to execute the actual delete request, show a link to cancel the request, hide the DOM element).
I suppose if you were doing all the work server-side, then yah, it would be difficult. But the way GOOG does it (IIRC) it's not that hard at all.
- In Android's gmail, sometimes undo does not recover the message (probably a bug)
- When I'm swiping pictures in Android and accidentally delete a picture and by the time I realize, the momentum of my action has already dismissed undo.
- Gmail undo : disappears after a time span. What if I delete & suddenly get distracted by something. By the time I return, I've to dig through trash to recover my action.
Thus the act of deleting should be red, but the act of not deleting should NOT be green, rather a neutral tone.
But yes, that was my immediate reaction, too. Not the most mindblowing Stack Exchange Q&A I've encountered on the HN front page.
(2) Don't use many words when 1 will do. "Cancel" "Delete"
(3) Don't use words when an icon will do.
(4) Don't use cognitively conflicting symbols and colors. Red be cautious, green it's safe, but deleting something can be dangerous in either direction, safe in either direction. A better mental model is action vs inaction, then it's more clear to highlight the response that causes an action.
(5) Avoid blocking interfaces altogether. Avoid interrupting the users flow. Perform all actions immediately, but only ever offer recoverable actions. Undo is not the only choice, and probably not the best for things like entire documents. Like loading a file, delete is often not meaningful in the undo stack (though it can be). Another paradigm is moving an item to a differentiated group, such as trash, an undisplayed group or a low rating. This approach is idempotent and allow things to be recovered out of order (it's also easer to implement than undo especially asynchronously). It can also be it's own valuable feature like edit tracking for word processors.
"OK" / "Cancel"
But I think YES and NO shouldn't be there. It's an extra piece of information that demands the original context of "Do you want to delete this album". It might seem like a small mental investment to ask of your users but people have varying degrees of comprehension at different times, whether due to temporary distraction or because of more permanent conditions such as dyslexia and such.
Instead I would just say "You are about to delete this album" And have the buttons read "Cancel" and "Delete"... Or something similar.
Undo would also be preferred as comex mentioned.. Or even better a git-like revision history so you can undo any action in the past. This comes with other technical challenges I'm sure but it's the most powerful solution.
Raskin would say, that this is not a question of red or green. It is a question of habit. If user deletes enough items, you will train him to press "Yes" button and not to think about the question. It will be his habit. Uninterruptible sequence.
Anybody deleted his important files just because he is "trained" to press sequence F8 - Enter in his favourite file manager?
Raskin recommends to provide undo. User content is sacred and should not be lost. You can also try to randomize the dialog. User will stop the sequence and think what he is doing. But if user performs the delete operation often, he will be greatly annoyed.
Read it. It is a great book with many valuable gems. http://amzn.com/0201379376
(There may be guidelines that do the opposite and I guess RTL locales may reverse it).
Deliberately ignoring HMI guidelines and switching button placement is irritating and does not remove the muscle-memory (?) problem. Doing it randomly is nuts and leads to mistakes that are IMO not the users fault.
It you want to interrupt a sequence, there are kinder ways of doing it like double confirmation.
[1] http://ux.stackexchange.com/questions/49991/should-yes-delet...
See this discussion from 2002:
I'm biased, but I think of this as another one of those "well, Microsoft got it wrong, but people are so used to it now that we have to perpetuate it or we look like we're just willfully antagonistic" situations.
User studies can be produced to prove either side, of course.
Edit: I predicted the top response. Yay!
/colorblind
For things like "yes, I'm afraid of the NSA, wipe those tapes forever", that's another issue. In that case, you want a "flow" rather than a button, I think.
That being said, I would have a tendency to put [yes delete] as green. If this was a "delete forever and destroy the world" button, then [yes delete] should be red.
It is up to you based on how permanent this delete is. As has been noted, Gmail style with undo is best.
For me red was always ''warning'', stop, danger...
So I don't think red is a good color or even if it has to have color..
> Recent research has shown that the color red influences psychological functioning. Red is hypothesized to be linked to aggression and danger in evolution, and these links are enhanced by culture-specific uses of red. Thus, color meanings are thought to be grounded in biologically based proclivities and learned associations. However, to date, there has been no direct evidence for the influence of experience on the red effect. This study focused on whether experience could change the psychological effects of the color red. In the context of the Chinese stock market, contrary to the meaning generally associated with red as negative and green as positive, red represents a rise in stock price and green stands for a decrease. An experiment using a 2×2 between subjects factorial design demonstrated that red (compared with green) impaired Chinese college students’ performance on an IQ test (in accordance with the red effect), but the opposite effect was found among stockbrokers. These results provide direct evidence of learned color meanings, in support of the general model of color effect. ...
which suggests that red has a non-trivial learned color meaning on people, and leaving open the possibility that it's mostly, if not all, culturally based.
Or consider http://www.ncbi.nlm.nih.gov/pubmed/20677892 :
> in a series of 7 experiments we demonstrate that women perceive men to be more attractive and sexually desirable when seen on a red background and in red clothing, and we additionally show that status perceptions are responsible for this red effect.
They hypothesize that red is not a general signal of danger, but has many meanings. NOTE! http://www.ncbi.nlm.nih.gov/pubmed/23398185 points out that there's likely publication bias in this experiment, so there might be no signal. I bring up the study anyway to point out that many people have different interpretations for the "evolutionary emergence", and the evidence is low.
Or consider http://www.ncbi.nlm.nih.gov/pubmed/23148465 :
> Claims of universality pervade color preference research. It has been argued that there are universal preferences for some colors over others (e.g., Eysenck, 1941), universal sex differences (e.g., Hurlbert & Ling, 2007), and universal mechanisms or dimensions that govern these preferences (e.g., Palmer & Schloss, 2010). However, there have been surprisingly few cross-cultural investigations of color preference and none from nonindustrialized societies that are relatively free from the common influence of global consumer culture. Here, we compare the color preferences of British adults to those of Himba adults who belong to a nonindustrialized culture in rural Namibia. British and Himba color preferences are found to share few characteristics, and Himba color preferences display none of the so-called "universal" patterns or sex differences.
Since you say that there is a "fair amount of literature" on this topic, can you point it out? I've not been able to find anything rigorous which supports your statement. Certainly nothing which is stronger than that last citation.
Not the OP, but there is a fair bit of literature which could be construed to support their point. Indeed, 2 out of the 3 references you cite could support their point.
1) Note that the general Chinese student performed worse when red was used - despite the generally positive Chinese cultural values put on red. The fact that training could overcome this does not invalidate that point. Indeed, the learnt value of red indicates that it may be sensible to use it in UI, simply because it is fairly standard.
2) Studies have shown that many women find dangerous men more attractive[1]. Perhaps this supports the idea that red represents danger?
3) Without access to the full study there is no way of determining exactly what this says.
Also, I like this study showing that people wearing red in Olympic combat sports have an advantage: http://community.dur.ac.uk/r.a.hill/red_advantage.htm
[1] eg http://www.psychologytoday.com/blog/head-games/201310/why-do...
The imgur link shows an unexplained green sign. Any thoughts as to why it's green?
To point of labeling and actions though:
1) I'm proponent of button labels being verbs ("Delete" vs "Yes") 2) Undo-able where possible
As to the topic, I agree that the "yes" doesn't belong on the buttons, and have no particular opinion on undo vs no-undo.
http://www.cape-hike.co.za/green-stop-sign/
The imgur link has the other sign, which looks very much in the style of the US National Park Service.
Nevertheless even going back as far as 1931, the Geneva convention "CONVENTION CONCERNING THE UNIFICATION OF ROAD SIGNALS" says:
Signs Prohibiting Passage: For these signs, the colour red must clearly predominate and must be used so as to bring into relief the general contour of the sign. The other colours to be used are optional except in the following cases[1]
I still say stop signs are universally expected to be red. Some singular counter-examples don't disprove that - they just show there are some weird things that happen.
I'd also note that linked example was posted from Reddit (in a joke sub-reddit) and it is entirely possible it was photoshopped. Other examples of green stop signs found by Google seems to be almost all photoshopped or on private property.
[1] http://members.jcom.home.ne.jp/kinmokusei/convention/before/...
The presence of early non-red stop signs suggests that "red = stop" is a learned association. Indeed, as the Wikipedia article states, the early standardizations used a yellow background instead of red. I conjecture that it was originally yellow for visibility reason, then turned red for better contrast with yellow used for caution signs. A full analysis would need to dig into the reasoning for this decision.
A more complete analysis would need to look into how color was used in the 1800s, before driving culture appeared. For example, was red the predominate color of danger in steam engines? (Note also that in Swedish and Finnish cultures, Falu red/punamulta is associated with an idyllic country-side life. These houses are not considered "dangerous" despite being red.)
The first and third literature references I gave are not in opposition to the idea that red has a (near) universal meaning. They instead cast doubt on the conjecture that the associations are evolutionary. The first suggests that even the observed psychological effects might be culturally learned, and the third suggests that we have a rather wide-spread global culture, making it hard to determine what is cultural and what is evolutionary.
Stop signs are also nearly universally octagon in shape. I very much doubt there's any sort of evolutionary reason for this choice.
My challenge was for the OP to defend the statement that the choice of red = blood = danger = stop is based on evolutionary reasons, with scientific research to back it up. The paper I quoted show that there's very little research which can distinguish between a shared culture (and yes, China and the US have a shared culture) and evolutionary universalism.
One need only read http://en.wikipedia.org/wiki/Linguistic_relativity_and_the_c... to see that even the basic color terms across cultures, and the evolution of color terms, is still being debated. It would be hard to ask someone "is red a dangerous color" if that someone doesn't distinguish between red and yellow.
Now if we are going to talk about the meaning of check marks and crosses in the Japanese market....
They use the concept of "destructive actions", and delete would fit the bill.
Destructive actions will show in red, and the rest shows in the default button color.
But what I did find interesting was this comment getting so many votes -
117 "Neither, if you're red-green color blind like 10% of men. – Roddy of the Frozen Peas Jan 12 at 5:31"
With a obvious reply, but less votes -
53 "@RoddyoftheFrozenPeas (1) while some degrees of color blindness are quite common, thinking that 10% of men are red/green color blind is totally insane, (2) solely using a color to point out something is bad for color blinds, but if the color is something "extra" on top of the main information, then it's perfectly fine. I'm quite surprised and worried that your horribly wrong comment managed to raise 4 votes... – Lohoris Jan 12"
It's amazing people really can't think for themselves and just meaninglessly up-vote because it seems the right thing to do, as compared to what the logical thing to do is.
Most reds look red and most greens look green. It's just that some particular shades of each are ambiguous. For me, the reds and greens produced by displays tend to be tougher to distinguish than natural hues, but the shades in the Stack Exchange question are as different as can be. It's tough to explain. It's also so subtle that many people with my particular type of colorblindness live and die without ever knowing the difference.
I only learned I was colorblind after being explicitly tested for it in 6th grade. I was pretty surprised! Though it did explain how I always seemed to mess up school assignments that involved coloring maps.
It's a shame people don't check online sources before calling a roughly accurate figure "insane".