Is making a user confirm a UIActionSheet action bad design? - ios

I'm using a UIActionSheet to let the user choose one of multiple actions. One of these actions is "Delete". However, the user might hit delete by mistake.
Should I reconsider having the action "Delete" mixed with other actions in this list, or is there some way I could make the user confirm that the choice was correct? For example a new UIActionSheet with the question "Are you sure you want to delete? Yes/No", or would this be considered as bad design?

I'd consider having the delete action as a separate button, and then having the Action sheet as the confirmation.
If you take the Photos app as an example, the delete action is not in the action menu, but it's own button which then asks for confirmation using an action sheet. This is the same with other apps, like iMovie and Pages.
The user probably won't like having to press through 2 action sheets, but will be even more annoyed if they accidentally press it. You can help with preventing accidents by making the delete option red in the action sheet, if you haven't already.
It also depends on what is being deleted, if you are wiping the phone in the settings menu, then you will be asked twice. But deleting something like text is not going to have confirmation at all.

Depends on what he deletes is critical or not.
If it's critical, you should definitively have the user re-confirm.
Tell me one OS where formatting the Hard Disk for example doesn't ask you to reconfirm... :-)

Related

Rails: Ask for register after submit content?

In my Rails App, I made a form_for to allow any visitor to submit their content.
But after submit, I want to ask user, whether they want to register for this site or not.
There are some approach to this:
Redirect after user submits the form, left the initial post anonymous.
Much the same as the first one. But somehow help user to reclaim the post they just make
Store the content in some place first and do not submit. Instead, ask for register. And after register, show the stored content before and ask user to submit again.
Basically, I can implement the 1st method. But it seems just not that good. For the 2nd and 3rd one, I do not know how to reclaim the post or store content beforehand.
Is there a standard way to do this? How can I solve this problem?
For solving the same kind of problem, I chose your 3rd option. For that you can use sessions, it will allow you to keep some information in memory related to a specific connection to your server.
http://guides.rubyonrails.org/action_controller_overview.html#session
There are some ways.
First of all you need to keep in mind that these are different behaviors from which you should chose first and do not let the implementation force you to chose one.
For the second case you can have the id of the post that was created (along with some guarantees that it is an orphan post) and then tweak your register method to also assign a post to a user after creating one.
The Third case can be implemented by storing the post data either to session or to a backend temporary store and retrieve them if needed.

Concept for a grails app

I am working on a Grails project, its an accounting project. We have multiple clients and they can have multiple types of accounts. I have to create the 'create' page for client, there should be a way to add multiple types of account to the client.
So I was thinking of making a drop-down list with account types and few text boxes to enter account name and other info about account. Also, as a client can have multiple accounts, so I want to create a 'add' button, when clicked it would display a new row to add a new client. I have done this kind of UI before using javascript but in this case, as there is a drop-down list and other components, I think it would be very hard and may not work.
I was thinking of creating a partial view which would render each time user clicked the 'add' button with additional row, problem with this would be during validation errors, edit page and i would also have to pass all values each time user clicks 'add' button.
Is there any other for doing this?
For the template approach you must use ajax if you don't want to carry on the params that the user has already set.
It is possible to make new drop-down lists appear (or any group of elements inside a <div>) when a user clicks a button, since Grails already comes with jQuery you might want to take a look at the .clone() method.
The problem with the two listed approeaches is that it will be possible to have duplicates.
Now, another option is to use checkboxes, so you can check just the type of account you want.
But to be honest it does seems a bit odd or even inapropiate to let the user choose the type of account he wants with such freedom.

Disallow 'Back' in Rails

I am creating a web application that asks user for randomized security question. However, when the user answer the initially given question incorrectly, the user can go back and try a different answer. Is there a way to make sure that the page will do a re-submission when the user clicks the 'Back' button?
Dont fall back to javascript as a last resort, add an attempted boolean field to the question in the database and use that in your controller to ensure users are not just guessing at security questions.
If the user submits the form too many times for one question mark that as attempted and redirect them to another question.
Maybe you should do it with javascript because it's all in the browser...
this could help:
http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript

Writing SpecFlow scenario that includes a prompt for a user decision

I'm new to SpecFlow and BDD and I've hit a roadblock in writing a scenario that requires a user to make a choice. Essentially here is the scenario:
Scenario: Deleting a record
Given I am on the edit record page
And I click the delete button
Then I should see a prompt asking for confirmation
I'm not sure how to proceed beyond this point. There are two paths to test here, one for when the user says "OK" to the confirmation, and one for when the user says "Cancel".
I want to say "And If I click OK" followed by "Then the record should be deleted", etc. But it seems like it should be broken up a better way.
How would you reword this scenario?
I would recommend writing your scenarios on a higher level. Avoid buttons, clicks and textboxes in your scenarios and try to talk about what the user want to accomplish - the behaviour of your system. The actual interaction with the page is then hidden in the step definitions.
So in your case that will be something like;
Given I am on the record page
When I delete a record
Then I should see a confirmation message
In the step definition for [When("I delete a record")] you then implement the clicking on the delete button and the Ok-button for "are you sure" or whatever is needed to delete the record.
I hope this was clear. Wrote it on my phone ;)
There might actually be three scenarios here. The first one focusses as Marcus suggests:
Given I am on the record page
When I delete a record
Then I should see a confirmation message
But are there also scenarios for the behaviour of the confirmation dialog?
Given I am presented with a confirmation message
When I confirm the action
Then the action proceeds
And
Given I am presented with a confirmation message
When I cancel the action
Then the action does not proceed

How to have previous and next button in the django admin (change_form)

I want to modify the django admin for a particular model to provide the following behaviour.
A user make a search on the change_list page. The the user click a specific entry and he lands on the change_form for that entry. Nothing different to the usual.
Now, what I want is a mean to navigate the former search results. Basically next and previous buttons on the edit page.
What would be the best approach to implement this feature without modifying the admin site too much?
I will need to memorize the search in the user session, then when an entry is clicked I will need to known which place it has within the results to place my "cursor" accordingly. But I'm a bit in the cloud as the implementation side.
One way is to just put the next and previous button in the template for that particular model.
This can be implemented using simple javascript.
I ended writing a fully custom admin for that.

Resources